cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
411
Views
0
Helpful
4
Replies

NSO sync from and role back

Hi all, 

here is the scenario change A is manually made on the network  and a sync-from is done on NSO

then change B is manually made on the network  and a sync-from is done on NSO

I know i can role back to before the sync-from  of change A but is there any was to role back to that point and leave the changes of change B ??

 

Thanks

Regards

Yale

Everyone's tags (1)
4 REPLIES 4
Cisco Employee

Re: NSO sync from and role back

Wait, what is the desired result here? Is it like reverting a single commit in git or more like resetting a branch?

 

In general, you can revert any single commit using the revert command. (If that commit is in your history.)

Re: NSO sync from and role back

i make change A (then sync from) then change B (then sync from), i then revert change A but it also removed change B

is it possible to just remove change A and keep change B in place

Cisco Employee

Re: NSO sync from and role back

So, look at this session:

admin@ncs% request devices sync-from 
sync-result {
    device xr1
    result true
}
[ok][2019-04-16 09:28:15]

[edit]
admin@ncs% rollback 
Possible completions:
  10001     - 2019-04-02 21:02:47 by system via system
  10002     - 2019-04-02 21:23:17 by admin via cli
  10003     - 2019-04-02 21:23:56 by admin via cli
  10004     - 2019-04-04 15:55:35 by admin via cli
  10005     - 2019-04-16 09:28:15 by admin via cli
  selective - Apply a single rollback delta
admin@ncs% request devices device xr1 sync-from
result true
[ok][2019-04-16 09:28:33]

[edit]
admin@ncs% request devices device xr1 sync-from
result true
[ok][2019-04-16 09:28:35]

[edit]
admin@ncs% rollback 
Possible completions:
  10001     - 2019-04-02 21:02:47 by system via system
  10002     - 2019-04-02 21:23:17 by admin via cli
  10003     - 2019-04-02 21:23:56 by admin via cli
  10004     - 2019-04-04 15:55:35 by admin via cli
  10005     - 2019-04-16 09:28:15 by admin via cli
  10006     - 2019-04-16 09:28:33 by admin via cli
  selective - Apply a single rollback delta

Here I have done two sync-froms that show up in the rollback list as 10005 and 10006 respectively. I can issue "rollback 10005" to rollback only the first sync-from.

 

There is of course no guarantee that this is consistent or that it is what you want (if the changes are overlapping for instance), but you can do it! And you can do a show | compare to see what it would mean.

 

Highlighted
Cisco Employee

Re: NSO sync from and role back

Think about it this way:

1. The device has configuration C, D, E. You do a sync-from. This becomes transaction T1

2. You manually configure A on the device and sync-from. The delta from C, D, E to A, C, D, E becomes transaction T2

3. You manually configure B on the device and sync-from. The delta from A, C, D, E to A, B, C, D, E becomes transaction T3

 

You can now selectively roll back T2 or T3, or you can cumulatively roll back T3 and T2