← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1945156] [NEW] Port has IP allocated from both IPv4 and IPv6 subnets even if only one subnet is specified by user

 

Public bug reported:

When network has one IPv4 and one IPv6 subnets and user do request like:

openstack port create -vv --fixed-ip subnet=private-subnet --network
private port1

REQ: curl -g -i -X POST http://192.168.122.177:9696/v2.0/ports -H "Content-Type: application/json" -H "User-Agent: openstacksdk/0.56.0 keystoneauth1/4.3.1 python-requests/2.25.1 CPython/3.6.8" -H "X-Auth-Token: {SHA256}7d023d5b0822b23d66de0ae5ad47ee4d2519624c43c9834d292592a727b34e60" -d '{"port": {"name": "port1", "network_id": "86a96e3f-58da-4244-84f4-0d43f2b5a681", "fixed_ips": [{"subnet_id": "f8177ef5-d5f6-449c-ab68-a095d64bb344"}], "admin_state_up": true}}'
http://192.168.122.177:9696 "POST /v2.0/ports HTTP/1.1" 201 1212
RESP: [201] Connection: keep-alive Content-Length: 1212 Content-Type: application/json Date: Fri, 24 Sep 2021 08:31:32 GMT X-Openstack-Request-Id: req-270f9a86-f27a-4d21-bd2e-206a005bd586
RESP BODY: {"port":{"id":"57710d69-8589-43c1-8df8-527e3d066091","name":"port1","network_id":"86a96e3f-58da-4244-84f4-0d43f2b5a681","tenant_id":"44c069d7f3ea40dd859022b91ec5b09b","mac_address":"fa:16:3e:70:24:ff","admin_state_up":true,"status":"DOWN","device_id":"","device_owner":"","fixed_ips":[{"subnet_id":"f8177ef5-d5f6-449c-ab68-a095d64bb344","ip_address":"10.0.0.41"},{"subnet_id":"20284b4a-496c-4c3b-b7e7-8d16054bac13","ip_address":"fd95:a73f:a1b0:0:f816:3eff:fe70:24ff"}],"project_id":"44c069d7f3ea40dd859022b91ec5b09b","port_security_enabled":true,"security_groups":["0295f73d-7523-4d68-bcac-2fb3eb64a08e"],"binding:vnic_type":"normal","binding:profile":{},"binding:host_id":"","binding:vif_type":"unbound","binding:vif_details":{},"allowed_address_pairs":[],"extra_dhcp_opts":[],"description":"","dns_name":"","dns_assignment":[{"ip_address":"10.0.0.41","hostname":"host-10-0-0-41","fqdn":"host-10-0-0-41.openstackgate.local."},{"ip_address":"fd95:a73f:a1b0:0:f816:3eff:fe70:24ff","hostname":"host-fd95-a73f-a1b0-0-f816-3eff-fe70-24ff","fqdn":"host-fd95-a73f-a1b0-0-f816-3eff-fe70-24ff.openstackgate.local."}],"tags":[],"created_at":"2021-09-24T08:31:32Z","updated_at":"2021-09-24T08:31:32Z","revision_number":1}}


Neutron allocates for port IP addresses from IPv4 and IPv6 subnet.

When network has 2 ipv4 subnets and 2 ipv6 subnets then same query
results with only one IPv4 allocated for the port.

** Affects: neutron
     Importance: Medium
     Assignee: Slawek Kaplonski (slaweq)
         Status: New


** Tags: api l3-ipam-dhcp

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1945156

Title:
  Port has IP allocated from both IPv4 and IPv6 subnets even if only one
  subnet is specified by user

Status in neutron:
  New

Bug description:
  When network has one IPv4 and one IPv6 subnets and user do request
  like:

  openstack port create -vv --fixed-ip subnet=private-subnet --network
  private port1

  REQ: curl -g -i -X POST http://192.168.122.177:9696/v2.0/ports -H "Content-Type: application/json" -H "User-Agent: openstacksdk/0.56.0 keystoneauth1/4.3.1 python-requests/2.25.1 CPython/3.6.8" -H "X-Auth-Token: {SHA256}7d023d5b0822b23d66de0ae5ad47ee4d2519624c43c9834d292592a727b34e60" -d '{"port": {"name": "port1", "network_id": "86a96e3f-58da-4244-84f4-0d43f2b5a681", "fixed_ips": [{"subnet_id": "f8177ef5-d5f6-449c-ab68-a095d64bb344"}], "admin_state_up": true}}'
  http://192.168.122.177:9696 "POST /v2.0/ports HTTP/1.1" 201 1212
  RESP: [201] Connection: keep-alive Content-Length: 1212 Content-Type: application/json Date: Fri, 24 Sep 2021 08:31:32 GMT X-Openstack-Request-Id: req-270f9a86-f27a-4d21-bd2e-206a005bd586
  RESP BODY: {"port":{"id":"57710d69-8589-43c1-8df8-527e3d066091","name":"port1","network_id":"86a96e3f-58da-4244-84f4-0d43f2b5a681","tenant_id":"44c069d7f3ea40dd859022b91ec5b09b","mac_address":"fa:16:3e:70:24:ff","admin_state_up":true,"status":"DOWN","device_id":"","device_owner":"","fixed_ips":[{"subnet_id":"f8177ef5-d5f6-449c-ab68-a095d64bb344","ip_address":"10.0.0.41"},{"subnet_id":"20284b4a-496c-4c3b-b7e7-8d16054bac13","ip_address":"fd95:a73f:a1b0:0:f816:3eff:fe70:24ff"}],"project_id":"44c069d7f3ea40dd859022b91ec5b09b","port_security_enabled":true,"security_groups":["0295f73d-7523-4d68-bcac-2fb3eb64a08e"],"binding:vnic_type":"normal","binding:profile":{},"binding:host_id":"","binding:vif_type":"unbound","binding:vif_details":{},"allowed_address_pairs":[],"extra_dhcp_opts":[],"description":"","dns_name":"","dns_assignment":[{"ip_address":"10.0.0.41","hostname":"host-10-0-0-41","fqdn":"host-10-0-0-41.openstackgate.local."},{"ip_address":"fd95:a73f:a1b0:0:f816:3eff:fe70:24ff","hostname":"host-fd95-a73f-a1b0-0-f816-3eff-fe70-24ff","fqdn":"host-fd95-a73f-a1b0-0-f816-3eff-fe70-24ff.openstackgate.local."}],"tags":[],"created_at":"2021-09-24T08:31:32Z","updated_at":"2021-09-24T08:31:32Z","revision_number":1}}

  
  Neutron allocates for port IP addresses from IPv4 and IPv6 subnet.

  When network has 2 ipv4 subnets and 2 ipv6 subnets then same query
  results with only one IPv4 allocated for the port.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1945156/+subscriptions



Follow ups