cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3796
Views
0
Helpful
5
Replies

EEM Install add file

tcebak
Level 1
Level 1

Hello,

 

I'm trying to get an eem to install the 9300 series switch fpga upgrade file. I currently have a EEM that works with installing a IOS-XE but can't seem to get the fpga upgrade to work. Below is what i have.

 

event manager applet fpga
event none maxrun 600
action 1.0 cli command "enable"
action 2.0 cli command "install add file flash:cat9k_iosxe.16.00.00fpgautility.SPA.bin" pattern "SUCCESS"
action 3.0 cli command "install activate" pattern "proceed"
action 3.1 cli command "y"

The only thing is when i do an IOS-XE version i do a active commit, but the .pdf for the fpga upgrade says not to do the active commit. Below is how i updat the IOX-XE that works

event manager applet upgrade
event none maxrun 600
action 1.0 cli command "enable"'
action 2.0 cli command "install add file flash:cat9k_iosxe.16.06.05.SPA.bin activate commit" pattern "[y/n/q]"
action 2.1 cli command "n" pattern "proceed"'
action 2.2 cli command "y"'

any suggestions would be great!

1 Accepted Solution

Accepted Solutions

Long story short after many attempts it seems to be working with a couple of wait commands, not sure if they are actually doing anything but it works! Here is what i have below:

 

event manager applet fpga
event none maxrun 1000
action 1.0 cli command "enable"'
action 2.0 cli command "install add file flash:cat9k_iosxe.16.00.00fpgautility.SPA.bin" pattern "SUCCESS"'
action 3.0 wait 10
action 4.0 cli command "install activate" pattern "\[y\/n\/q\]"',
action 4.1 wait 10
action 4.2 cli command "n" pattern "\[y\/n\]|#"
action 4.4 cli command "y"
					

View solution in original post

5 Replies 5

tcebak
Level 1
Level 1

Here's the debug: 

Switch#event manager run fpga

*Jun 6 18:57:19.717: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : CTL : cli_open called.
*Jun 6 18:57:19.717: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : Switch>
*Jun 6 18:57:19.717: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : IN : Switch>enable
*Jun 6 18:57:19.827: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : Switch#
*Jun 6 18:57:19.827: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : IN : Switch#install add file flash:cat9k_iosxe.16.00.00fpgautility.SPA.bin
*Jun 6 18:57:22.240: %IOSXE-5-PLATFORM: Switch 1 R0/0: Jun 6 18:57:22 install_engine.sh: %INSTALL-5-INSTALL_START_INFO: Started install add flash:cat9k_iosxe.16.00.00fpgautility.SPA.bin
Switch#
*Jun 6 18:59:07.961: %IOSXE-5-PLATFORM: Switch 1 R0/0: Jun 6 18:59:07 install_engine.sh: %INSTALL-5-INSTALL_COMPLETED_INFO: Completed install add PACKAGE flash:cat9k_iosxe.16.00.00fpgautility.SPA.bin
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : install_add: START Thu Jun 6 18:57:20 UTC 2019
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : install_add: Adding PACKAGE
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT :
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : --- Starting initial file syncing ---
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : Info: Finished copying flash:cat9k_iosxe.16.00.00fpgautility.SPA.bin to the selected switch(es)
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : Finished initial file syncing
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT :
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : --- Starting Add ---
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : Performing Add on all members
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : [1] Add package(s) on switch 1
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : [1] Finished Add on switch 1
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : Checking status of Add on [1]
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : Add: Passed on [1]
*Jun 6 18:59:08.007:
Switch#%HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : Finished Add
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT :
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : SUCCESS: install_add Thu Jun 6 18:59:07 UTC 2019
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT :
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : OUT : Switch#
*Jun 6 18:59:08.007: %HA_EM-6-LOG: fpga : DEBUG(cli_lib) : : IN : install activate

after this its usually :

*Jun 6 17:48:07.993: %HA_EM-6-LOG: fpgaupgrade : DEBUG(cli_lib) : : CTL : cli_close called.
*Jun 6 17:48:07.993:
*Jun 6 17:48:07.993: tty is now going through its death sequence

 

It's also weird that the output is
Switch#
Install activate

Instead of
Switch#install activate

The debug output tells me that the result of the "install activate" does not contain the "proceed" pattern.  Can you run through all of these commands manually and post the output?

Long story short after many attempts it seems to be working with a couple of wait commands, not sure if they are actually doing anything but it works! Here is what i have below:

 

event manager applet fpga
event none maxrun 1000
action 1.0 cli command "enable"'
action 2.0 cli command "install add file flash:cat9k_iosxe.16.00.00fpgautility.SPA.bin" pattern "SUCCESS"'
action 3.0 wait 10
action 4.0 cli command "install activate" pattern "\[y\/n\/q\]"',
action 4.1 wait 10
action 4.2 cli command "n" pattern "\[y\/n\]|#"
action 4.4 cli command "y"
					

Glad you got it working.  Yes, those patterns are case-sensitive.  And it might be easier to do something simple like pattern "y/n" to make it easier to read later on when you have to go back to it :-).

Review Cisco Networking for a $25 gift card