Bug #4547
Reserved network do not inherit calculated VLAN ID
Status: | Closed | Start date: | 06/10/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Ruben S. Montero | % Done: | 0% | |
Category: | Sunstone | |||
Target version: | Release 5.0 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: | Development |
Description
Hello,
I found an issue on an old OpenNebula 4.8 and make the same test on the 4.14 and 5.0 :
I have an Open vSwitch virtual network:
<VNET> <ID>1</ID> <UID>2</UID> <GID>0</GID> <UNAME>nebula</UNAME> <GNAME>oneadmin</GNAME> <NAME>test</NAME> <PERMISSIONS> <OWNER_U>1</OWNER_U> <OWNER_M>1</OWNER_M> <OWNER_A>0</OWNER_A> <GROUP_U>0</GROUP_U> <GROUP_M>0</GROUP_M> <GROUP_A>0</GROUP_A> <OTHER_U>0</OTHER_U> <OTHER_M>0</OTHER_M> <OTHER_A>0</OTHER_A> </PERMISSIONS> <CLUSTERS> <ID>0</ID> </CLUSTERS> <BRIDGE><![CDATA[nebula]]></BRIDGE> <PARENT_NETWORK_ID/> <VN_MAD><![CDATA[ovswitch]]></VN_MAD> <PHYDEV/> <VLAN_ID><![CDATA[3]]></VLAN_ID> <VLAN_ID_AUTOMATIC>1</VLAN_ID_AUTOMATIC> <USED_LEASES>2</USED_LEASES> <VROUTERS/> <TEMPLATE> <BRIDGE><![CDATA[nebula]]></BRIDGE> <PHYDEV><![CDATA[]]></PHYDEV> <SECURITY_GROUPS><![CDATA[0]]></SECURITY_GROUPS> <VN_MAD><![CDATA[ovswitch]]></VN_MAD> </TEMPLATE> <AR_POOL> <AR> <AR_ID><![CDATA[0]]></AR_ID> <IP><![CDATA[192.168.10.1]]></IP> <MAC><![CDATA[02:00:c0:a8:0a:01]]></MAC> <SIZE><![CDATA[10]]></SIZE> <TYPE><![CDATA[IP4]]></TYPE> <MAC_END><![CDATA[02:00:c0:a8:0a:0a]]></MAC_END> <IP_END><![CDATA[192.168.10.10]]></IP_END> <USED_LEASES>2</USED_LEASES> <LEASES> <LEASE> <IP><![CDATA[192.168.10.1]]></IP> <MAC><![CDATA[02:00:c0:a8:0a:01]]></MAC> <VNET><![CDATA[2]]></VNET> </LEASE> <LEASE> <IP><![CDATA[192.168.10.2]]></IP> <MAC><![CDATA[02:00:c0:a8:0a:02]]></MAC> <VM><![CDATA[1]]></VM> </LEASE> </LEASES> </AR> </AR_POOL> </VNET>
with one address reserved:
<VNET> <ID>2</ID> <UID>2</UID> <GID>0</GID> <UNAME>nebula</UNAME> <GNAME>oneadmin</GNAME> <NAME>test-reservation</NAME> <PERMISSIONS> <OWNER_U>1</OWNER_U> <OWNER_M>1</OWNER_M> <OWNER_A>0</OWNER_A> <GROUP_U>0</GROUP_U> <GROUP_M>0</GROUP_M> <GROUP_A>0</GROUP_A> <OTHER_U>0</OTHER_U> <OTHER_M>0</OTHER_M> <OTHER_A>0</OTHER_A> </PERMISSIONS> <CLUSTERS> <ID>0</ID> </CLUSTERS> <BRIDGE><![CDATA[nebula]]></BRIDGE> <PARENT_NETWORK_ID>1</PARENT_NETWORK_ID> <VN_MAD><![CDATA[ovswitch]]></VN_MAD> <PHYDEV/> <VLAN_ID><![CDATA[4]]></VLAN_ID> <VLAN_ID_AUTOMATIC>1</VLAN_ID_AUTOMATIC> <USED_LEASES>0</USED_LEASES> <VROUTERS/> <TEMPLATE> <BRIDGE><![CDATA[nebula]]></BRIDGE> <PHYDEV><![CDATA[]]></PHYDEV> <SECURITY_GROUPS><![CDATA[0]]></SECURITY_GROUPS> <VN_MAD><![CDATA[ovswitch]]></VN_MAD> </TEMPLATE> <AR_POOL> <AR> <AR_ID><![CDATA[0]]></AR_ID> <IP><![CDATA[192.168.10.1]]></IP> <MAC><![CDATA[02:00:c0:a8:0a:01]]></MAC> <PARENT_NETWORK_AR_ID><![CDATA[0]]></PARENT_NETWORK_AR_ID> <SIZE><![CDATA[1]]></SIZE> <TYPE><![CDATA[IP4]]></TYPE> <MAC_END><![CDATA[02:00:c0:a8:0a:01]]></MAC_END> <IP_END><![CDATA[192.168.10.1]]></IP_END> <USED_LEASES>0</USED_LEASES> <LEASES/> </AR> </AR_POOL> </VNET>
The problem is the automatic VLAN_ID
calculation does not use the parent network ID in the reservation, so VM using different reserved networks can not communicate with each others.
Here are the logs on the 5.0:
- Using network test:
Fri Jun 10 14:03:53 2016 [Z0][VM][I]: New state is ACTIVE Fri Jun 10 14:03:53 2016 [Z0][VM][I]: New LCM state is PROLOG Fri Jun 10 14:03:54 2016 [Z0][VM][I]: New LCM state is BOOT Fri Jun 10 14:03:54 2016 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/1/deployment.0 Fri Jun 10 14:03:54 2016 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context. Fri Jun 10 14:03:55 2016 [Z0][VMM][I]: ExitCode: 0 Fri Jun 10 14:03:55 2016 [Z0][VMM][I]: Successfully execute network driver operation: pre. Fri Jun 10 14:03:55 2016 [Z0][VMM][I]: ExitCode: 0 Fri Jun 10 14:03:55 2016 [Z0][VMM][I]: Successfully execute virtualization driver operation: deploy. Fri Jun 10 14:03:56 2016 [Z0][VMM][I]: post: Executed "sudo ovs-vsctl set Port one-1-0 tag=3". Fri Jun 10 14:03:56 2016 [Z0][VMM][I]: post: Executed "sudo ovs-ofctl add-flow nebula in_port=2,arp,dl_src=02:00:c0:a8:0a:02,priority=45000,actions=drop". Fri Jun 10 14:03:56 2016 [Z0][VMM][I]: post: Executed "sudo ovs-ofctl add-flow nebula in_port=2,arp,dl_src=02:00:c0:a8:0a:02,nw_src=192.168.10.2,priority=46000,actions=normal". Fri Jun 10 14:03:56 2016 [Z0][VMM][I]: post: Executed "sudo ovs-ofctl add-flow nebula in_port=2,dl_src=02:00:c0:a8:0a:02,priority=40000,actions=normal". Fri Jun 10 14:03:56 2016 [Z0][VMM][I]: post: Executed "sudo ovs-ofctl add-flow nebula in_port=2,priority=39000,actions=drop". Fri Jun 10 14:03:56 2016 [Z0][VMM][I]: ExitCode: 0 Fri Jun 10 14:03:56 2016 [Z0][VMM][I]: Successfully execute network driver operation: post. Fri Jun 10 14:03:56 2016 [Z0][VM][I]: New LCM state is RUNNING
- Using network test-reservation
Fri Jun 10 14:02:05 2016 [Z0][VM][I]: New state is PENDING Fri Jun 10 14:02:23 2016 [Z0][VM][I]: New state is ACTIVE Fri Jun 10 14:02:23 2016 [Z0][VM][I]: New LCM state is PROLOG Fri Jun 10 14:02:24 2016 [Z0][VM][I]: New LCM state is BOOT Fri Jun 10 14:02:24 2016 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/0/deployment.0 Fri Jun 10 14:02:24 2016 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context. Fri Jun 10 14:02:25 2016 [Z0][VMM][I]: ExitCode: 0 Fri Jun 10 14:02:25 2016 [Z0][VMM][I]: Successfully execute network driver operation: pre. Fri Jun 10 14:02:25 2016 [Z0][VMM][I]: ExitCode: 0 Fri Jun 10 14:02:25 2016 [Z0][VMM][I]: Successfully execute virtualization driver operation: deploy. Fri Jun 10 14:02:26 2016 [Z0][VMM][I]: post: Executed "sudo ovs-vsctl set Port one-0-0 tag=4". Fri Jun 10 14:02:26 2016 [Z0][VMM][I]: post: Executed "sudo ovs-ofctl add-flow nebula in_port=1,arp,dl_src=02:00:c0:a8:0a:01,priority=45000,actions=drop". Fri Jun 10 14:02:26 2016 [Z0][VMM][I]: post: Executed "sudo ovs-ofctl add-flow nebula in_port=1,arp,dl_src=02:00:c0:a8:0a:01,nw_src=192.168.10.1,priority=46000,actions=normal". Fri Jun 10 14:02:26 2016 [Z0][VMM][I]: post: Executed "sudo ovs-ofctl add-flow nebula in_port=1,dl_src=02:00:c0:a8:0a:01,priority=40000,actions=normal". Fri Jun 10 14:02:26 2016 [Z0][VMM][I]: post: Executed "sudo ovs-ofctl add-flow nebula in_port=1,priority=39000,actions=drop". Fri Jun 10 14:02:26 2016 [Z0][VMM][I]: ExitCode: 0 Fri Jun 10 14:02:26 2016 [Z0][VMM][I]: Successfully execute network driver operation: post. Fri Jun 10 14:02:26 2016 [Z0][VM][I]: New LCM state is RUNNING
Associated revisions
Bug #4547: Do no generate VLAN_ID if not needed.Inherit VLAN_ID in
reservations
Bug #4547: Add dropdown with automatic vlan options
History
#1 Updated by Ruben S. Montero about 5 years ago
- Category set to Sunstone
- Status changed from Pending to New
- Assignee set to Carlos Martín
- Target version set to Release 5.0
Add a drop down selection for VLAN_ID:
VLAN ID: | |--- Automatic VLAN ID (Will set AUTOMATIC_VLAN_ID="yes" ) | |--- No VLAN network (It'll set AUTOMATIC_VLAN_ID="no" ) | `--- Manual VLAN ID (open text input for the VLAN ID)
#2 Updated by Tino Vázquez about 5 years ago
- Assignee changed from Carlos Martín to Ruben S. Montero
#3 Updated by Ruben S. Montero about 5 years ago
- Status changed from New to Closed
- Resolution set to fixed