cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
139
Views
0
Helpful
0
Replies
Highlighted
Beginner

Possible Bug? within EEM. copy command EEM IOS

looking for confirmation or information pertaining to the situation below is TESTCODE for a work around function for the reload in time command that does not cycle down the device. i believe that the copy command is expected to be functional due to the wr command functions properly. however the write command does not have a inverted function to copy start run which is what i need. attached below is the configuration i have put together and debug output as well. I also have ran this code in version 15.2(54)SG1 and Version 15.6(3)M2 with the same results. The result no mater the locations is the event being terminated at the copy command. if anyone knows of a method to get this function to work i would greatly appreciate the help.

 

 

cisco#conf t
Enter configuration commands, one per line. End with CNTL/Z.
cisco(config)#
cisco(config)#hostname cisco
cisco(config)#
cisco(config)#end
cisco#copy run start
Destination filename [startup-config]?
Building configuration...

*Dec 4 14:05:36.239: %SYS-5-CONFIG_I: Configured from console by console[OK]
cisco#conf t
Enter configuration commands, one per line. End with CNTL/Z.
cisco(config)#!---------- event funtion to preform rollback ---------------
cisco(config)#no event manager applet roller
cisco(config)#event manager applet roller
cisco(config-applet)#event none
cisco(config-applet)#action 0.0 cli command "enable"
cisco(config-applet)#action 1.0 cli command "copy start run"
cisco(config-applet)#exit
cisco(config)#$ntion delay to preform rollback funtion ---------------
cisco(config)#
cisco(config)#no event m
*Dec 4 14:05:39.233: %GRUB-5-CONFIG_WRITING: GRUB configuration is being updated on disk. Please wait...
*Dec 4 14:05:40.309: %GRUB-5-CONFIG_WRITTEN: GRUB configuration was written to disk successfully.anager applet rollbacktimer
cisco(config)#
cisco(config)#event manager applet rollbacktimer
cisco(config-applet)#$----- wait timer is in seconds ---------------
cisco(config-applet)#event none
cisco(config-applet)#action 0.1 cli command "enable"
cisco(config-applet)#action 0.2 cli command "conf t"
cisco(config-applet)#action 0.3 wait 15
cisco(config-applet)#action 0.4 cli command "hostname test123"
cisco(config-applet)#
cisco(config-applet)#action 0.5 cli command "end"
cisco(config-applet)#
cisco(config-applet)#action 1.0 cli command "event manager run roller"
cisco(config-applet)#
cisco(config-applet)#end
cisco#
cisco#event manager run rollbacktimer

*Dec 4 14:05:42.379: %SYS-5-CONFIG_I: Configured from console by console
*Dec 4 14:05:42.526: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : CTL : cli_open called.
*Dec 4 14:05:42.548: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : **************************************************************************
*Dec 4 14:05:42.549: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : * IOSv is strictly limited to use for evaluation, demonstration and IOS *
*Dec 4 14:05:42.550: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : * education. IOSv is provided as-is and is not supported by Cisco's *
*Dec 4 14:05:42.551: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : * Technical Advisory Center. Any use or disclosure, in whole or in part, *
*Dec 4 14:05:42.552: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : * of the IOSv Software or Documentation to any third party for any *
*Dec 4 14:05:42.553: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : * purposes is expressly prohibited except as otherwise authorized by *
*Dec 4 14:05:42.554: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : * Cisco in writing. *
*Dec 4 14:05:42.555: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : **************************************************************************
*Dec 4 14:05:42.557: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : cisco>
*Dec 4 14:05:42.558: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : IN : cisco>enable
*Dec 4 14:05:42.674: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : cisco#
*Dec 4 14:05:42.677: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : IN : cisco#conf t
*Dec 4 14:05:42.699: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : Enter configuration commands, one per line. End with CNTL/Z.
*Dec 4 14:05:42.700: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : cisco(config)#
*Dec 4 14:05:58.093: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : IN : cisco(config)#hostname test123
*Dec 4 14:05:58.206: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : test123(config)#
*Dec 4 14:05:58.209: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : IN : test123(config)#end
*Dec 4 14:05:58.223: %SYS-5-CONFIG_I: Configured from console by on vty0 (EEM:rollbacktimer)
*Dec 4 14:05:58.230: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : OUT : test123#
*Dec 4 14:05:58.233: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : IN : test123#event manager run roller
*Dec 4 14:05:58.336: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : CTL : cli_open called.
*Dec 4 14:05:58.352: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : OUT : **************************************************************************
*Dec 4 14:05:58.353: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : OUT : * IOSv is strictly limited to use for evaluation, demonstration and IOS *
*Dec 4 14:05:58.354: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : OUT : * education. IOSv is provided as-is and is not supported by Cisco's *
*Dec 4 14:05:58.356: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : OUT : * Technical Advisory Center. Any use or disclosure, in whole or in part, *
*Dec 4 14:05:58.357: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : OUT : * of the IOSv Software or Documentation to any third party for any *
*Dec 4 14:05:58.358: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : OUT : * purposes is expressly prohibited except as otherwise authorized by *
*Dec 4 14:05:58.359: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : OUT : * Cisco in writing. *
*Dec 4 14:05:58.360: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : OUT : **************************************************************************
*Dec 4 14:05:58.361: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : OUT : test123>
*Dec 4 14:05:58.363: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : IN : test123>enable
*Dec 4 14:05:58.475: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : OUT : test123#
*Dec 4 14:05:58.478: %HA_EM-6-LOG: roller : DEBUG(cli_lib) : : IN : test123#copy start run
test123#
test123#!
*Dec 4 14:06:02.493: %HA_EM-6-LOG: rollbacktimer : DEBUG(cli_lib) : : CTL : cli_close called.
*Dec 4 14:06:18.341: %HA_EM-6-

 

 

--------------------------------------------------------------------------------------------------------

config ran

----------------

conf t


hostname cisco
end

copy run start

!

conf t

!---------- event funtion to preform rollback ---------------

no event manager applet roller
event manager applet roller
event none
action 0.0 cli command "enable"
action 1.0 cli command "copy start run"


exit

!---------- event funtion delay to preform rollback funtion ---------------
no event manager applet rollbacktimer
event manager applet rollbacktimer

! -------------- wait timer is in seconds ---------------

event none

action 0.1 cli command "enable"
action 0.2 cli command "conf t"
action 0.3 wait 15
action 0.4 cli command "hostname test123"
action 0.5 cli command "end"
action 1.0 cli command "event manager run roller"
end
event manager run rollbacktimer
!

 

 

Everyone's tags (5)
CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards