Discussion:
[j-nsp] Comparison strangeness with annotations
Per Westerlund
2017-07-01 13:35:31 UTC
Permalink
Hi all!

Normally, when comparing current and previous configurations on
Junos-boxes, I assume I get the same results when running in operational
mode as when running in configuration mode. I didn't even think there
could be a difference.

The other day, when we were having some problems with SPACE and
annotations, I suddenly noticed that there is a difference. When there
is a difference in an annotation, it is shown while running in
configuration mode, but not when compared form operational mode. See
this example from my lab:


***@srx4# show | compare rollback 1
[edit routing-options static]
+ /* Test of annotate 1 */
route 192.168.52.0/24 { ... }

[edit]
***@srx4# quit
Exiting configuration mode

***@srx4> show system rollback compare 1 0
[edit routing-options static]
route 192.168.52.0/24 { ... }



When comparing from operational mode, what you get is: "There is a
difference, but we will not show what it is".


Has this difference in behaviour always been there? Bug or feature?



/Per
_______________________________________________
juniper-nsp mailing list juniper-***@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Per Westerlund
2017-07-04 17:58:51 UTC
Permalink
Sorry about not providing version information. I have now verified this
on a few more systems (below) and repose my question about the
difference between operational and configuration mode: bug or feature?

/Per


Example 1:

***@srx4# show | compare rollback 1
[edit routing-options static]
+ /* Test of annotate 1 */
route 192.168.52.0/24 { ... }

[edit]
***@srx4# quit
Exiting configuration mode

***@srx4> show system rollback compare 1 0
[edit routing-options static]
route 192.168.52.0/24 { ... }

***@srx4> show version
Hostname: srx4
Model: srx100b
JUNOS Software Release [12.1X45-D10]



Example 2:

{primary:node0}
***@514a-lab> show version
node0:
--------------------------------------------------------------------------
Hostname: 514a-lab
Model: firefly-perimeter
JUNOS Software Release [12.1X47-D40.1]

{primary:node0}
***@514a-lab> show system rollback compare 1 0
[edit interfaces lo0 unit 1 family inet]
address 10.170.20.46/32 { ... }

{primary:node0}
***@514a-lab> configure
warning: Clustering enabled; using private edit
warning: uncommitted changes will be discarded on exit
Entering configuration mode

{primary:node0}[edit]
***@514a-lab# show | compare rollback 1
[edit interfaces lo0 unit 1 family inet]
+ /* Annotation visibility test */
address 10.170.20.46/32 { ... }


Example 3:

{primary:node0}
***@10a-lab> show version
node0:
--------------------------------------------------------------------------
Hostname: 10a-lab
Model: srx5800
JUNOS Software Release [12.3X48-D45.6]

node1:
--------------------------------------------------------------------------
Hostname: 10b-lab
Model: srx5800
JUNOS Software Release [12.3X48-D45.6]

{primary:node0}
***@10a-lab> show system rollback compare 1 0
[edit routing-options static]
route 0.0.0.0/0 { ... }

{primary:node0}
***@10a-lab> configure
warning: Clustering enabled; using private edit
warning: uncommitted changes will be discarded on exit
Entering configuration mode

{primary:node0}[edit]
***@10a-lab# show | compare rollback 1
[edit routing-options static]
+ /* Annotation test */
route 0.0.0.0/0 { ... }
Post by Per Westerlund
Hi all!
Normally, when comparing current and previous configurations on
Junos-boxes, I assume I get the same results when running in
operational mode as when running in configuration mode. I didn't even
think there could be a difference.
The other day, when we were having some problems with SPACE and
annotations, I suddenly noticed that there is a difference. When there
is a difference in an annotation, it is shown while running in
configuration mode, but not when compared form operational mode. See
[edit routing-options static]
+ /* Test of annotate 1 */
route 192.168.52.0/24 { ... }
[edit]
Exiting configuration mode
[edit routing-options static]
route 192.168.52.0/24 { ... }
When comparing from operational mode, what you get is: "There is a
difference, but we will not show what it is".
Has this difference in behaviour always been there? Bug or feature?
/Per
_______________________________________________
https://puck.nether.net/mailman/listinfo/juniper-nsp
/Per
_______________________________________________
juniper-nsp mailing list juniper-***@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
Phil Shafer
2017-07-04 22:18:32 UTC
Permalink
Post by Per Westerlund
Sorry about not providing version information. I have now verified this
on a few more systems (below) and repose my question about the
difference between operational and configuration mode: bug or feature?
Bug:

[edit]
***@cli# annotate system "one"

[edit]
***@cli# commit
commit complete

[edit]
***@cli# show | compare rollback 1
[edit]
+ /* one */
system { ... }

[edit]
***@cli# quit
Exiting configuration mode

***@cli> show system rollback compare 0 1
[edit]
system { ... }

Not sure why "show system rollback" is turning off the "compare
comments" flag, but, well, it is. Please have your AM open a PR
on this, or let me know and I'll open one directly.

FWIW: "show configuration" gets this right:

***@cli> show configuration | compare rollback 1
[edit]
+ /* one */
system { ... }

Thanks,
Phil
_______________________________________________
juniper-nsp mailing list juniper-***@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp

Loading...