<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:02:07 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>[INFRAUTILS-47] diagstatus HTTP GET differs in response to HTTP HEAD</title>
                <link>https://jira.opendaylight.org/browse/INFRAUTILS-47</link>
                <project id="10129" key="INFRAUTILS">infrautils</project>
                    <description>&lt;p&gt;Diagstatus gives 200 when using HTTP GET and 418 when using HTTP HEAD. The values should be identical as the only difference between a GET and HEAD is including the message body or not. Also, they should return an error code when the node is isolated and in FAILURE state.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[root@controller-0 ~]# curl -i -X GET http://172.17.1.14:8081/diagstatus
 &amp;amp;&amp;amp; curl -i -X HEAD http://172.17.1.14:8081/diagstatus --max-time 5

HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 132

{
  &quot;timeStamp&quot;: &quot;Tue Aug 21 21:20:07 UTC 2018&quot;,
  &quot;isOperational&quot;: false,
  &quot;systemReadyState&quot;: &quot;FAILURE&quot;,
  &quot;statusSummary&quot;: []
}


HTTP/1.1 418 418
Content-Type: application/json;charset=utf-8
Content-Length: 132

curl: (28) Operation timed out after 5001 milliseconds with 0 out of 132 bytes received&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="30601">INFRAUTILS-47</key>
            <summary>diagstatus HTTP GET differs in response to HTTP HEAD</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="1" iconUrl="https://jira.opendaylight.org/images/icons/priorities/blocker.svg">Highest</priority>
                        <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="vorburger">Michael Vorburger</assignee>
                                    <reporter username="trozet">Tim Rozet</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Aug 2018 21:48:33 +0000</created>
                <updated>Tue, 4 Sep 2018 20:39:32 +0000</updated>
                            <resolved>Tue, 4 Sep 2018 20:39:32 +0000</resolved>
                                                    <fixVersion>Oxygen-SR4</fixVersion>
                    <fixVersion>Fluorine-SR1</fixVersion>
                    <fixVersion>Neon</fixVersion>
                                    <component>diagstatus</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="64715" author="vorburger" created="Wed, 22 Aug 2018 21:47:15 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=trozet&quot; class=&quot;user-hover&quot; rel=&quot;trozet&quot;&gt;trozet&lt;/a&gt; I was easily able to reproduce this &quot;hang&quot; in a local development environment like this:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;curl -i -X HEAD http://localhost:8181/diagstatus
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 1188&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which just sit there, not returning. However my &lt;tt&gt;curl&lt;/tt&gt; on Fedora 28 with &lt;tt&gt;curl --version&lt;/tt&gt; (just to be sure):&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;curl 7.59.0 (x86_64-redhat-linux-gnu) libcurl/7.59.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) libssh/0.8.1/openssl/zlib nghttp2/1.32.0
Release-Date: 2018-03-14
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL Metalink&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;also prints this interesting beauty when I issue a &lt;tt&gt;curl -i -X HEAD&lt;/tt&gt; :&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Warning: Setting custom HTTP method to HEAD with -X/--request may not work the 
Warning: way you want. Consider using -I/--head instead.&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and indeed with using &lt;tt&gt;--head&lt;/tt&gt; instead of &lt;tt&gt;-X HEAD&lt;/tt&gt;, it works for me without hanging:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;curl -i --head http://localhost:8181/diagstatus    
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 1188&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So that part of the problem (what you are showing as &lt;tt&gt;curl: (28) Operation timed out after 5001 milliseconds with 0 out of 132 bytes received&lt;/tt&gt; above) is not an ODL bug, but simply a misuse of curl, it seems.&lt;/p&gt;

&lt;p&gt;BUT it gave me a 200 not a 418.. that&apos;s very curious - and I cannot explain yet how you can get two different replies, yet. It seems impossible from the code. I&apos;ll keep digging into the code, but in the mean time please try using &lt;tt&gt;--head&lt;/tt&gt; instead of &lt;tt&gt;-X HEAD&lt;/tt&gt;. If that solves this problem for you, please do comment and close this issue?&lt;/p&gt;</comment>
                            <comment id="64717" author="vorburger" created="Wed, 22 Aug 2018 22:14:14 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=trozet&quot; class=&quot;user-hover&quot; rel=&quot;trozet&quot;&gt;trozet&lt;/a&gt; OMG you&apos;re totally right, this /diagstatus/ is totally broken! The GET indeed always returns 200 and never 418 (or 503 following&#160;&lt;a href=&quot;https://jira.opendaylight.org/browse/INFRAUTILS-46&quot; title=&quot;diagstatus error code is 418 instead of 503&quot; class=&quot;issue-link&quot; data-issue-key=&quot;INFRAUTILS-46&quot;&gt;&lt;del&gt;INFRAUTILS-46&lt;/del&gt;&lt;/a&gt;, whatever). This can also be seen if one tries it out (fast enough) just as it&apos;s still coming up... this is obviously completely wrong as well, it can&apos;t report 200 while still BOOTING and in isOperational: false :&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;curl -i -X GET http://localhost:8181/diagstatus
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 133

{
 &quot;timeStamp&quot;: &quot;Thu Aug 23 00:09:29 CEST 2018&quot;,
 &quot;isOperational&quot;: false,
 &quot;systemReadyState&quot;: &quot;BOOTING&quot;,
 &quot;statusSummary&quot;: []
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;looks like either some misunderstanding (on my part) re. the &lt;tt&gt;response.setStatus()&lt;/tt&gt; in the Java Servlet API, or a bug in the (Jetty) implementation; I&apos;m digging into it.&lt;/p&gt;</comment>
                            <comment id="64719" author="vorburger" created="Wed, 22 Aug 2018 22:58:56 +0000"  >&lt;p&gt;Figured out the problem (must use &lt;tt&gt;setStatus()&lt;/tt&gt; &lt;b&gt;before&lt;/b&gt; &lt;tt&gt;response.getWriter()&lt;/tt&gt;) - solution in code review.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="29745">INFRAUTILS-33</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03hwn:</customfieldvalue>

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