cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
573
Views
2
Helpful
1
Replies

Add Delay Between PnP Deploy Image and Deploy Config

marxom7713
Level 1
Level 1

Working on a large deployment using APIC-EM PnP.

Have ISR4331s with 1MFT-T1/E1 & 2MFT-T1/E1 NIMs installed.

APIC-EM does not the normal deployment of the new image to each router, and then applies the configuration, however when I check the configuration after deployment, none of the serial interfaces are built.

I tried doing things manually and what I found is that if I wait an additional 90-120 seconds before deploying a configuration after performing the image upgrade that the serial interfaces do get provisioned correctly. I suspect the xMFT-T1/E1 cards themselves are performing some kind of upgrade and therefore are unavailable when the new configuration is applied immediately after deploying the new image.

So question is, is there a way to add a delay between deploying an image and deploying a configuration in APIC-EM PnP?

1 Reply 1

aradford
Cisco Employee
Cisco Employee

Hi Marc,

i usually embed this type of config in a small inline self-destructing EEM script.

here is one for "aaa",

Network Automation with Plug and Play (PnP) – Part 7

but you could do a simpler version for your serial config.  Put something like this at the end of the configuration file that gets downloaded.

  • Strip out the serial config commands into this section
  • Change the timeout to 180sec or what ever is safe
  • debug event manager action cli  is a useful command to run when testing to make sure the script is running properly.
  • This script will only run once, then remove itself.  You need to do a "wr me" at the end to save the new config (including removing the EEM script)

event manager applet POST_PNP

! time in seconds

event timer countdown time 10

action 0.1 cli command "enable"

action 0.2 cli command "config t"

! what ever commands you want in here

action 1.0 cli command "int g3"

action 1.1 cli command "no shut"

action 2.0 syslog msg "PNP serial config by EEM "

action 3.0 cli command "no event manager applet POST_PNP"

action 3.1 cli command "end"

action 3.2 cli command "wr mem"

end