[j-nsp] JUNOScript parse failures
hayter
hayter@usc.edu
Thu, 26 Sep 2002 15:46:33 -0700
it should not fail with a parse error. it should fail with a
'configuration database modified' error. it's failing to parse
the reply (which appears to me to be valid XML):
hayter@rtr43> configure exclusive | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/5.4R1/junos">
<xnm:error xmlns="http://xml.juniper.net/xnm/1.1/xnm" xmlns:xnm="http://xml.juniper.net/xnm/1.1/xnm">
<message>
configuration database modified
</message>
</xnm:error>
<output>Users currently editing the configuration:</output>
<output> mariog terminal p0 (pid 10767) on since 2002-09-26 14:40:58 PDT</output>
<output> [edit firewall filter ICT-anti-spoof]</output>
</rpc-reply>
the proper response from the script should be:
REQUEST test.xml FAILED
----
Carl Hayter
ISD - Data Network Operations
University of Southern California
On Thu, Sep 26, 2002 at 03:39:26PM -0700, Joe Lin wrote:
> Rollback any uncommitted changes, or commit before you try to lock the
> configuration.
>
> Or don't lock the configuration.
>
> You can only obtain exclusive lock of configuration if no one else has a
> lock on it, or it does not contain any uncommitted changes.
>
> You cant expect a juniper to lock a configuration when the configuration
> is in an unknown state, that's, not fair to the poor device :)
>
> -joe
>
>
> -----Original Message-----
> From: juniper-nsp-admin@puck.nether.net
> [mailto:juniper-nsp-admin@puck.nether.net] On Behalf Of hayter
> Sent: Thursday, September 26, 2002 3:24 PM
> To: juniper-nsp@puck.nether.net
> Subject: [j-nsp] JUNOScript parse failures
>
> anybody seen anything like this recently?
>
> $ perl load_configuration.pl -m ssh test.xml rtr43
> login: hayter
> password:
> Locking configuration database ...
> Something bad has happened - XML got garbled.
> Here's what it did not like:
> lter ICT-anti-spoof term 1]</output>
> </rpc-reply>
>
> The error was:
> Parse failure at
> /home/sol-00/hayter/junoscript-perl-5.4R1.4/blib/lib/JUNOS/Device.pm
> line 429.
>
>
> when the configuration can't be locked because of uncommitted changes?
>
> hayter@rtr43> configure
> Entering configuration mode
> Users currently editing the configuration:
> mariog terminal p0 (pid 10767) on since 2002-09-26 14:40:58 PDT, idle
> 00:23:15
> [edit firewall filter ICT-anti-spoof term 1]
> The configuration has been changed but not committed
>
> [edit]
> hayter@rtr43# exit
>
>
> i had hoped their example scripts would work! seems it should at least
> fail gracefully.
>
> ----
> Carl Hayter
> ISD - Data Network Operations
> University of Southern California
> _______________________________________________
> juniper-nsp mailing list juniper-nsp@puck.nether.net
> http://puck.nether.net/mailman/listinfo/juniper-nsp
>
>