Reply

Help appreciated with CCS and HP switch software update

New Member
Posts: 4
7639     0

Hi everyone,

 

maybe someone can provide some help. I'm working on a CCS to save some manual tasks on update HP switches (the procurve ones). I have pretty much done already but I'm actually bothered with one behaviour.

 

After the software image was copied I have to switch the software image slot. I let NetMRI answer the following question with yes and then the reboot occurs immediately. Here's the snippet from session log:

 

switch1# boot system flash primaryThis will reboot the system from the primary image. Continue (y/n)? yConnection to IP.IP.IP.IP closed by remote host. Connection to IP.IP.IP.IP closed. *** Job Failed [1] ***

 

You can see that what I want to achieve is successful and beeing automatically disconnected from the switch is an expected behaviour. This said I would like to have this job marked successful and not failed. Any idea? Do I have to use an output trigger for this action?

 

Here is what my action command looks like:

Action-Commands: { $enable_changes eq "on" and $switch_slot_and_reboot eq "on" and $op_newer_software_slot = "primary" and $op_secondary_slot_active = "yes" }
wr mem
boot system flash primary\ry\r

 

Regards

Christoph

Re: Help appreciated with CCS and HP switch software update

Superuser
Posts: 115
7639     0

I would try

boot system flash primary\ry\r\r

Sometimes I've seen it needed 2 [Enter] 

 

Sif

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

https://sifbaksh.com

Re: Help appreciated with CCS and HP switch software update

[ Edited ]
New Member
Posts: 4
7639     0

Hi Sif,

 

thank you for your suggestion. I just gave it a try but the behaviour remains the same. I already felt that this variant would fail. Maybe I should try to better explain my problem.

 

NetMRI sends the command "boot system flash primary" to the switch.

Everything is fine.

The switch's response is:

This will reboot the system from the primary image. Continue (y/n)?

Still everything fine.

NetMRI sends "y\r".

Still everything fine.

The switch now automatically starts to reboot and the SSH connection is closed by remote host:

"Connection to IP.IP.IP.IP closed by remote host."

Still everything fine because I can not stay connected to a rebooting switch.

Now NetMRI detects that it has been disconnected for whatever reason:

"Connection to IP.IP.IP.IP closed."

The last message in the log says:

"*** Job Failed [1] ***"

This is my problem. The switch did everything right. NetMRI did everything right including sending the "y" and accepting with Enter. The disconnection is also OK like I explained it before. What I want is NetMRI to treat this specific disconnection at the end as successful and with OK status.

 

Is this possible?

 

Christoph

Re: Help appreciated with CCS and HP switch software update

Expert
Posts: 70
7639     0

Does the HP switch support "reload in X" or "reload at X"?  That's how some other people have handled this for Cisco IOS devices.

 

Re: Help appreciated with CCS and HP switch software update

New Member
Posts: 4
7639     0

Hi MAdkins,

 

thank you for your input. I know this functionality from Cisco and it looks like HP also supports this. There is a reload after command available. But this option is not available at that point. If I start to switch the active boot partition and confirm with y the switch starts to reboot immediately. There is no chance to interrupt the reboot or so.

 

Your suggestion made me think a little bit more about the situation. When others use the reload in feature to postpone the reboot for a minute or so then NetMRI has the possibility to understand that all the commands have been send successfully and that the action is complete and OK. Then NetMRI will terminate the SSH session by itself and the result will be OK too. In contrast with the HP switch while switching boot partitions NetMRI gets hard disconnected and dislikes this behaviour. The result is an ERROR. This is where I would like to see an OK.

 

Regards

Christoph

Re: Help appreciated with CCS and HP switch software update

Expert
Posts: 70
7639     0

As an alternative, can you configure "boot set-default flash secondary" followed by "reload in X"?

Re: Help appreciated with CCS and HP switch software update

New Member
Posts: 4
7639     0

Hi MAdkins,

 

this is great. I somehow remebered such an option but I was kind of blind to find the command on the CLI. Now I think this will solve my problem. I'm going to adapt my CCS scripts and report back. Thank you so much!

 

Regards

Christoph

Showing results for 
Search instead for 
Did you mean: 

Recommended for You