Network creation ignores --project option

Bug #1659878 reported by Bernard Cafarelli
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
High
Dean Troyer

Bug Description

OS: Centos 7
devstack checkout: master 5713497aa5819f240050fee05d047c480845a8cd

Today I redeployed my devstack setup (attached local.conf): the demo account only listed the public network.

Checking with the admin account, the private network is there, but belongs to the admin project. In the stack log, the correct --project option is passed to "openstack network create", but is ignored.

Some manual tests (OSC releases 3.6.0 to 3.8.0, no difference):

$ openstack --os-cloud devstack-admin --os-region RegionOne project list
+----------------------------------+--------------------+
| ID | Name |
+----------------------------------+--------------------+
| 3cdc60269b7b41f188ab7f7961d1e569 | alt_demo |
| 52bc1eb6c09f4012ae7c1b0c6a938066 | invisible_to_admin |
| ac4f7a535915407cae10a6b3557b01a4 | admin |
| b35c69b497e64ea7aeee3201f4111bbb | service |
| f69f9e22f50842d48290758bcf711b2d | demo |
+----------------------------------+--------------------+

$ openstack --os-cloud devstack-admin --os-region RegionOne network create --project demo test_net_ko1|grep project_id
| project_id | ac4f7a535915407cae10a6b3557b01a4 | # admin project

$ openstack --os-cloud devstack-admin --os-region RegionOne network create --project f69f9e22f50842d48290758bcf711b2d test_net_ko2|grep project_id
| project_id | ac4f7a535915407cae10a6b3557b01a4 | # admin project

But skipping the --os* parameters the network is created on the correct project:
$ openstack network create --project f69f9e22f50842d48290758bcf711b2d test_net_ok|grep project_id
| project_id | f69f9e22f50842d48290758bcf711b2d |

And using neutron CLI is OK (which is why I opened the bug here):
$ neutron --os-cloud devstack-admin --os-region RegionOne net-create --tenant-id f69f9e22f50842d48290758bcf711b2d test_net_neutron|grep tenant_id
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
| tenant_id | f69f9e22f50842d48290758bcf711b2d |
[vagrant@defiant-devstack devstack]$ openstack network show test_net_neutron|grep project_id
| project_id | f69f9e22f50842d48290758bcf711b2d |

Revision history for this message
Bernard Cafarelli (bcafarel) wrote :
Revision history for this message
Jerry Zhao (zhaoxinyu) wrote :

i can confirm the same.
global requirements just bumped openstackclient version to 3.8.0 and thus broke our build as well.

Revision history for this message
Jerry Zhao (zhaoxinyu) wrote :

a bug by combination of openstackclient 3.8.0 and openstacksdk 0.9.13, they bumped openstacksdk version too.
https://review.openstack.org/#/c/424847/

Changed in python-openstackclient:
importance: Undecided → High
Revision history for this message
Dean Troyer (dtroyer) wrote :

This appears to be another missing field in the SDK network refactor

Dean Troyer (dtroyer)
Changed in python-openstackclient:
assignee: nobody → Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/426454
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=fab4fcc397ce8d0ea1c817d14e5787689d0ef7ac
Submitter: Jenkins
Branch: master

commit fab4fcc397ce8d0ea1c817d14e5787689d0ef7ac
Author: Dean Troyer <email address hidden>
Date: Fri Jan 27 20:05:00 2017 -0600

    Fix network create --project

    SDK 0.9.13 needs to see project_id in the attributes, not tenant_id.

    Closes-bug: 1659878
    Change-Id: Iff7abe8bd00cbe087c07579596c40af8b0a73302

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

This issue was fixed in the openstack/python-openstackclient 3.8.1 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.