<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:14:46 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-341] Return status code 503 instead of 404 when a mountpoint is not mounted</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-341</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;Currently the returned status code is 404, which callers might understand as a confirmation that the resource is not present in the mounted datastore. But the resource might be in fact present in the datastore, just ODL cannot access the datastore this time.&lt;/p&gt;

&lt;p&gt;This distinction is important for CSIT to distinguish transient instability (for example in cluster High Availability testing) from really missing data.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="21354">NETCONF-341</key>
            <summary>Return status code 503 instead of 404 when a mountpoint is not mounted</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="IaroslavK">Iaroslav Kholiavko</assignee>
                                    <reporter username="vrpolak">Vratko Polak</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Jan 2017 13:25:48 +0000</created>
                <updated>Sun, 21 Feb 2021 11:28:39 +0000</updated>
                            <resolved>Sun, 21 Feb 2021 11:28:39 +0000</resolved>
                                                    <fixVersion>1.13.0</fixVersion>
                                    <component>restconf-nb</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="39784" author="tcere" created="Thu, 12 Oct 2017 10:50:21 +0000"  >&lt;p&gt;I don&apos;t think there&apos;s any way to distinguish between these 2 cases. From restconf POV the mountpoint either is in the MountPointService or it&apos;s not. There&apos;s no way to tell whether some southbound plugin is configured to connect to a device and the mountpoint is temporarily unavailable.&lt;/p&gt;</comment>
                            <comment id="64800" author="rovarga" created="Mon, 27 Aug 2018 21:37:34 +0000"  >&lt;p&gt;503 reflect the status of the resource: it is not available.&lt;/p&gt;</comment>
                            <comment id="64821" author="vrpolak" created="Tue, 28 Aug 2018 08:40:14 +0000"  >&lt;p&gt;&amp;gt; 503 reflect the status of the resource:&lt;/p&gt;

&lt;p&gt;Do you mean &quot;404&quot;?&lt;/p&gt;

&lt;p&gt;&amp;gt;  it is not available.&lt;/p&gt;

&lt;p&gt;Do you mean &quot;not found&quot;?&lt;/p&gt;

&lt;p&gt;I would understand if ODL removed the mountpoint when there is a problem accessing it (so 404 will be correct as the device is no longer mounted), but that was not what was happening in cluster tests, if I recall correctly.&lt;/p&gt;</comment>
                            <comment id="64822" author="rovarga" created="Tue, 28 Aug 2018 08:49:51 +0000"  >&lt;p&gt;Sorry, my mistage, I misunderstood the headline.&lt;/p&gt;</comment>
                            <comment id="68624" author="vrpolak" created="Fri, 18 Sep 2020 13:13:42 +0000"  >&lt;p&gt;Iaroslav notified me the current behavior is status code 409 Conflict, with:&lt;br/&gt;
  &quot;error-type&quot;: &quot;protocol&quot;&lt;br/&gt;
  &quot;error-tag&quot;:&quot;data-missing&quot;&lt;br/&gt;
  &quot;error-message&quot;:Mount point does not exist.&quot;&lt;/p&gt;

&lt;p&gt;Here is my response, which I started to writes as a personal message, but then decided to put is here so it is tracked properly:&lt;/p&gt;

&lt;p&gt;Hmm, 4xx codes look better than 5xx codes, as it is (presumably) not ODL&apos;s fault the device is not connected yet.&lt;br/&gt;
Looking at &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_HTTP_status_codes&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://en.wikipedia.org/wiki/List_of_HTTP_status_codes&lt;/a&gt;&lt;br/&gt;
I see &quot;404 Not Found&quot; and &quot;410 Gone&quot;, but in this situations we could use a code that says something like &quot;Not Arrived Yet&quot;. I think &quot;409 Conflict&quot; does not really reflect the situation.&lt;br/&gt;
Maybe 404 is the best fit from the available codes, as the mount point is not created yet, so it is not found.&lt;br/&gt;
A compromise could be to keep 404, but change error-message to &quot;Device not connected.&quot; or similar.&lt;br/&gt;
Mainly because 503 refers to the state of the whole service (in this case restconf or netconf), so users may get a wrong impression. Especially non-human ones that do not comprehend error-message.&lt;/p&gt;</comment>
                            <comment id="68629" author="JIRAUSER13135" created="Mon, 21 Sep 2020 08:08:52 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=vrpolak&quot; class=&quot;user-hover&quot; rel=&quot;vrpolak&quot;&gt;vrpolak&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;As I see in code: org/opendaylight/restconf/common/errors/RestconfError.java:115&lt;/p&gt;

&lt;p&gt;This status code 409 was decided to use&#160;instead of 404 during discussions here: &lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-682&quot; title=&quot;RFC8040 compliance - wrong URI returns incorrect HTTP status&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETCONF-682&quot;&gt;&lt;del&gt;NETCONF-682&lt;/del&gt;&lt;/a&gt;. And it is general behavior of restconf.&#160;&lt;/p&gt;

&lt;p&gt;Also it is deprecated API. So I would prefer to leave as it.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Any way, according to existing code you can switch 409 to 404 by setting this property:&#160;org.opendaylight.restconf.eid5565&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="68630" author="vrpolak" created="Mon, 21 Sep 2020 08:46:42 +0000"  >&lt;p&gt;&amp;gt; org/opendaylight/restconf/common/errors/RestconfError.java:115&lt;/p&gt;

&lt;p&gt;Thanks for the pointer. Based on that, I can restate my intent:&lt;br/&gt;
When a mountpoint is not mounted (but the corresponding device is configured, just not connected for whatever reason), the ErrorTag value should be RESOURCE_DENIED_TRANSPORT (not DATA_MISSING).&lt;/p&gt;</comment>
                            <comment id="68754" author="rovarga" created="Wed, 11 Nov 2020 11:42:54 +0000"  >&lt;p&gt;Ah, but RESTCONF obviously has no knowledge of how mountpoints come into existence, nor should it have &#8211; it can be SNMP, NETCONF, all sorts of implementations. It is just not feasible to understand that difference, as it implies a monolithic system.&lt;/p&gt;

&lt;p&gt;In request terms this maps most closely towards 502/504: we &lt;b&gt;are&lt;/b&gt; acting as a proxy, but we did not even attempt to contact the upstream server. Hence I think RESOURCE_DENIED_TRANSPORT is correct in the specific case of the mount point not being found.&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>7668</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=7668]]></customfieldvalue>

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

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

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

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