Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

New feature: commit confirmed #121

Closed
mirceaulinic opened this issue Mar 6, 2017 · 6 comments
Closed

New feature: commit confirmed #121

mirceaulinic opened this issue Mar 6, 2017 · 6 comments

Comments

@mirceaulinic
Copy link
Member

See details in the parent issue napalm-automation/napalm-base#214

@mirceaulinic
Copy link
Member Author

Hi @ktbyers - I recall we have discussed about this in the past and - if I'm not wrong - you said you have an idea how to implement this. Is that correct? If so, could you please expose a bit the idea, I'd like to give it a try. Thanks!

@ktbyers
Copy link
Contributor

ktbyers commented Mar 8, 2017

@mirceaulinic It looks like we should be able to do something like this (note, time is in minutes).

test123#configure replace flash:/candidate_config.txt force time 2
Rollback Confirmed Change: Backing up current running config to flash:pynet-rtr1-cfgMar--8-09-32-38.872-PST-19

Total number of passes: 1
Rollback Done

pynet-rtr1#



# Eventually just rolled back the change
pynet-rtr1#                  
test123#

# Logging showed this
test123#show logging
...
Mar  8 09:32:19.824 PST: %SYS-5-CONFIG_I: Configured from console by pyclass on vty0 (54.219.38.58)
Mar  8 09:32:40.356 PST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_BACKUP: Backing up current running config to flash:pynet-rtr1-cfgMar--8-09-32-38.872-PST-19
Mar  8 09:32:40.360 PST: Rollback:Acquired Configuration lock.
Mar  8 09:32:42.401 PST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_START_ABSTIMER: User: pyclass(Priv: 15, View: 0): Scheduled to rollback to config flash:pynet-rtr1-cfgMar--8-09-32-38.872-PST-19 in 2 minutes
Mar  8 09:33:42.402 PST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_WARNING_ABSTIMER: System will rollback to config flash:pynet-rtr1-cfgMar--8-09-32-38.872-PST-19 in one minute. Enter "configure confirm" if you wish to keep what you've configured
Mar  8 09:34:42.404 PST: %ARCHIVE_DIFF-5-ROLLBK_CNFMD_CHG_ROLLBACK_START: Start rolling to: flash:pynet-rtr1-cfgMar--8-09-32-38.872-PST-19
Mar  8 09:34:42.436 PST: Rollback:Acquired Configuration lock.


# Here I do the same thing, but confirm it
test123#configure replace flash:/candidate_config.txt force time 2
Rollback Confirmed Change: Backing up current running config to flash:pynet-rtr1-cfgMar--8-09-35-54.346-PST-20

Total number of passes: 1
Rollback Done

pynet-rtr1#configure confirm         

@ktbyers
Copy link
Contributor

ktbyers commented Mar 8, 2017

@mirceaulinic I also see this configuration lock which we probably should be using:

pynet-rtr1#configure terminal lock 
Configuration session is locked. The lock will be cleared once you exit out of configuration mode.
Enter configuration commands, one per line.  End with CNTL/Z.

In another SSH session, I then tried:

pynet-rtr1#conf t
Configuration mode is locked by process '78' user 'pyclass' from terminal '8'. Please try later.

@mirceaulinic
Copy link
Member Author

mirceaulinic commented Mar 8, 2017

Ah that's really nice! I believed that's going to be way harder.
I plan for next week to focus more on the whole epic: napalm-automation/napalm-base#214 and I will try an implementation if you don't beat me :)

@ktbyers
Copy link
Contributor

ktbyers commented Mar 8, 2017

@mirceaulinic Yes, Cisco IOS for all its automation failings has so many features in it...that you can retrofit a lot of things onto it.

@ktbyers
Copy link
Contributor

ktbyers commented Apr 18, 2017

We have PR on this. Closing the issue.

@ktbyers ktbyers closed this as completed Apr 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants