Strongbeard
Strongbeard

Reputation: 69

How to remove an operational node from OpenDaylight?

I broke my installation of OpenDaylight by attempting to add a netconf server mount point. I believe that I can fix the system if I can just remove the node I added to the operational inventory (/restconf/operational/opendaylight-inventory:nodes/node/netconfserver). How can this be removed? Full details as to how I broke ODL are below.


I was trying to connect OpenDaylight to a netconf server by following the example OpenDaylight Controller:Config:Examples:Netconf. I sent the below curl request to a running opendaylight server:

curl -v -X POST -H "Content-Type:application/xml" -T ./mount_netconfserver.xml -u admin:admin http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules

mount_netconfserver.xml:

<snapshot>
 <configuration>
  <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
   <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
    <module>
     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">prefix:sal-netconf-connector</type>
     <name>netconf_server</name>
     <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">8181</port>
     <username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">admin</username>
     <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">*address_removed_for_privacy*</address>
     <tcp-only xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">false</tcp-only>
     <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">admin</password>
     <event-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
      <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">prefix:netty-event-executor</type>
      <name>global-event-executor</name>
     </event-executor>
     <binding-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
      <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-broker-osgi-registry</type>
      <name>binding-osgi-broker</name>
     </binding-registry>
     <dom-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
      <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-broker-osgi-registry</type>
      <name>dom-broker</name>
     </dom-registry>
     <client-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
      <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf">prefix:netconf-client-dispatcher</type>
      <name>global-netconf-dispatcher</name>
     </client-dispatcher>
     <processing-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
      <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:threadpool</type>
      <name>global-netconf-processing-executor</name>
     </processing-executor>
    </module>
   </modules>
  </data>
 </configuration>
 <required-capabilities>
  <![CDATA[urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf?module=odl-sal-netconf-connector-cfg&revision=2013-10-28]]>
 </required-capabilities>
</snapshot>

Afterwards, OpenDaylight's command line started giving me this error among others, the dlux interface would become unresponsive, and the command line would start throwing null pointer exceptions if I tried to send a command. ODL will work temporarily when I restart it.

!ENTRY org.apache.oltu.oauth2.resourceserver 4 0 2015-01-13 15:53:18.047
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.io.IOException: Exception in opening zip file: /opt/distribution-karaf-0.2.1-Helium-SR1/data/cache/org.eclipse.osgi/bundles/207/1/bundlefile
    at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:291)
    ...

Upvotes: 1

Views: 1337

Answers (1)

user2918375
user2918375

Reputation: 1

Are you looking for this?

Destroying Netconf Connector While the Controller is Running

Using RESTCONF one can also destroy an instance of a module. In case of netconf connector, the module will be destroyed, netconf connection dropped and all resources will be cleaned. To do this, simply issue a DELETE request to following URL: http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/new-netconf-device

Upvotes: 0

Related Questions