cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
655
Views
0
Helpful
6
Replies

Cisco NSO Service Rollback File Id

mustafabehadir
Level 1
Level 1

Hi experts,

Does anyone knows if it is possible to get the rollback file id inside of the service callback like post-modification etc.?
If not do we have a way to get this file for a particular service?

Thanks and Best Regards ...

6 Replies 6

Hi, thanks a lot for the reply.
I think it is applicable for actions. What I am trying to do is correlate rollback file ids with particular services. I tried to get this rollback id in service post modification with the way that you shared but it did not work. Also I am not sure if it is a good idea to capture this id in the service code. 

huayyang
Cisco Employee
Cisco Employee

why do you need the rollback id of a service? applying that rollback should be the same as removing the service instance.

We have a LSA setup and we want to use commit-queue continue-on-error with atomic false option. We are tracking the commit-queue with ncs-events stream at CFS NSO. The thing is there is no automatic error-recovery with continue-on-error.
When we delete an endpoint under the service instance (it is like device for vpn services) service is trying to delete the configuration from the device. But if it is not successful because of something like device is unreachable or ned error etc. we lose the configuration at service and can not clean the config at device. So we have to rollback that configuration to service and reconcile it to re-attempt delete operation when we fix the issue with device (like device is reachable now etc.)
So we want to create an action which can use the right rollback to load the config back and reconcile it so operator will not go through the rollbacks to find which is the right one. For this I think I need to find rollback ids for particular services programmatically?

huayyang
Cisco Employee
Cisco Employee

just for your question: no, you can't get the rollback info in your service callback

however, you can get the rollback label when doing the commit from nso's nbi(e.g. check rollback-label/id in "addtional query parameters" for restconf https://developer.cisco.com/docs/nso/guides/the-restconf-api/#query-parameters), with which the system north of nso can rollback that commit

other comments:

1 your cq settings seem questionable, if you want to discuss, can you explain what problem you're solving with non-atomic+continue-on-error?

2 device being unreachable is considered transient error for cq, so the queue item can be retried automatically, right?

rogaglia
Cisco Employee
Cisco Employee

I think the device automation tool is doing something similar: https://gitlab.com/nso-developer/device-automaton

The strategy is to setup a global kicker on the commit-queues alert and react to it. I do not think you should try to "rollback" blindly bur rather re-deploy either at device or service level.