cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
102
Views
1
Helpful
2
Replies
khgrant
Cisco Employee

Check Sync Response

 

Hi folks,

 

A couple of questions:

1) How would one invoke deep check-sync for a Service or Device using CLI ?

 

2) I get the following response when running a check-sync against a device. What could be the cause of this output ?

 

admin@ncs# devices check-sync device [ NEP6SYSC04 ] supress-positive-result | details

sync-result {

    device NEP6SYSC04

    result unsupported

}

 

Thanks & Regards, 
Nick Khemani

1 ACCEPTED SOLUTION

Accepted Solutions
khgrant
Cisco Employee

 

> 2)I get the following response when running a check-sync against a

 

> device. What could be the cause of this output ?

 

>

 

> admin@ncs# devices check-sync device [ NEP6SYSC04 ]

 

> supress-positive-result | details sync-result {

 

>      device NEP6SYSC04

 

>      result unsupported

 

> }

 

>

 

> (Roque) have you performed a “sync” from/to the device? If have not

 

> done so, there is nothing against what to compare the current config

 

> and thus check-sync is “unsupported”.

 

>

 

 

 

Almost right, but not quite.

 

 

'unsupported' means that the device (or the NED) doesn't support this.

 

Some devices, like ConfD based devices it's possible to get some data which is changed for each transaction. In ConfD

 

 

show status confd-state internal cdb datastore transaction-id datastore running {

 

     transaction-id 1455-527647-994100;

 

}

 

 

 

NCS get this id (a timestamp actually) and stores it. The check-sync operation compares the id on the device and the one store4d in CDB at NCS. If equal, we're in sync.

 

 

Junipers have a timestamp in their topelevel <configuration> XML tag that we grab.

 

 

Some devices have no support for this e.g IOS, a poor replacement which has been used in the IOS NED is to let the NED code do a full 'show running' and compute a hash. This is a pretty expensive operation and not really good.

 

 

Some NEDs don't do this, and then we get the 'unsupported' output from check-sync

 

 

If we have never done sync-from towards the device, we get:

 

 

admin@ncs> request devices device ex0 check-sync result unknown

 

 

An alternative tool to use there is compare-config

 

 

admin@ncs> request devices device ex0 compare-config diff

 

  devices {

 

      device ex0 {

 

          config {

 

              r:sys {

 

                  interfaces {

 

+ interface eth0 {

 

......

 

 

 

It'll always work, and the output will be empty if we're in sync with the device.

 

 

 

/klacke

 

 

View solution in original post

2 REPLIES 2
khgrant
Cisco Employee

 

Hi Nick,

See inline

/Roque

 

1)How would one invoke deep check-sync for a Service or Device using CLI ?

 

  

(Roque) deep-check-sync is an action associated to services, so you run it as any action.

 

 

Using the mpls vpn example, it would be $request vpn l3vpn volvo deep-check-sync

 

 

There is no such thing as device “deep-check-sync” as the device is the deeper you can go… :-)

 

 

 

                   

 

(Roque) have you performed a “sync” from/to the device? If have not done so, there is nothing against what to compare the current config and thus check-sync is “unsupported”.

 

 

Regards,

 

Roque

 

 

 

khgrant
Cisco Employee

 

> 2)I get the following response when running a check-sync against a

 

> device. What could be the cause of this output ?

 

>

 

> admin@ncs# devices check-sync device [ NEP6SYSC04 ]

 

> supress-positive-result | details sync-result {

 

>      device NEP6SYSC04

 

>      result unsupported

 

> }

 

>

 

> (Roque) have you performed a “sync” from/to the device? If have not

 

> done so, there is nothing against what to compare the current config

 

> and thus check-sync is “unsupported”.

 

>

 

 

 

Almost right, but not quite.

 

 

'unsupported' means that the device (or the NED) doesn't support this.

 

Some devices, like ConfD based devices it's possible to get some data which is changed for each transaction. In ConfD

 

 

show status confd-state internal cdb datastore transaction-id datastore running {

 

     transaction-id 1455-527647-994100;

 

}

 

 

 

NCS get this id (a timestamp actually) and stores it. The check-sync operation compares the id on the device and the one store4d in CDB at NCS. If equal, we're in sync.

 

 

Junipers have a timestamp in their topelevel <configuration> XML tag that we grab.

 

 

Some devices have no support for this e.g IOS, a poor replacement which has been used in the IOS NED is to let the NED code do a full 'show running' and compute a hash. This is a pretty expensive operation and not really good.

 

 

Some NEDs don't do this, and then we get the 'unsupported' output from check-sync

 

 

If we have never done sync-from towards the device, we get:

 

 

admin@ncs> request devices device ex0 check-sync result unknown

 

 

An alternative tool to use there is compare-config

 

 

admin@ncs> request devices device ex0 compare-config diff

 

  devices {

 

      device ex0 {

 

          config {

 

              r:sys {

 

                  interfaces {

 

+ interface eth0 {

 

......

 

 

 

It'll always work, and the output will be empty if we're in sync with the device.

 

 

 

/klacke

 

 

View solution in original post

Create
Recognize Your Peers
Content for Community-Ad