How do I cancel a commit-confirm if the commit fails?

Hello,

I have a bit of a noob question, but I am trying to figure out how I should have handled this situation:

I had an error in my configuration and I ran commit-confirm 1, which failed as expected.

# commit-confirm 1

commit-confirm will automatically reboot in 1 minutes unless changes
are confirmed.
Proceed ? [Y/n] 
Initialized commit-confirm; 1 minutes to confirm before reboot
[ firewall ]
Invalid interface group "GUEST" on firewall rule
[[firewall]] failed
Commit failed
[edit]

I then checked for scheduled reboots to make sure the reboot had been canceled, and none were listed.

# run show reboot 
Reboot or poweroff is not scheduled
[edit]

So I went about my business, but sure enough, 1 minute later the device rebooted and reverted the changes.

My first question is how do I know if a commit-confirm is still waiting on a confirmation? Is there another command besides show reboot I should know?

My second question is what’s the proper way to cancel the commit-confirm in this situation? Should I just run confirm?

Thanks!

Short answer is you’ll probably just need to just hit confirm, though if there isn’t currently a way to view a present commit-confirm process, then that would be a useful feature request.

You may already know this, but you can also do this depending on the version you’re using:

set system config-management commit-confirm action reload

This will do a rollback-soft action, which just reverts the config instead of doing a full reboot of VyOS.

2 Likes

Oh cool, thanks!

I didn’t know about that option.