<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:22:44 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>[NETVIRT-892] neutronvpn: support of multiple subnets in one neutron network</title>
                <link>https://jira.opendaylight.org/browse/NETVIRT-892</link>
                <project id="10144" key="NETVIRT">netvirt</project>
                    <description>&lt;p&gt;1. When we add a new subnet B (IPv6) in existed neutron network N with another subnet A (IPv4), we can see following error from NeutronvpnManager.java log:&lt;/p&gt;

&lt;p&gt;2017-09-07 15:07:34,951 | ERROR | nPool-1-worker-1 | NeutronvpnManager                | 325 - org.opendaylight.netvirt.neutronvpn-impl - 0.6.0.SNAPSHOT | Trying to update non-existing subnetmap node f5f2e500-afad-4944-85c8-6ad8b431fce8 &lt;/p&gt;

&lt;p&gt;subnet A already existed in network N, when we start to add subnet B =&amp;gt; we already have a port X in our network N.&lt;/p&gt;

&lt;p&gt;root@controller-deray:~# neutron port-list&lt;br/&gt;
&lt;ins&gt;-------------------------------------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;----&lt;del&gt;&lt;ins&gt;&lt;/del&gt;-----------------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;--------------------------------------------------------------------------------------------------------+&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; id                                   &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; name &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; mac_address       &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; fixed_ips                                                                                               &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;

&lt;p&gt;&lt;ins&gt;-------------------------------------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;----&lt;del&gt;&lt;ins&gt;&lt;/del&gt;-----------------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;--------------------------------------------------------------------------------------------------------+&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; 4adc2a3b-0e6f-4c9a-ad10-cc2dac5bb8a2 &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; fa:16:3e:00:98:c1 &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; {&quot;subnet_id&quot;: &quot;bd7ab39a-3d8f-47d7-bc02-88e7b2ea8612&quot;, &quot;ip_address&quot;: &quot;10.0.0.2&quot;}                         &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; {&quot;subnet_id&quot;: &quot;f5f2e500-afad-4944-85c8-6ad8b431fce8&quot;, &quot;ip_address&quot;: &quot;2001:db8:0:2:f816:3eff:fe00:98c1&quot;} &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;

&lt;p&gt;&lt;ins&gt;-------------------------------------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;----&lt;del&gt;&lt;ins&gt;&lt;/del&gt;-----------------&lt;del&gt;&lt;/ins&gt;&lt;/del&gt;--------------------------------------------------------------------------------------------------------+&lt;/p&gt;

&lt;p&gt;Hence, ODL receives from networking_odl neutron plugin PORT-UPDATE request to update port X with new IPv6 IP --&amp;gt; NeutronPortChangeListener starts to proceed this request and finally calls nvpnManager.updateSubnetmapNodeWithPorts from NeutronvpnManager.&lt;/p&gt;

&lt;p&gt;In NeutronvpnManager.updateSubnetmapNodeWithPorts() method we try to obtain Subnetmap object for an already added new IPv6 subnet, but this object still not exist. &lt;br/&gt;
So, we pass by &quot;else-condition&quot; from this check &quot;if (sn.isPresent())..&quot;, see the method code snippet below: &lt;/p&gt;

&lt;p&gt;    protected Subnetmap updateSubnetmapNodeWithPorts(Uuid subnetId, Uuid portId, Uuid directPortId) {&lt;br/&gt;
        Subnetmap subnetmap = null;&lt;br/&gt;
        InstanceIdentifier&amp;lt;Subnetmap&amp;gt; id = InstanceIdentifier.builder(Subnetmaps.class).child(Subnetmap.class,&lt;br/&gt;
                new SubnetmapKey(subnetId)).build();&lt;br/&gt;
        try {&lt;br/&gt;
            synchronized (subnetId.getValue().intern()) {&lt;br/&gt;
                Optional&amp;lt;Subnetmap&amp;gt; sn = NeutronvpnUtils.read(dataBroker, LogicalDatastoreType.CONFIGURATION, id);&lt;br/&gt;
                if (sn.isPresent()) {&lt;br/&gt;
                    SubnetmapBuilder builder = new SubnetmapBuilder(sn.get());&lt;br/&gt;
                    if (null != portId) {&lt;br/&gt;
                        List&amp;lt;Uuid&amp;gt; portList = builder.getPortList();&lt;br/&gt;
                        if (null == portList) &lt;/p&gt;
{
                            portList = new ArrayList&amp;lt;&amp;gt;();
                        }
&lt;p&gt;                        portList.add(portId);&lt;br/&gt;
                        builder.setPortList(portList);&lt;br/&gt;
                        LOG.debug(&quot;Updating existing subnetmap node {} with port {}&quot;, subnetId.getValue(),&lt;br/&gt;
                                portId.getValue());&lt;br/&gt;
                    }&lt;br/&gt;
                    if (null != directPortId) {&lt;br/&gt;
                        List&amp;lt;Uuid&amp;gt; directPortList = builder.getDirectPortList();&lt;br/&gt;
                        if (null == directPortList) &lt;/p&gt;
{
                            directPortList = new ArrayList&amp;lt;&amp;gt;();
                        }
&lt;p&gt;                        directPortList.add(directPortId);&lt;br/&gt;
                        builder.setDirectPortList(directPortList);&lt;br/&gt;
                        LOG.debug(&quot;Updating existing subnetmap node {} with port {}&quot;, subnetId.getValue(),&lt;br/&gt;
                                directPortId.getValue());&lt;br/&gt;
                    }&lt;br/&gt;
                    subnetmap = builder.build();&lt;br/&gt;
                    SingleTransactionDataBroker.syncWrite(dataBroker, LogicalDatastoreType.CONFIGURATION, id,&lt;br/&gt;
                            subnetmap);&lt;br/&gt;
                } else {&lt;br/&gt;
                    LOG.error(&quot;Trying to update non-existing subnetmap node {} &quot;, subnetId.getValue());&lt;br/&gt;
                }&lt;br/&gt;
            }&lt;br/&gt;
        } catch (Exception e) {&lt;br/&gt;
            LOG.error(&quot;Updating port list of a given subnetMap failed for node: {}&quot;, subnetId.getValue(), e);&lt;br/&gt;
        }&lt;br/&gt;
        return subnetmap;&lt;br/&gt;
    }&lt;/p&gt;

&lt;p&gt;Subnetmap object for already added subnet B doesn&apos;t exist, when we proceed PORT-UPDATE, because OpenStack, in this case, sends requests to northbound in the following order:&lt;/p&gt;

&lt;p&gt;1.  Sending METHOD (put) URL (&lt;a href=&quot;http://10.100.0.51:8080/controller/nb/v2/neutron/ports/4adc2a3b-0e6f-4c9a-ad10-cc2dac5bb8a2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://10.100.0.51:8080/controller/nb/v2/neutron/ports/4adc2a3b-0e6f-4c9a-ad10-cc2dac5bb8a2&lt;/a&gt;) JSON ({&lt;br/&gt;
  &quot;port&quot;: {&lt;br/&gt;
    &quot;allowed_address_pairs&quot;: [], &lt;br/&gt;
    &quot;extra_dhcp_opts&quot;: [], &lt;br/&gt;
    &quot;updated_at&quot;: &quot;2017-09-07T13:22:09Z&quot;, &lt;br/&gt;
    &quot;device_owner&quot;: &quot;network:dhcp&quot;, &lt;br/&gt;
    &quot;revision_number&quot;: 16, &lt;br/&gt;
    &quot;binding:profile&quot;: {}, &lt;br/&gt;
    &quot;port_security_enabled&quot;: false, &lt;br/&gt;
    &quot;fixed_ips&quot;: [&lt;br/&gt;
      &lt;/p&gt;
{
        &quot;subnet_id&quot;: &quot;bd7ab39a-3d8f-47d7-bc02-88e7b2ea8612&quot;, 
        &quot;ip_address&quot;: &quot;10.0.0.2&quot;
      }
&lt;p&gt;, &lt;br/&gt;
      &lt;/p&gt;
{
        &quot;subnet_id&quot;: &quot;596b2a2c-834a-419d-8556-04b788600395&quot;, 
        &quot;ip_address&quot;: &quot;20.0.0.2&quot;
      }
&lt;p&gt;, &lt;/p&gt;
      {
        &quot;subnet_id&quot;: &quot;1a3d23f3-6d23-4a38-b443-af34e3e83fbb&quot;, 
        &quot;ip_address&quot;: &quot;2001:db8:0:2:f816:3eff:fe00:98c1&quot;
      }
&lt;p&gt;    ], &lt;br/&gt;
    &quot;security_groups&quot;: [], &lt;br/&gt;
    &quot;binding:vif_details&quot;: &lt;/p&gt;
{
      &quot;port_filter&quot;: true
    }
&lt;p&gt;, &lt;br/&gt;
    &quot;binding:vif_type&quot;: &quot;ovs&quot;, &lt;br/&gt;
    &quot;mac_address&quot;: &quot;fa:16:3e:00:98:c1&quot;, &lt;br/&gt;
    &quot;project_id&quot;: &quot;25d71d22e2154fbe9e0ac1ecfcfa74c0&quot;, &lt;br/&gt;
    &quot;binding:host_id&quot;: &quot;controller-deray&quot;, &lt;br/&gt;
    &quot;description&quot;: &quot;&quot;, &lt;br/&gt;
    &quot;device_id&quot;: &quot;dhcpf61862b6-e5ad-5e93-972f-a5b392964da5-f0fa945f-2a1f-455c-b25c-53e0f5f13ba1&quot;, &lt;br/&gt;
    &quot;name&quot;: &quot;&quot;, &lt;br/&gt;
    &quot;admin_state_up&quot;: true, &lt;br/&gt;
    &quot;created_at&quot;: &quot;2017-09-07T13:06:29Z&quot;, &lt;br/&gt;
    &quot;binding:vnic_type&quot;: &quot;normal&quot;&lt;br/&gt;
  }&lt;br/&gt;
}) request /opt/stack/networking-odl/networking_odl/common/client.py:86&lt;/p&gt;

&lt;p&gt;2. 2017-09-07 15:22:09.985 23981 DEBUG networking_odl.common.client &lt;span class=&quot;error&quot;&gt;&amp;#91;req-03d36345-c493-4a3f-851a-0bc5fe1761ea admin -&amp;#93;&lt;/span&gt; Sending METHOD (post) URL (&lt;a href=&quot;http://10.100.0.51:8080/controller/nb/v2/neutron/subnets&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://10.100.0.51:8080/controller/nb/v2/neutron/subnets&lt;/a&gt;) JSON ({&lt;br/&gt;
  &quot;subnet&quot;: {&lt;br/&gt;
    &quot;service_types&quot;: [], &lt;br/&gt;
    &quot;description&quot;: &quot;&quot;, &lt;br/&gt;
    &quot;enable_dhcp&quot;: true, &lt;br/&gt;
    &quot;network_id&quot;: &quot;f0fa945f-2a1f-455c-b25c-53e0f5f13ba1&quot;, &lt;br/&gt;
    &quot;tenant_id&quot;: &quot;25d71d22e2154fbe9e0ac1ecfcfa74c0&quot;, &lt;br/&gt;
    &quot;created_at&quot;: &quot;2017-09-07T13:22:09Z&quot;, &lt;br/&gt;
    &quot;dns_nameservers&quot;: [], &lt;br/&gt;
    &quot;updated_at&quot;: &quot;2017-09-07T13:22:09Z&quot;, &lt;br/&gt;
    &quot;gateway_ip&quot;: &quot;2001:db8:0:2::1&quot;, &lt;br/&gt;
    &quot;ipv6_ra_mode&quot;: &quot;slaac&quot;, &lt;br/&gt;
    &quot;allocation_pools&quot;: [&lt;/p&gt;
      {
        &quot;start&quot;: &quot;2001:db8:0:2::2&quot;, 
        &quot;end&quot;: &quot;2001:db8:0:2:ffff:ffff:ffff:fffe&quot;
      }
&lt;p&gt;    ], &lt;br/&gt;
    &quot;host_routes&quot;: [], &lt;br/&gt;
    &quot;revision_number&quot;: 2, &lt;br/&gt;
    &quot;shared&quot;: false, &lt;br/&gt;
    &quot;ip_version&quot;: 6, &lt;br/&gt;
    &quot;ipv6_address_mode&quot;: &quot;slaac&quot;, &lt;br/&gt;
    &quot;cidr&quot;: &quot;2001:db8:0:2::/64&quot;, &lt;br/&gt;
    &quot;project_id&quot;: &quot;25d71d22e2154fbe9e0ac1ecfcfa74c0&quot;, &lt;br/&gt;
    &quot;id&quot;: &quot;1a3d23f3-6d23-4a38-b443-af34e3e83fbb&quot;, &lt;br/&gt;
    &quot;name&quot;: &quot;SUB6&quot;&lt;br/&gt;
  }&lt;br/&gt;
}) request /opt/stack/networking-odl/networking_odl/common/client.py:86&lt;/p&gt;

&lt;p&gt;So PORT-UPDATE at first and ADD-SUBNET at second, and neutronvpn process them in given order as well. =&amp;gt; After updateSubnetmapNodeWithPorts() call, which actually fails, we can see in log createSubnetmapNode() call to create a new SubnetMap. &lt;br/&gt;
New Ipv6 Subnetmap is always creating successfully, but it stays not-updated with existed port X. This lies to different connectivity issues, when we test L3 datapath.&lt;/p&gt;

&lt;p&gt;2. Steps to reproduce:&lt;/p&gt;

&lt;p&gt;neutron net-create A&lt;br/&gt;
neutron subnet-create --name SUB4_A A 10.0.0.0/24&lt;br/&gt;
openstack subnet create --network A --subnet-range 2001:db8:0:2::/64 SUB6_A --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac --allocation-pool start=2001:db8:0:2::2,end=2001:db8:0:2:ffff:ffff:ffff:fffe&lt;/p&gt;

&lt;p&gt;neutron router-create RT&lt;br/&gt;
neutron router-interface-add RT SUB4_A&lt;br/&gt;
neutron router-interface-add RT SUB6_A&lt;/p&gt;

&lt;p&gt;neutron net-create B&lt;/p&gt;

&lt;p&gt;neutron subnet-create --name SUB4_B B 20.0.0.0/24&lt;br/&gt;
openstack subnet create --network B --subnet-range 2001:db9:0:3::/64 SUB6_B --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac --allocation-pool start=2001:db9:0:3::2,end=2001:db9:0:3:ffff:ffff:ffff:fffe&lt;/p&gt;

&lt;p&gt;neutron router-interface-add RT SUB4_B&lt;br/&gt;
neutron router-interface-add RT SUB6_B&lt;/p&gt;

&lt;p&gt;openstack security group rule create X --ingress --dst-port 1:65535 --protocol tcp&lt;br/&gt;
openstack security group rule create X --egress --dst-port 1:65535 --protocol tcp&lt;br/&gt;
openstack security group rule create X --egress --dst-port 1:65535 --protocol udp&lt;br/&gt;
openstack security group rule create X --ingress --dst-port 1:65535 --protocol udp&lt;br/&gt;
openstack security group rule create X --ingress --protocol icmp&lt;br/&gt;
openstack security group rule create X --egress --protocol icmp&lt;br/&gt;
openstack security group rule create X --ingress --ethertype IPv6 --dst-port 1:65535 --protocol tcp&lt;br/&gt;
openstack security group rule create X --ingress --ethertype IPv6 --dst-port 1:65535 --protocol udp&lt;br/&gt;
openstack security group rule create X --egress --ethertype IPv6 --dst-port 1:65535 --protocol udp&lt;br/&gt;
openstack security group rule create X --egress --ethertype IPv6 --dst-port 1:65535 --protocol tcp&lt;br/&gt;
openstack security group rule create X --ingress --ethertype IPv6 --protocol icmp&lt;br/&gt;
openstack security group rule create X --egress --ethertype IPv6 --protocol icmp&lt;/p&gt;

&lt;p&gt;neutron port-create --name PORT1 --security-group X A&lt;br/&gt;
openstack server create --image cirros-0.3.4-x86_64-uec --flavor m1.tiny --nic port-id=&amp;lt;PORT1_ID&amp;gt; --security-group X VM1&lt;/p&gt;

&lt;p&gt;neutron port-create --name PORT2 --security-group X B&lt;br/&gt;
openstack server create --image cirros-0.3.4-x86_64-uec --flavor m1.tiny --nic port-id=&amp;lt;PORT2_ID&amp;gt; --security-group X VM2&lt;/p&gt;

&lt;p&gt;Try to ping VM2 by its IPv4 or IPv6 addresses from network&apos;s B qdhcp-namespace and vice-versa. This doesn&apos;t work sometimes.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="20813">NETVIRT-892</key>
            <summary>neutronvpn: support of multiple subnets in one neutron network</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</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="abhinav.gupta">Abhinav Gupta</assignee>
                                    <reporter username="valentina.krasnobaeva@6wind.com">Valentina Krasnobaeva</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Sep 2017 13:56:23 +0000</created>
                <updated>Mon, 25 Nov 2019 07:21:21 +0000</updated>
                            <resolved>Mon, 25 Nov 2019 07:21:21 +0000</resolved>
                                    <version>Nitrogen</version>
                                    <fixVersion>Magnesium</fixVersion>
                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="20815">NETVIRT-894</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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9117</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=9117]]></customfieldvalue>

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

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