[NETCONF-721] Running an edit-config through ODL Netconf? Created: 27/Aug/20  Updated: 02/May/23

Status: Open
Project: netconf
Component/s: netconf
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Eric Sender Assignee: Robert Varga
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:
  • libnetconf2 v1.1.26
  • libyang v1.0.184
  • netopeer2 v1.1.39
  • sysrepo v1.4.70
  • ODL v0.11.0 (Sodium)
  • ODL Features:
  • service-wrapper
  • odl-restconf
  • odl-mdsal-apidocs
  • odl-openflowplugin-flow-services-rest
  • odl-openflowplugin-app-table-miss-enforcer
  • odl-openflowplugin-nxm-extensions
  • odl-openflowplugin-flow-services
  • odl-netconf-all

 


Attachments: File [NETCONF-721] Steps to reproduce.odt     Zip Archive files721.zip    
Issue Links:
Relates
relates to NETCONF-722 Possibly errors in yang file? Open

 Description   

I'm not sure if my issue here is 100% related to OpenDaylight because there are a few aspects to our stack, however our main goal is How to run an Edit-Config netconf command through SSH into OpenDaylight?

 

To try to accomplish this, I am using netopeer2-cli to create an ssh connection to opendaylight netconf connection.

 

First, I am not sure if this is a separate issue or part of the problem, but when I establish a connection to opendaylight via port 2830, I see a series of errors related to libyang:

 

> connect --ssh --login admin --port 2830
The authenticity of the host 'localhost' cannot be established.
ssh-rsa key fingerprint is ee:ee:a3:97:e3:76:44:17:09:00:c4:55:67:f6:f3:28:d1:b1:7c:1e.
Are you sure you want to continue connecting (yes/no)? yes
Password authentication{{Password: }}
ly WARNING: Missing status in deprecated subtree (/opendaylight-queue-types:{grouping}[queue-prop-min-rate]/common-queue), inheriting.
ly WARNING: Missing status in deprecated subtree (/opendaylight-queue-types:{grouping}[queue-prop-min-rate]/rate), inheriting.
truncated
ly ERROR: Missing keyword "key" as a child to "list". (/network-topology:network-topology/topology/node/opendaylight-topology-view:original-node)
ly WARNING: Missing status in deprecated subtree (/opendaylight-inventory:{grouping}[node]/id), inheriting.
ly WARNING: Missing status in deprecated subtree (/opendaylight-inventory:{grouping}[node]/node-connector), inheriting.
truncated
ly ERROR: Module "opendaylight-meter-types" parsing failed.
ly ERROR: Importing "opendaylight-meter-types" module into "opendaylight-flow-types" failed.
ly ERROR: Importing "opendaylight-port-types" module into "flow-node-inventory" failed.
ly ERROR: Missing keyword "key" as a child to "list". (/openflow-instruction:instruction-container/instruction-choice/write-actions-case/write-actions/action)
ly ERROR: Module "openflow-instruction" parsing failed.
truncated
ly ERROR: Importing "opendaylight-flow-types" module into "opendaylight-table-types" failed.
ly ERROR: Module "opendaylight-table-types" parsing failed.
ly ERROR: Importing "opendaylight-table-types" module into "sal-table" failed.

 

Here is the result of a `get-config` command:

> get-config --source=running
DATA
<upgrade-config xmlns="urn:opendaylight:serviceutils:upgrade">
{{ <upgradeInProgress>false</upgradeInProgress>}}
</upgrade-config>

 

So, the `ly` errors may be part of the problem or a separate issue. That said, when I try to connect to netconf via pure SSH, I get disconnected after 20 seconds:

 

$ ssh -p 2830 admin@localhost -s netconf
Password authentication
{{Password: }}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults?module=ietf-netconf-with-defaults&revision=2011-06-01</capability>
<capability>urn:opendaylight:openflowplugin:extension:general?module=openflowplugin-extension-general&revision=2014-07-14</capability>
truncated
<capability>urn:opendaylight:l2:types?module=opendaylight-l2-types&revision=2013-08-27</capability>
</capabilities>
<session-id>2</session-id>
</hello>
]]>]]>

 

Connection aside, when I do try to run 

 

> edit-config --target=running --config=/vagrant/odl-rmbn-reset.xml
ly ERROR: Failed to find "running" as a sibling to "ietf-netconf:config-target".
cli_send_recv: Failed to send the RPC.

 

So, the error that concerns me is Failed to find "running" as a sibling to "ietf-netconf:config-target". This tells me that running an edit-config doesn't work because odl-netconf-mdsal can't find the running configuration.

 

So to simplify my question:

How does one run an edit-config against the running or candidate config in OpenDaylight?

 

 



 Comments   
Comment by Robert Varga [ 02/May/23 ]

Hmm... opendaylight-topology-view is something we ditched quite a while ago. It seems you are hitting strict validation of YANG models on the side of netopeer2-cli – ODL can support YANG models which have 'list' statements without 'key' statement and 'config true' – which is beyond the YANG spec.

Generated at Wed Feb 07 20:15:44 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.