<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:13:59 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[NETCONF-31] Improve error reporting when controller-config mount operation fails</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-31</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;After a new netconf connector config is POSTED, you can&apos;t update it via restconf  (nor DELETE or GET). With POST you get &quot;data already exists&quot;, which makes sense since POST is create-if-not-exists (although this erroneously worked in Helium). &lt;/p&gt;

&lt;p&gt;PUT with, eg, the following URL:&lt;/p&gt;

&lt;p&gt;  &lt;a href=&quot;http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/new-netconf-device&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/new-netconf-device&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;should work but fails with error:&lt;/p&gt;

&lt;p&gt;  &quot;odl-sal-netconf-connector-cfg:sal-netconf-connector from URI can&apos;t be resolved. For key which is of type identityref it should be in format module_name:identity_name.&quot;&lt;/p&gt;

&lt;p&gt;Clearly &quot;odl-sal-netconf-connector-cfg:sal-netconf-connector&quot; is in the correct format.&lt;/p&gt;

&lt;p&gt;The problem is in RestCodec.ObjectCodec#deserialize:&lt;/p&gt;

&lt;p&gt;  if (type instanceof IdentityrefTypeDefinition) {&lt;br/&gt;
      if (input instanceof IdentityValuesDTO) &lt;/p&gt;
{
          return identityrefCodec.deserialize(maybeIdentityref);
      }

&lt;p&gt;      logger.debug(&quot;Value is not instance of IdentityrefTypeDefinition but is {}. Therefore NULL is used as translation of  - {}&quot;,&lt;br/&gt;
           input == null ? &quot;null&quot; : input.getClass(), String.valueOf(input));&lt;br/&gt;
      return null;&lt;br/&gt;
  }&lt;/p&gt;

&lt;p&gt;It expects the &apos;input&apos; value to be of type IdentityValuesDTO but it&apos;s a String. In fact the calling code in ControllerContext#addKeyValue specifically treats the value as a String. So there&apos;s a disconnect between ControllerContext and RestCodec.ObjectCodec. I&apos;m not sure what the intent is here, ie who is supposed to parse the identityref string into an IdentityValuesDTO instance.&lt;/p&gt;

&lt;p&gt;I locally changed ObjectCodec#deserialize to check for instanceof String and parse into an IdentityValuesDTO. This fixed the problem.&lt;/p&gt;

&lt;p&gt;Note: with this bug no config module can be updated via restconf, including OOB ones.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="21044">NETCONF-31</key>
            <summary>Improve error reporting when controller-config mount operation fails</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="tpantelis">Tom Pantelis</assignee>
                                    <reporter username="tpantelis">Tom Pantelis</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Jun 2015 12:18:06 +0000</created>
                <updated>Fri, 15 Mar 2019 22:22:11 +0000</updated>
                            <resolved>Tue, 24 Nov 2015 10:05:45 +0000</resolved>
                                                                    <component>netconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="38809" author="tpantelis" created="Fri, 19 Jun 2015 12:19:18 +0000"  >&lt;p&gt;This might be a Lithium blocker.&lt;/p&gt;</comment>
                            <comment id="38810" author="tpantelis" created="Fri, 19 Jun 2015 15:24:53 +0000"  >&lt;p&gt;OK - now I&apos;m confused. I realized there&apos;s another code path in ControllerContext#addKeyValue to handle identityrefs:&lt;/p&gt;

&lt;p&gt;  Object decoded = codec.deserialize(urlDecoded);&lt;br/&gt;
  String additionalInfo = &quot;&quot;;&lt;br/&gt;
  if (decoded == null) {&lt;br/&gt;
      if ((baseType instanceof IdentityrefTypeDefinition)) &lt;/p&gt;
{
         decoded = toQName(urlDecoded);
         additionalInfo = &quot;For key which is of type identityref it should be in format module_name:identity_name.&quot;;
      }
&lt;p&gt;  }&lt;/p&gt;

&lt;p&gt;So it simply parses the QName from the colon-separated string which is basically what I did in my changes.&lt;/p&gt;

&lt;p&gt;I removed my changes and now this code path works. I don&apos;t know why I was getting the error before.&lt;/p&gt;

&lt;p&gt;However, if you do a PUT with partial payload as outlined in &lt;a href=&quot;https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Examples:Netconf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Examples:Netconf&lt;/a&gt;, it fails with 500 code but no error output or exception.&lt;/p&gt;</comment>
                            <comment id="38811" author="tpantelis" created="Fri, 19 Jun 2015 15:34:05 +0000"  >&lt;p&gt;Actually there is an error:&lt;/p&gt;

&lt;p&gt;2015-06-19 07:11:40,424 | WARN  | entLoopGroup-2-2 | ConfigTransactionControllerImpl  | 333 | 189 - org.opendaylight.controller.config-manager - 0.3.0.SNAPSHOT |  | Validation exception in ConfigTransaction-44-67&lt;br/&gt;
org.opendaylight.controller.config.api.JmxAttributeValidationException: DomRegistry is null, expected dependency implementing interface org.opendaylight.controller.config.yang.md.sal.dom.BrokerServiceInterface&lt;br/&gt;
        at org.opendaylight.controller.config.api.JmxAttributeValidationException.checkNotNull(JmxAttributeValidationException.java:65)&lt;br/&gt;
        at org.opendaylight.controller.config.manager.impl.dependencyresolver.DependencyResolverImpl.validateDependency(DependencyResolverImpl.java:91)&lt;br/&gt;
        at org.opendaylight.controller.config.yang.md.sal.connector.netconf.AbstractNetconfConnectorModule.validate(AbstractNetconfConnectorModule.java:87)&lt;br/&gt;
        at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)&lt;br/&gt;
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.7.0_45&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at java.lang.reflect.Method.invoke(Method.java:606)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.7.0_45&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.controller.config.manager.impl.dependencyresolver.DependencyResolverManager$ModuleInvocationHandler.handleInvocation(DependencyResolverManager.java:150)&lt;br/&gt;
        at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)&lt;br/&gt;
        at com.sun.proxy.$Proxy74.validate(Unknown Source)&lt;br/&gt;
        at org.opendaylight.controller.config.manager.impl.ConfigTransactionControllerImpl.validateNoLocks(ConfigTransactionControllerImpl.java:331)&lt;br/&gt;
        at org.opendaylight.controller.config.manager.impl.ConfigTransactionControllerImpl.validateConfig(ConfigTransactionControllerImpl.java:315)&lt;/p&gt;


&lt;p&gt;Since PUT is a replace, you need to specify the entire config.&lt;/p&gt;</comment>
                            <comment id="38812" author="tpantelis" created="Sat, 20 Jun 2015 00:31:09 +0000"  >&lt;p&gt;I&apos;m going to use this bug improve the error reporting to the user. We should emit error info with the 500 response.&lt;/p&gt;</comment>
                            <comment id="38813" author="rovarga" created="Fri, 13 Nov 2015 12:58:46 +0000"  >&lt;p&gt;Move to NETCONF project&lt;/p&gt;</comment>
                            <comment id="38814" author="tcere" created="Tue, 24 Nov 2015 10:05:45 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/27050/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/27050/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/23043/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/23043/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3822</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=3822]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Bug]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10327"><![CDATA[Lithium-1]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10312"><![CDATA[High]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i01w13:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>