[CONTROLLER-465] configuration rendered invalid Created: 12/May/14  Updated: 25/Jul/23  Resolved: 21/May/14

Status: Resolved
Project: controller
Component/s: netconf
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Martin Volf Assignee: Tomas Olvecky
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Issue Links:
Blocks
blocks CONTROLLER-290 Milestone: config and netconf bugfixing Resolved
blocks CONTROLLER-469 sal-netconf-connector fails when inst... Resolved
blocks CONTROLLER-470 IllegalStateException: Routing table ... Resolved
External issue ID: 992

 Description   

Getting configuration using Netconf renders invalid data - for instance, a message like

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<get-config>
<source>
<running/>
</source>
</get-config>
</rpc>

yields a configuration containing among others

<module>
<prefix:type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:logback:config">prefix:logback</prefix:type>
<prefix:name xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:logback:config">singleton</prefix:name>
....
</module>

Note the namespace of the "type" and "name" elements - I believe it should belong to the config module, not config-logging.

Likely related is that the file controller.currentconfig.xml created in case of a configuration change is invalid as well, and as a result, starting ODL generates:

Exception in thread "config-pusher" java.lang.IllegalStateException: Failed to send edit-config for configuration ....
at org.opendaylight.controller.netconf.persist.impl.ConfigPusher.sendRequestGetResponseCheckIsOK(ConfigPusher.java:245)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusher.pushConfig(ConfigPusher.java:196)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusher.pushConfigWithConflictingVersionRetries(ConfigPusher.java:88)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusher.pushConfigs(ConfigPusher.java:69)
at org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPersisterActivator$InnerCustomizer$1.run(ConfigPersisterActivator.java:156)
at java.lang.Thread.run(Thread.java:744)
Caused by: NetconfDocumentedException{message=One element type expected in XmlElement

{name='service', namespace='urn:opendaylight:params:xml:ns:yang:controller:config'}

, errorType=application, errorTag=invalid_value, errorSeverity=error, errorInfo={}}
at org.opendaylight.controller.netconf.util.xml.XmlElement.getOnlyChildElement(XmlElement.java:239)
at org.opendaylight.controller.netconf.confignetconfconnector.mapping.config.Services.fromXml(Services.java:92)
....



 Comments   
Comment by Tomas Olvecky [ 14/May/14 ]

Thanks for report, proposing fix
https://git.opendaylight.org/gerrit/#/c/6993/

Generated at Wed Feb 07 19:53:05 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.