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

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

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

Everyone's tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

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

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
Cisco Employee

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

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.

Beginner

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

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?

Cisco Employee

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

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