<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:33:33 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>[OPNFLWPLUG-854] Change switch mastership before starting services</title>
                <link>https://jira.opendaylight.org/browse/OPNFLWPLUG-854</link>
                <project id="10155" key="OPNFLWPLUG">OpenFlowPlugin</project>
                    <description>&lt;p&gt;DeviceContextImpl.java class is first starting services before changing mastership on the switch. This could lead to potential race conditions which controllers start sending changes before being master.&lt;/p&gt;

&lt;p&gt;I suggest that DeviceContextImpl.java should first ensure it holds the mastership to the switch and if it works start the services.&lt;/p&gt;

&lt;p&gt;So, the method&lt;/p&gt;

&lt;p&gt;public boolean onContextInstantiateService(final ConnectionContext connectionContext) {&lt;/p&gt;

&lt;p&gt;Should call following line after checking connection is not dead.&lt;/p&gt;

&lt;p&gt; Futures.addCallback(sendRoleChangeToDevice(OfpRole.BECOMEMASTER), new RpcResultFutureCallback());&lt;/p&gt;



&lt;p&gt;For example,&lt;/p&gt;



&lt;p&gt;@Override&lt;br/&gt;
    public boolean onContextInstantiateService(final ConnectionContext connectionContext) {&lt;/p&gt;

&lt;p&gt;        if (getPrimaryConnectionContext().getConnectionState().equals(ConnectionContext.CONNECTION_STATE.RIP)) {&lt;br/&gt;
            LOG.warn(&quot;Connection on device {} was interrupted, will stop starting master services.&quot;, deviceInfo.getLOGValue());&lt;br/&gt;
            return false;&lt;br/&gt;
        }&lt;/p&gt;

&lt;p&gt;        Futures.addCallback(sendRoleChangeToDevice(OfpRole.BECOMEMASTER), new RpcResultFutureCallback());&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="28122">OPNFLWPLUG-854</key>
            <summary>Change switch mastership before starting services</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</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="Avishnoi">Anil Vishnoi</assignee>
                                    <reporter username="castro.jon@gmail.com">Jon Castro</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 Feb 2017 05:36:48 +0000</created>
                <updated>Mon, 27 Sep 2021 09:01:59 +0000</updated>
                            <resolved>Mon, 11 Jun 2018 16:21:58 +0000</resolved>
                                                    <fixVersion>Oxygen</fixVersion>
                                    <component>clustering</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="58679" author="castro.jon@gmail.com" created="Tue, 14 Feb 2017 06:32:58 +0000"  >&lt;p&gt;Currently, DeviceContextImpl starts first services which implies many openflow messages being sent to the switch like get ports configuration etc. &lt;/p&gt;

&lt;p&gt;Some switches might not behave properly in slave mode. &lt;/p&gt;

&lt;p&gt;Chaning the order as suggested by this bug will ensure that the controller owns mastership before sending any type of message.&lt;/p&gt;</comment>
                            <comment id="58680" author="jozef.bacigal@pantheon.tech" created="Fri, 12 May 2017 10:21:47 +0000"  >&lt;p&gt;Actually is there some issue or should this be as an improvement. &lt;/p&gt;

&lt;p&gt;But you should check actual code on carbon/nitrogen branch. Many has been changed.&lt;/p&gt;</comment>
                            <comment id="63391" author="vishnoianil@gmail.com" created="Mon, 11 Jun 2018 16:21:58 +0000"  >&lt;p&gt;It&apos;s already fixed in nitrogen/oxygen/Fluorine&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>7788</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=7788]]></customfieldvalue>

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

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

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