cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
628
Views
0
Helpful
3
Replies

Cisco-IOS-XR-infra-dumper-cfg causing error

Iman1
Level 1
Level 1

Hi

Device (VC04) is IOS-XR 6.1.3.

admin@ncs> request devices device vc04 sync-from dry-run

cli  config {

          infra-infra-clock-cfg:clock {

     +        time-zone {

     +            time-zone-name MST;

     +            hour-offset -6;

     +            minute-offset 0;

     +        }

          }

      }

    

[ok][2018-02-20 18:00:04]

admin@ncs> request devices device vc04 sync-from       

result false

info devices device vc04 config exception choice3 : the 'must' expression "(compress and not(lower-limit) and not(higher-limit) and file-path and not(filename)) or (compress and lower-limit and higher-limit and file-path and filename)" failed

From xpath log:

20-Feb-2018::18:20:41.498 Evaluating XPath for: /devices/device[name='vc04']/config/infra-dumper-cfg:exception/choice3:

  (compress and not(lower-limit) and not(higher-limit) and file-path and not(filename)) or (compress and lower-limit and higher-limit and file-path and filename)

get_elem("/ncs:devices/device{vc04}/config/infra-dumper-cfg:exception/choice3/compress") = not_found

get_elem("/ncs:devices/device{vc04}/config/infra-dumper-cfg:exception/choice3/compress") = not_found

20-Feb-2018::18:20:41.504 XPath for: /devices/device[name='vc04']/config/infra-dumper-cfg:exception/choice3 returns false

I found the above error is related to Cisco-IOS-XR-infra-dumper-cfg.yang

Here is its choice 3 section causing the error:

    container choice3 {

      must "(compress and not(lower-limit) and not(higher-limit)"+

        " and file-path and not(filename)) or (compress and"+

        " lower-limit and higher-limit and file-path and filename)" {

        description "Describes valid combinations of leafs";

      }

      description "Preference of the dump location";

      leaf compress {

        type boolean;

        description

          "Specify 'true' to compress core files dumped on

          this path, 'false' to not compress";

      }

      leaf lower-limit {

        type uint32 {

          range "0..4";

        }

        description

          "Lower limit.  This is required if Filename is

          specified.";

      }

      leaf higher-limit {

        type uint32 {

          range "5..64";

        }

        description

          "Higher limit.  This is required if Filename is

          specified.";

      }

      leaf file-path {

        type string;

        description "Protocol and directory";

      }

      leaf filename {

        type string;

        description "Dump filename";

      }

    }

My question is, how's Cisco-IOS-XR-infra-dumper-cfg even called? There is nothing in Cisco-IOS-XR-infra-infra-clock-cfg.yang that would reference or import Cisco-IOS-XR-infra-dumper-cfg


Second question - what did go wrong?


Thanks

1 Accepted Solution

Accepted Solutions

It's quite simple. The XR team accidentally placed the must statement on a "global level". NSO would therefore evaluate it and fail on every commit, no matter what config you change. As I said, this has been fixed in newer XR versions. i would not recommend playing with NETCONF on ancient (from a NETCONF/YANG perspective) software like this. You are likely to encounter many similar issues.

View solution in original post

3 Replies 3

Jan Lindblad
Cisco Employee
Cisco Employee

This is an old XR YANG bug. If you could upgrade to some reasonably recent XR version (6.1.3 is from the bronze age when it comes to NETCONF/YANG support) this problem would go away. If that's not possible, I'd recommend editing the YANG that you use to build your NED to remove that must statement. It's not reflecting the actual device behavior anyway.

Thanks Jan.

Do you have any thoughts on my first question? ( how's Cisco-IOS-XR-infra-dumper-cfg even called? There is nothing in Cisco-IOS-XR-infra-infra-clock-cfg.yang that would reference or import Cisco-IOS-XR-infra-dumper-cfg)


basically, how are yang models relate to each other? The router has some clock stuff configs and that hits the infra-infra-clock-cfg, but there's nothing I could find in infra-infra-clock-cfg that would import/point to infra-dumper-cfg. So if I'm not missing something, there must be *some other* mechanism that brings infra-dumper-cfg into action once the infra-infra-clock-cfg is hit. How?

It's quite simple. The XR team accidentally placed the must statement on a "global level". NSO would therefore evaluate it and fail on every commit, no matter what config you change. As I said, this has been fixed in newer XR versions. i would not recommend playing with NETCONF on ancient (from a NETCONF/YANG perspective) software like this. You are likely to encounter many similar issues.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: