<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:00:01 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>[GENIUS-138] Improve Datastore Cluster diagstatus to indicate if node is currently an isolated leader</title>
                <link>https://jira.opendaylight.org/browse/GENIUS-138</link>
                <project id="10126" key="GENIUS">genius</project>
                    <description>&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; in private internal email asked&#160;this re.&#160;new /diagstatus from&#160;&lt;del&gt;&lt;a href=&quot;https://jira.opendaylight.org/browse/INFRAUTILS-33&quot; title=&quot;Expose ready and/or diagstatus via a non-authenticated URL&quot; class=&quot;issue-link&quot; data-issue-key=&quot;INFRAUTILS-33&quot;&gt;&lt;del&gt;INFRAUTILS-33&lt;/del&gt;&lt;/a&gt;&lt;/del&gt;&#160;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Would it be possible for the endpoint to also reveal if the node was an isolated leader?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I&apos;m personally not familiar enough with clustering implementation details yet, but assuming that this information is available somewhere in controller, and hopefully already exposed by its JMX bean/s, then it may not be hard to improve our &lt;a href=&quot;https://github.com/opendaylight/genius/blob/master/mdsalutil/mdsalutil-impl/src/main/java/org/opendaylight/genius/mdsalutil/diagstatus/internal/DatastoreServiceStatusProvider.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;org.opendaylight.genius.mdsalutil.diagstatus.internal.DatastoreServiceStatusProvider&lt;/a&gt; to report a &lt;tt&gt;ServiceDescriptor&lt;/tt&gt; in &lt;tt&gt;ServiceState.ERROR&lt;/tt&gt; if it&apos;s an isolated leader?&lt;/p&gt;</description>
                <environment></environment>
        <key id="29959">GENIUS-138</key>
            <summary>Improve Datastore Cluster diagstatus to indicate if node is currently an isolated leader</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</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="vorburger">Michael Vorburger</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 May 2018 14:21:08 +0000</created>
                <updated>Mon, 2 Jul 2018 10:38:35 +0000</updated>
                            <resolved>Mon, 2 Jul 2018 10:38:35 +0000</resolved>
                                                    <fixVersion>Oxygen-SR3</fixVersion>
                    <fixVersion>Fluorine</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="62945" author="muthukumarank" created="Mon, 14 May 2018 17:47:07 +0000"  >&lt;p&gt;We typically use following curl commands on all 3 nodes of ODL cluster&#160;to collect the shard details.&lt;/p&gt;

&lt;p&gt;Output would be JMX output of all shards. So we need to parse &quot;RaftState&quot; attribute for each shard and&#160;RaftState&#160;can carry values - Leader, Follower as well as &quot;Isolated Leader&quot;. Output can also provide other useful information such as involuntary leader moves, log index, repl index etc.&#160;&lt;/p&gt;

&lt;p&gt;We typically use&#160;below curl commands in an external script (shell, python etc.) for either polling / for on-demand dumping using Jolokia endpoint&lt;/p&gt;

&lt;p&gt;For DS to report ERROR status, we can follow&#160;simple&#160;logic as below&lt;/p&gt;

&lt;p&gt;If RaftState of &lt;b&gt;any&lt;/b&gt; shard&#160;has value&#160;other than Leader OR Follower&#160;, then declare the entire DS (across shards) to be in ERROR state. Of course, that may not sound like a purist definition. But for all practical reasons, it should be good enough.&#160;&lt;/p&gt;

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

&lt;p&gt;For all Operational Shards&lt;/p&gt;

&lt;p&gt;=====================&lt;/p&gt;

&lt;p&gt;curl -u $jolokia_username:$jolokia_password &lt;a href=&quot;http://%24cic_node_ip_address%24jolokia_port/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://$cluster_node_ip_address:$jolokia_port/jolokia/read/org.opendaylight.controller:type=DistributedOperationalDatastore,Category=Shards,name=*&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;For all Config Shards&#160;&lt;/p&gt;

&lt;p&gt;================&lt;/p&gt;

&lt;p&gt;curl -u $jolokia_username:$jolokia_password &lt;a href=&quot;http://%24cic_node_ip_address%24jolokia_port/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://$cluster_node_ip_address:$jolokia_port/jolokia/read/org.opendaylight.controller:type=DistributedConfigDatastore,Category=Shards,name=*&lt;/a&gt;&lt;/p&gt;

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

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

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

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

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

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

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="62955" author="trozet@redhat.com" created="Tue, 15 May 2018 15:11:39 +0000"  >&lt;p&gt;Yeah, I was more specifically looking for an HTTP error code if the node is isolated leader, rather than parsing HTTP response output.&#160; Thought maybe that could be exposed with the new diagstatus.&lt;/p&gt;</comment>
                            <comment id="63334" author="vorburger" created="Wed, 6 Jun 2018 19:52:01 +0000"  >&lt;p&gt;Could I suggest that instead of piling on more untraceable black magic with typeless querying of internal MBeans from one project to another we use this issue as the opportunity to do this right and strongly typed? Either entirely move&#160;&lt;a href=&quot;https://github.com/opendaylight/genius/blob/master/mdsalutil/mdsalutil-impl/src/main/java/org/opendaylight/genius/mdsalutil/diagstatus/internal/DatastoreServiceStatusProvider.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;org.opendaylight.genius.mdsalutil.diagstatus.internal.DatastoreServiceStatusProvider&lt;/a&gt;&#160; into controller (with a dependency from controller to infrautils.diagstatus; would that be acceptable &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=tpantelis&quot; class=&quot;user-hover&quot; rel=&quot;tpantelis&quot;&gt;tpantelis&lt;/a&gt; and &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=rovarga&quot; class=&quot;user-hover&quot; rel=&quot;rovarga&quot;&gt;rovarga&lt;/a&gt; ?) OR create a real&#160;public OSGi Service API to query the required information in controller, and have&#160;genius...DatastoreServiceStatusProvider invoke that.&lt;/p&gt;</comment>
                            <comment id="63336" author="rovarga" created="Wed, 6 Jun 2018 20:34:39 +0000"  >&lt;p&gt;JMX is available locally (&lt;a href=&quot;https://docs.oracle.com/javase/1.5.0/docs/api/java/lang/management/ManagementFactory.html#getPlatformMBeanServer()&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.oracle.com/javase/1.5.0/docs/api/java/lang/management/ManagementFactory.html#getPlatformMBeanServer()&lt;/a&gt; ), no need to connect all over the place. It does not really make sense to monitor remote nodes (i.e. if the cluster does not work, why do you think you can still access that node?).&lt;/p&gt;

&lt;p&gt;As for diagstatus, I don&apos;t particularly care as long as there is equivalent information available from a single source and the framework we are going to (diagstatus) is clearly superior than the one we are leaving (JMX).&lt;/p&gt;

&lt;p&gt;If anyone disagrees, with that point, I will underline the difference in management of your typical router via CLI and SNMP &#8211; this difference comes from having two disjoint management infrastructures, where SNMP is a second class citizen (because admins interact with the router via CLI, not through SNMP).&lt;/p&gt;</comment>
                            <comment id="63357" author="vorburger" created="Thu, 7 Jun 2018 17:15:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://lists.opendaylight.org/pipermail/controller-dev/2018-June/014404.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://lists.opendaylight.org/pipermail/controller-dev/2018-June/014404.html&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="63367" author="vorburger" created="Fri, 8 Jun 2018 13:51:30 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=MuthukumaranK&quot; class=&quot;user-hover&quot; rel=&quot;MuthukumaranK&quot;&gt;MuthukumaranK&lt;/a&gt; thanks for tips above, that was very helpful, and is now codified in &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/72797/.&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;c/72797&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=rovarga&quot; class=&quot;user-hover&quot; rel=&quot;rovarga&quot;&gt;rovarga&lt;/a&gt; thank you for your feedback above; we&apos;ll keep DatastoreServiceStatusProvider in genius; no move to controller planned (by me).&lt;/p&gt;</comment>
                            <comment id="63368" author="vorburger" created="Fri, 8 Jun 2018 14:01:21 +0000"  >&lt;p&gt;&amp;gt; instead of piling on more untraceable black magic with typeless querying of internal MBeans from one project to another&lt;br/&gt;
&amp;gt; we use this issue as the opportunity to do this right and strongly typed&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/72789/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;72789&lt;/a&gt;&#160;addresses this in a way that satisfies me.&lt;/p&gt;</comment>
                            <comment id="63456" author="vorburger" created="Thu, 14 Jun 2018 14:38:44 +0000"  >&lt;p&gt;This is now fully done, and just merged: diagstatus (whether via its CLI or /diagstatus or /jolokia URLs) will now report OPERATIONAL for the DATASTORE only if all Shards are Leaders or Followers; if they are in other states (which presumably includes an &lt;em&gt;isolated leader&lt;/em&gt;; the original requirement above), the status will be ERROR and the Description will provide details. Took a couple of things to get this, see &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/q/topic:GENIUS-138&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;topic:GENIUS-138&lt;/a&gt;.&#160;&lt;/p&gt;</comment>
                            <comment id="63542" author="vorburger" created="Wed, 20 Jun 2018 10:43:18 +0000"  >&lt;p&gt;Re-opening this for backporting to Oxygen SR3 (requested by &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;)...&lt;/p&gt;</comment>
                            <comment id="63548" author="vorburger" created="Wed, 20 Jun 2018 11:18:37 +0000"  >&lt;p&gt;&amp;gt; Re-opening this for backporting to Oxygen SR3 (requested by&#160;&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;)...&lt;/p&gt;

&lt;p&gt;which would only really be useful if we also back-port&#160;&lt;a href=&quot;https://jira.opendaylight.org/browse/INFRAUTILS-33&quot; title=&quot;Expose ready and/or diagstatus via a non-authenticated URL&quot; class=&quot;issue-link&quot; data-issue-key=&quot;INFRAUTILS-33&quot;&gt;&lt;del&gt;INFRAUTILS-33&lt;/del&gt;&lt;/a&gt; ...&lt;/p&gt;</comment>
                            <comment id="63837" author="faseela.k@ericsson.com" created="Mon, 2 Jul 2018 06:12:58 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=vorburger&quot; class=&quot;user-hover&quot; rel=&quot;vorburger&quot;&gt;vorburger&lt;/a&gt; : Merged all the patches under the topic. Please double check if everything is in, and if so we can close the JIRA&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="28813">NETVIRT-1003</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="30107">INFRAUTILS-43</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="30115">CONTROLLER-1835</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|i03eif:</customfieldvalue>

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