Differece behavior about enable subnet service types scenario

Bug #1707381 reported by zhaobo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Low
Unassigned

Bug Description

Repro:
1. create a net and a subnet 'A-compute-nova' with service_types "compute:nova"
2. exec neutron port-create only specified the network ID/name.
   This will return "No valid service subnet for the given device owner."
   We only can create port with device_owner "compute:nova"
3. create another subnet 'B-None', no specify the service_types.
Then create port with device_owner=compute:nova and fixed_ip from 'B-None', it create successful.
But why not raise the error just the same with step 2? As we wish the IPs of port always allocate from the subnet which service_type is 'compute:nova'.

zhaobo (zhaobo6)
Changed in neutron:
assignee: nobody → zhaobo (zhaobo6)
Changed in neutron:
status: New → In Progress
Revision history for this message
Brian Haley (brian-haley) wrote :

Yes, fixed_ip always has precedence today, but I think it's correct to check the service type if we have the information.

Changed in neutron:
importance: Undecided → Low
Revision history for this message
Miguel Lavalle (minsel) wrote :

This is not a bug. Please read this section of the documentation: https://docs.openstack.org/neutron/latest/admin/config-service-subnets.html#operation. Bottom line, a subnet with no service type is compatible with ports of any device owner. As a consequence, the following use case is perfectly valid:

1) The network has one subnet without service type
2) The network has one or more subnets with service types
3) The user wants to create a port on the subnet without service type with a device owner that matches the service type of one of the other subnets

Since a subnet without service type is compatible with any device owner, the port creation should succeed. This bug proposes to forbid it. Why? I am going to bring this bug up in the L3 subteam meeting that will take place on August 3rd at 1500 UTC in channel #openstack-meeting-3. The submitter of this bug is welcome to join the discussion

Revision history for this message
Brian Haley (brian-haley) wrote :

Miguel - yes, I probably even wrote part of that document :)

I was maybe thinking of an edge case where there were no more IPs matching the service-type, but then we did document that as well:

"During IP allocation, the IPAM driver returns an address from a subnet with a service type matching the port device owner. If no subnets match, or all matching subnets lack available IP addresses, the IPAM driver attempts to use a subnet without any service types to preserve compatibility."

That covers this bug - port with one device_owner value can have an IP in a subnet with the None service-type. As long as you can't allocate an IP from a subnet of another non-None service-type this bug is probably invalid then.

Revision history for this message
Miguel Lavalle (minsel) wrote :

This bug was discussed today during the L3 subteam meeting and the agreement was that is is invalid. Please see discussion log here: http://eavesdrop.openstack.org/meetings/neutron_l3/2017/neutron_l3.2017-08-03-15.00.log.html#l-90

Changed in neutron:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by ZhaoBo (<email address hidden>) on branch: master
Review: https://review.openstack.org/488944

Revision history for this message
zhaobo (zhaobo6) wrote :

Thank you! @Miguel @Brian。
Thanks for the discuss about this bug. This is more clear about this feature behavior. Thanks.

zhaobo (zhaobo6)
Changed in neutron:
assignee: zhaobo (zhaobo6) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.