Comment 1 for bug 1970383

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

Thanks for the report! I was able to reproduce the problem on master as well.

The nova code at [1] creates the neutron client based on the request context. If the request is coming from an admin user then the neutron client will be an admin client too. In this case neutron returns the segment_id field in the GET /subnets response.

However if the requester is a non-admin then nova will query neutron with a non-admin client too. And base on my quick testing in a devstack from master neutron indeed does not return the segment_id field for a non-admin user.

So this is valid bug.

The easiest solution would be to change [2] to always create and neutron admin client with:

    get_client(context, admin=True)

I'm setting this to Triaged. Feel free to assign this to yourself and propose a patch fixing this.

[1] https://github.com/openstack/nova/blob/a1f006d799d2294234d381395a9ae9c22a2d80b9/nova/network/neutron.py#L3858-L3867
[2] https://github.com/openstack/nova/blob/a1f006d799d2294234d381395a9ae9c22a2d80b9/nova/network/neutron.py#L3858