Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgmtd: problem with commits #15814

Open
2 tasks done
ak503 opened this issue Apr 22, 2024 · 0 comments
Open
2 tasks done

mgmtd: problem with commits #15814

ak503 opened this issue Apr 22, 2024 · 0 comments
Labels
triage Needs further investigation

Comments

@ak503
Copy link
Contributor

ak503 commented Apr 22, 2024

Description

I have simple config:

ip route 1.2.3.4/32 192.168.1.1

After # mgmt save-config running /tmp/frr.rc I getting file frr.rc:

{
  "frr-routing:routing": {
    "control-plane-protocols": {
      "control-plane-protocol": [
        {
          "type": "frr-staticd:staticd",
          "name": "staticd",
          "vrf": "default",
          "frr-staticd:staticd": {
            "route-list": [
              {
                "prefix": "1.2.3.4/32",
                "afi-safi": "frr-routing:ipv4-unicast",
                "path-list": [
                  {
                    "table-id": 0,
                    "distance": 1,
                    "frr-nexthops": {
                      "nexthop": [
                        {
                          "nh-type": "ip4",
                          "vrf": "default",
                          "gateway": "192.168.1.1",
                          "interface": "(null)"
                        }
                      ]
                    }
                  }
                ]
              }
            ]
          }
        }
      ]
    }
  },
  "frr-vrf:lib": {
    "vrf": [
      {
        "name": "default"
      }
    ]
  }
}

But after loading this conf-file on empty configuration I have problems:

# configure terminal file-lock 
(config)# mgmt load-config /tmp/frr.rc replace
(config)# mgmt commit check
ERROR: COMMIT_CONFIG request failed, Error: YANG error(s):
 Path: Data location "/ietf-yang-schema-mount:schema-mounts".
 Error: Unexpected data state node "schema-mounts" found.
 Path: Data location "/frr-vrf:lib/vrf[name='default']/state".
 Error: Unexpected data state node "state" found.
 Path: Data location "/frr-vrf:lib/vrf[name='default']/state/active".
 Error: Unexpected data state node "active" found.
 Path: Data location "/frr-vrf:lib/vrf[name='default']/frr-zebra:zebra/ribs".
 Error: Unexpected data state node "ribs" found.
 Path: Data location "/frr-zebra:zebra/state".
 Error: Unexpected data state node "state" found.

On frr-9.1 in is not reproduced

Version

FRRouting 10.0 (host) on Linux(5.10.208).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
    '--target=x86_64-buildroot-linux-gnu' '--host=x86_64-buildroot-linux-gnu' '--build=x86_64-pc-linux-gnu' '--prefix=/usr' '--exec-prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--program-prefix=' '--disable-gtk-doc' '--disable-gtk-doc-html' '--disable-docs' '--disable-documentation' '--with-xmlto=no' '--with-fop=no' '--disable-dependency-tracking' '--enable-ipv6' '--enable-nls' '--disable-static' '--enable-shared' '--with-clippy=/br/output/host.d/host/bin/clippy' '--sysconfdir=/rw/config/frr' '--localstatedir=/var/run/frr' '--with-moduledir=/usr/lib/frr/modules' '--enable-configfile-mask=0640' '--enable-logfile-mask=0640' '--enable-multipath=256' '--disable-config-rollbacks' '--disable-ospfclient' '--enable-shell-access' '--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--enable-fpm' '--enable-snmp=agentx' '--disable-doc' '--disable-babeld' '--disable-fabricd' '--disable-eigrpd' '--disable-pbrd' '--disable-vrrpd' '--disable-pimd' '--disable-pathd' '--disable-bgp-bmp' '--disable-nhrpd' '--enable-capabilities' '--disable-zeromq' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-buildroot-linux-gnu' 'target_alias=x86_64-buildroot-linux-gnu' 'AR=/br/output/host.d/host/bin/x86_64-linux-gcc-ar' 'LD=/br/output/host.d/host/bin/x86_64-linux-ld' 'OBJCOPY=/br/output/host.d/host/bin/x86_64-linux-objcopy' 'OBJDUMP=/br/output/host.d/host/bin/x86_64-linux-objdump' 'RANLIB=/br/output/host.d/host/bin/x86_64-linux-gcc-ranlib' 'STRIP=/br/output/host.d/host/bin/x86_64-linux-strip' 'PKG_CONFIG=/br/output/host.d/host/bin/pkg-config' 'CC=/br/output/host.d/host/bin/x86_64-linux-gcc' 'LDFLAGS=' 'LIBS=-latomic' 'CPP=/br/output/host.d/host/bin/x86_64-linux-cpp' 'CXX=/br/output/host.d/host/bin/x86_64-linux-g++'

How to reproduce

  1. create config:
ip route 1.2.3.4/32 192.168.1.1
  1. save to file via mgmtd:
# mgmt save-config running /tmp/frr.rc
  1. run frr with empty config
  2. load config from file /tmp/frr.rc via mgmtd:
# configure terminal file-lock
(config)# mgmt load-config /tmp/frr.rc replace
  1. check commit (or apply):
(config)# mgmt commit check

Expected behavior

no error

Actual behavior

# configure terminal file-lock 
(config)# mgmt load-config /tmp/frr.rc replace
(config)# mgmt commit check
ERROR: COMMIT_CONFIG request failed, Error: YANG error(s):
 Path: Data location "/ietf-yang-schema-mount:schema-mounts".
 Error: Unexpected data state node "schema-mounts" found.
 Path: Data location "/frr-vrf:lib/vrf[name='default']/state".
 Error: Unexpected data state node "state" found.
 Path: Data location "/frr-vrf:lib/vrf[name='default']/state/active".
 Error: Unexpected data state node "active" found.
 Path: Data location "/frr-vrf:lib/vrf[name='default']/frr-zebra:zebra/ribs".
 Error: Unexpected data state node "ribs" found.
 Path: Data location "/frr-zebra:zebra/state".
 Error: Unexpected data state node "state" found.

Additional context

on frr 9.1 after this steps i can apply config without problems

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@ak503 ak503 added the triage Needs further investigation label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs further investigation
Projects
None yet
Development

No branches or pull requests

1 participant