Using: Netapp drive (vlan support) as dhss true!
To reproduce the bug, it is required to enable segmentation extension in neutron config file and add the physical net name in the manila config file (neutron_physical_net_name). Then, follow:
1. Create a segmented net:
$ openstack network create segmented-net
2. Crate 3 segmenets in the segmented net:
$ openstack network segment create --network-type vlan --network segmented-net --segment 350 segment-350 --physical-network physnet1 $ openstack network segment create --network-type vlan --network segmented-net --segment 360 segment-360 --physical-network physnet1 $ openstack network segment create --network-type vlan --network segmented-net --segment 370 segment-370 --physical-network physnet1
3. Create 3 subnetes in the segmented net, being each one linked to one of the previous created segments:
$ openstack subnet create --subnet-range 192.168.101.0/24 --dhcp --gateway 192.168.101.1 --network segmented-net seg350-subnet --network-segment segment-350 $ openstack subnet create --subnet-range 192.168.102.0/24 --dhcp --gateway 192.168.102.1 --network segmented-net seg360-subnet --network-segment segment-360 $ openstack subnet create --subnet-range 192.168.103.0/24 --dhcp --gateway 192.168.103.1 --network segmented-net seg370-subnet --network-segment segment-370
4. Show the segmented net for getting the net id and subnets id:
$ openstack network show segmented-net
The fields that matter: | id | 1147ddf4-f9a3-4609-862f-83e06a7fb51c | | segments | [{'provider:network_type': 'vlan', 'provider:physical_network': 'physnet1', 'provider:segmentation_id': 3556}, {'provider:network_type': 'vlan', 'provider:physical_network': 'physnet1', 'provider:segmentation_id': 350}, {'provider:network_type': 'vlan', 'provider:physical_network': 'physnet1', 'provider:segmentation_id': 360}, {'provider:network_type': 'vlan', 'provider:physical_network': 'physnet1', 'provider:segmentation_id': 370}] | | subnets | 188b25c0-a7f8-4733-8096-e37d2cce8a20, a99f32a6-6ecc-4aa0-9e14-5b0e672832d9, ee1f537e-6d21-4d64-bc89-8b22dfc8788c |
5. Getting the previous ids, create 3 manila share-net in the segmented net, being each one linked to one of the subnets:
$ manila share-network-create --neutron-net-id 1147ddf4-f9a3-4609-862f-83e06a7fb51c --neutron-subnet-id 188b25c0-a7f8-4733-8096-e37d2cce8a20 --name share-seg350
- The output field share network subnets has segmentation_id None: | share_network_subnets | [{'id': '44362247-a3ec-4921-97a9-5e6622e4be31', 'availability_zone': None, 'created_at': '2020-04-15T13:45:27.000000', 'updated_at': None, 'segmentation_id': None, 'neutron_net_id': '1147ddf4-f9a3-4609-862f-83e06a7fb51c', 'neutron_subnet_id': '188b25c0-a7f8-4733-8096-e37d2cce8a20', 'ip_version': None, 'cidr': None, 'network_type': None, 'mtu': None, 'gateway': None}] |
$ manila share-network-create --neutron-net-id 1147ddf4-f9a3-4609-862f-83e06a7fb51c --neutron-subnet-id ee1f537e-6d21-4d64-bc89-8b22dfc8788c --name share-seg360
- The output field share network subnets has segmentation_id None: | share_network_subnets | [{'id': '90b3ab4f-51c6-4d92-8dd8-62917aee0907', 'availability_zone': None, 'created_at': '2020-04-15T13:45:58.000000', 'updated_at': None, 'segmentation_id': None, 'neutron_net_id': '1147ddf4-f9a3-4609-862f-83e06a7fb51c', 'neutron_subnet_id': 'ee1f537e-6d21-4d64-bc89-8b22dfc8788c', 'ip_version': None, 'cidr': None, 'network_type': None, 'mtu': None, 'gateway': None}] |
$ manila share-network-create --neutron-net-id 1147ddf4-f9a3-4609-862f-83e06a7fb51c --neutron-subnet-id a99f32a6-6ecc-4aa0-9e14-5b0e672832d9 --name share-seg370
- The output field share network subnets has segmentation_id None: | share_network_subnets | [{'id': 'b7d339ec-fc26-457a-9dc9-327d17c21085', 'availability_zone': None, 'created_at': '2020-04-15T13:46:40.000000', 'updated_at': None, 'segmentation_id': None, 'neutron_net_id': '1147ddf4-f9a3-4609-862f-83e06a7fb51c', 'neutron_subnet_id': 'a99f32a6-6ecc-4aa0-9e14-5b0e672832d9', 'ip_version': None, 'cidr': None, 'network_type': None, 'mtu': None, 'gateway': None}] |
6. The created share networks have not segment value, it's set after creating a share. So, create a share with each prvious share networks:
$ manila create --share-network share-seg350 --share-type netapp --name share-seg350 NFS 1 $ manila create --share-network share-seg360 --share-type netapp --name share-seg360 NFS 1 $ manila create --share-network share-seg370 --share-type netapp --name share-seg370 NFS 1
7. Having a look at the segmentation value of each share network, they have the same value (the bug):
$ manila share-network-show share-seg350 | share_network_subnets | [{... 'segmentation_id': 370, ... }] |
$ manila share-network-show share-seg360 | share_network_subnets | [{... 'segmentation_id': 370, ... }] |
$ manila share-network-show share-seg370 | share_network_subnets | [{... 'segmentation_id': 370, ... }] |
Using: Netapp drive (vlan support) as dhss true!
To reproduce the bug, it is required to enable segmentation extension physical_ net_name) . Then, follow:
in neutron config file and add the physical net name in the manila config
file (neutron_
1. Create a segmented net:
$ openstack network create segmented-net
2. Crate 3 segmenets in the segmented net:
$ openstack network segment create --network-type vlan --network segmented-net --segment 350 segment-350 --physical-network physnet1
$ openstack network segment create --network-type vlan --network segmented-net --segment 360 segment-360 --physical-network physnet1
$ openstack network segment create --network-type vlan --network segmented-net --segment 370 segment-370 --physical-network physnet1
3. Create 3 subnetes in the segmented net, being each one linked to one of the previous created segments:
$ openstack subnet create --subnet-range 192.168.101.0/24 --dhcp --gateway 192.168.101.1 --network segmented-net seg350-subnet --network-segment segment-350
$ openstack subnet create --subnet-range 192.168.102.0/24 --dhcp --gateway 192.168.102.1 --network segmented-net seg360-subnet --network-segment segment-360
$ openstack subnet create --subnet-range 192.168.103.0/24 --dhcp --gateway 192.168.103.1 --network segmented-net seg370-subnet --network-segment segment-370
4. Show the segmented net for getting the net id and subnets id:
$ openstack network show segmented-net
The fields that matter: f9a3-4609- 862f-83e06a7fb5 1c | network_ type': 'vlan', 'provider: physical_ network' : 'physnet1', 'provider: segmentation_ id': 3556}, {'provider: network_ type': 'vlan', 'provider: physical_ network' : 'physnet1', 'provider: segmentation_ id': 350}, {'provider: network_ type': 'vlan', 'provider: physical_ network' : 'physnet1', 'provider: segmentation_ id': 360}, {'provider: network_ type': 'vlan', 'provider: physical_ network' : 'physnet1', 'provider: segmentation_ id': 370}] | a7f8-4733- 8096-e37d2cce8a 20, a99f32a6- 6ecc-4aa0- 9e14-5b0e672832 d9, ee1f537e- 6d21-4d64- bc89-8b22dfc878 8c |
| id | 1147ddf4-
| segments | [{'provider:
| subnets | 188b25c0-
5. Getting the previous ids, create 3 manila share-net in the segmented net,
being each one linked to one of the subnets:
$ manila share-network- create --neutron-net-id 1147ddf4- f9a3-4609- 862f-83e06a7fb5 1c --neutron-subnet-id 188b25c0- a7f8-4733- 8096-e37d2cce8a 20 --name share-seg350
- The output field share network subnets has segmentation_id None: subnets | [{'id': '44362247- a3ec-4921- 97a9-5e6622e4be 31', 'availability_ zone': None, 'created_at': '2020-04- 15T13:45: 27.000000' , 'updated_at': None, 'segmentation_id': None, 'neutron_net_id': '1147ddf4- f9a3-4609- 862f-83e06a7fb5 1c', 'neutron_ subnet_ id': '188b25c0- a7f8-4733- 8096-e37d2cce8a 20', 'ip_version': None, 'cidr': None, 'network_type': None, 'mtu': None, 'gateway': None}] |
| share_network_
$ manila share-network- create --neutron-net-id 1147ddf4- f9a3-4609- 862f-83e06a7fb5 1c --neutron-subnet-id ee1f537e- 6d21-4d64- bc89-8b22dfc878 8c --name share-seg360
- The output field share network subnets has segmentation_id None: subnets | [{'id': '90b3ab4f- 51c6-4d92- 8dd8-62917aee09 07', 'availability_ zone': None, 'created_at': '2020-04- 15T13:45: 58.000000' , 'updated_at': None, 'segmentation_id': None, 'neutron_net_id': '1147ddf4- f9a3-4609- 862f-83e06a7fb5 1c', 'neutron_ subnet_ id': 'ee1f537e- 6d21-4d64- bc89-8b22dfc878 8c', 'ip_version': None, 'cidr': None, 'network_type': None, 'mtu': None, 'gateway': None}] |
| share_network_
$ manila share-network- create --neutron-net-id 1147ddf4- f9a3-4609- 862f-83e06a7fb5 1c --neutron-subnet-id a99f32a6- 6ecc-4aa0- 9e14-5b0e672832 d9 --name share-seg370
- The output field share network subnets has segmentation_id None: subnets | [{'id': 'b7d339ec- fc26-457a- 9dc9-327d17c210 85', 'availability_ zone': None, 'created_at': '2020-04- 15T13:46: 40.000000' , 'updated_at': None, 'segmentation_id': None, 'neutron_net_id': '1147ddf4- f9a3-4609- 862f-83e06a7fb5 1c', 'neutron_ subnet_ id': 'a99f32a6- 6ecc-4aa0- 9e14-5b0e672832 d9', 'ip_version': None, 'cidr': None, 'network_type': None, 'mtu': None, 'gateway': None}] |
| share_network_
6. The created share networks have not segment value, it's set after creating a share.
So, create a share with each prvious share networks:
$ manila create --share-network share-seg350 --share-type netapp --name share-seg350 NFS 1
$ manila create --share-network share-seg360 --share-type netapp --name share-seg360 NFS 1
$ manila create --share-network share-seg370 --share-type netapp --name share-seg370 NFS 1
7. Having a look at the segmentation value of each share network, they have the same value (the bug):
$ manila share-network-show share-seg350 subnets | [{... 'segmentation_id': 370, ... }] |
| share_network_
$ manila share-network-show share-seg360 subnets | [{... 'segmentation_id': 370, ... }] |
| share_network_
$ manila share-network-show share-seg370 subnets | [{... 'segmentation_id': 370, ... }] |
| share_network_