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.
# rollback 1
should rollback the config immediately.
I get it now - thank you!
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-22.214.171.124) (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.htmlHowever this does a different thing: rolls back the candidate configuration to the current running configuration.
The rpc for commit-configuration is:
with additional arguments such as confirmed:
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:
Hope this works.