SRX

last person joined: 22 hours ago 

Ask questions and share experiences about the SRX Series, vSRX, and cSRX.
  • 1.  Cancel a pending "commit confirmed"

    Posted 10-04-2016 13:06

    Is there any way to cancel a pending "commit confirmed" command? Say you gave yourself 5 minutes to see if your active configuration was going to work, and you realize - oh, I missed something lets just rollback now - what could I do to initiate the rollback without having to wait the 5 minutes??

     

    I can type rollback 0, or any other number of rollbacks while a commit confirmed is ticking down, and it still doesn't matter, the configuration will rollback again.

     

    Any suggestions?

     

    Thanks



  • 2.  RE: Cancel a pending "commit confirmed"
    Best Answer

     
    Posted 10-04-2016 13:20

    Hi,

    # rollback 1
    # commit

    should rollback the config immediately.

     

    Cheers,

    Ashvin



  • 3.  RE: Cancel a pending "commit confirmed"

    Posted 10-10-2016 08:11

    Thanks ,

     

    I get it now - thank you!



  • 4.  RE: Cancel a pending "commit confirmed"

    Posted 06-20-2018 08:35

    Hi, thanks for the answer. Is there a netconf command to do this?
    I tried the standard netconf command cancel-commit (see https://tools.ietf.org/html/rfc6241#section-8.4.4.1) (via the ncclient python library), and it did not work:
    Request:
    <?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:95bff4fb-5faa-444b-91ff-f3dc887541d3"><nc:cancel-commit/></nc:rpc>]]>]]>
    Response:
    <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/15.1X49/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:95bff4fb-5faa-444b-91ff-f3dc887541d3">
    <rpc-error>
    <error-type>protocol</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>syntax error</error-message>
    <error-info>
    <bad-element>cancel-commit</bad-element>
    </error-info>
    </rpc-error>
    </rpc-reply>
    The closest one I could find is this one: https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/netconf-configuration-rolling-back.html
    However this does a different thing: rolls back the candidate configuration to the current running configuration.



  • 5.  RE: Cancel a pending "commit confirmed"

     
    Posted 06-21-2018 02:36

    Hi, 

     

    The rpc for commit-configuration is:

    <rpc>
    <commit-configuration/>
    </rpc/

    with additional arguments such as confirmed:

        <commit-configuration>
            <confirmed/>
            <confirm-timeout>rollback-delay</confirm-timeout>
        </commit-configuration>

    https://www.juniper.net/documentation/en_US/junos/topics/reference/tag-summary/junos-xml-protocol-commit-configuration.html

     

    I don't think there's a cancel-commit as per the RFC in the native junos netconf.

    However, you can do a rollback 1 and then commit similar to the cli procedure:

     

    <rpc>
    <load-configuration rollback='1'/>
    </rpc>

    https://www.juniper.net/documentation/en_US/junos/topics/reference/tag-summary/junos-xml-protocol-load-configuration.html

     

    Hope this works.

    Cheers,

    Ashvin