Junos Automation (Scripting)
Highlighted
Junos Automation (Scripting)

Update (mixed) EX virtual-chassis with NETCONF / PyEZ

‎02-07-2014 04:16 AM

Hello,

 

I'm currently trying to update JunOS on a bunch of switches using NETCONF and the PyEZ package. I noticed a strange behaviour (pre-update image 11.4R7) when trying to do so.

 

The rpc command I use is:

 

    <rpc>
        <request-package-add>
                <reboot/>
                <set>jinstall-ex-4200-...</set>
                <set>jinstall-ex-4500-...</set>
        </request-package-add>
    </rpc>

On the CLI the "reboot" option would reboot  the whole stack. I now noticed that the rpc command only reboots the master of the stack, causing the stack to remain on the old version and the master coming back as inactive.

 

I think this might be a bug in the RPC call but I'm not sure. Is anyone else here using NETCONF to upgrade JunOS images and has tips on how to do this?

--
Sebastian Wiesinger
JNCIS-SP
2 REPLIES 2
Junos Automation (Scripting)

Re: Update (mixed) EX virtual-chassis with NETCONF / PyEZ

‎02-07-2014 05:30 AM

Hi Sebastian,

 

Thank you for identifying this issue *AND FIXING IT*!!! I've brough your pull-request into the Junos PyEZ master trunk.  This is good timing as I am planning on "cutting" the 0.0.4 version and uploading it into PyPI today.

 

I appreciate your efforts to support this project.

 

Thank you again!!

 

 

Cheers,
-- Jeremy

@nwkautomaniac
Junos Automation (Scripting)

Re: Update (mixed) EX virtual-chassis with NETCONF / PyEZ

‎02-07-2014 06:05 AM

@jschulman wrote:

Hi Sebastian,

 

Thank you for identifying this issue *AND FIXING IT*!!! I've brough your pull-request into the Junos PyEZ master trunk.  This is good timing as I am planning on "cutting" the 0.0.4 version and uploading it into PyPI today.

 

I appreciate your efforts to support this project.

 

Thank you again!!

 

 


Hi,

 

no problem. I opened another issue at github for my timeout problem (request system software add takes too long). But the other issue here is with the <reboot /> tag which doesn't really work with switch stacks it seems. Smiley Sad But for now I think I just would have to keep the reboot tag out and restart the switch later with a separate rpc call.

 

This seems to be a problem with the RPC system itself rather than a PyEZ problem.

--
Sebastian Wiesinger
JNCIS-SP