NeutronClient: Admin tenant is not able to create subnet pool for non admin tenant

Bug #1667279 reported by Puneet Arora
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
Medium
Akihiro Motoki

Bug Description

Below scenario is not working:

1. openstack project list (Pick tenant id of non admin e.g sample)
   # openstack project list
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| 325f404759b444f79974cb5b41d454ad | sample |
| 47ac520c6373427fa5c63772b9585aae | admin |
| 66476c5e485e46d18d0d8a2ef1d87db4 | service |
+----------------------------------+---------+

2. Using admin tenant run below command:
   neutron subnetpool-create --shared --pool-prefix 20.0.0.0/24 --default-prefixlen 26 subnetpool --tenant-id=325f404759b444f79974cb5b41d454ad

3. Check created subnetpool tenant-id, It show admin tenant-id instead of sample tenant id.

In step 2, I am trying to create subnetpool with 'sample' tenant-id using admin credentials. But when I check 'neutron subnetpool-show' its shows tenant-id of admin instead of sample tenant-id.

So during subnetpool creation either '--tenant-id' should be restricted or subnetpool should be created with particular tenant-id.

Detailed commands pasted here:-
http://paste.openstack.org/show/600202/

Changed in neutron:
status: New → Invalid
Puneet Arora (apuneet)
summary: - Neutron: Admin tenant is not able to create subnet pool for no admin
+ Neutron: Admin tenant is not able to create subnet pool for non admin
tenant
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote : Re: Neutron: Admin tenant is not able to create subnet pool for non admin tenant

This is not a bug in Neutron.
Might I also suggest, that as neutronclient is not going to be used in thr future as it is deprecated, so please use openstackclient.

I tried the command with OpenstackClient and it works properly.
But yes, there is a failure with neutronclient.
http://paste.openstack.org/show/600213/

no longer affects: neutron
summary: - Neutron: Admin tenant is not able to create subnet pool for non admin
- tenant
+ NeutronClient: Admin tenant is not able to create subnet pool for non
+ admin tenant
Revision history for this message
Akihiro Motoki (amotoki) wrote :

I think it is worth fixed in neutron CLI.
At least we should ensure the consistency of CLI behavior and --tenant-id option is supported in most neutron CLI. If some resource does not support the option like this, users would be confused with any doubt.

Changed in python-neutronclient:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/449786

Changed in python-neutronclient:
assignee: nobody → Akihiro Motoki (amotoki)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/449786
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=9baf4b892eeb3864ec4f3b93d81866de66e99b49
Submitter: Jenkins
Branch: master

commit 9baf4b892eeb3864ec4f3b93d81866de66e99b49
Author: Akihiro Motoki <email address hidden>
Date: Sat Mar 25 04:27:09 2017 +0900

    Allow to specify tenant_id in subnetpool-create

    Previously tenant_id option was ignored in subnetpool-create.
    --tenant-id option is supported in all create commands in neutron CLI
    and it is important to keep this consistency for good user experience.

    Change-Id: Ifab51d623f8f3519523b284fc04e5b28301b5928
    Closes-Bug: #1667279

Changed in python-neutronclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-neutronclient 6.2.0

This issue was fixed in the openstack/python-neutronclient 6.2.0 release.

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.