2018-05-23 14:02 GMT+00:00 Gary Molenkamp <molen...@uwo.ca>: > I have a provider network that has two subnets (Using 1.1.1.0/24 as an > publicly routable example): >> >> # openstack subnet list | grep 67917c09-6cb4-4622-ae1b-9f5aef890b0f >> | 066df21a-d23d-4917-8b28-d097957633dc | provider-campus | >> 67917c09-6cb4-4622-ae1b-9f5aef890b0f | 172.31.96.0/22 | >> | b955a7bf-0965-4e56-a224-8a93bbcb3e99 | provider-public | >> 67917c09-6cb4-4622-ae1b-9f5aef890b0f | 1.1.1.0/24 | > > > Normally I use the neutron cli to create a floating ip address on specific > subnets, but I'm trying to migrate to the openstack cli since the neutron > cli is marked as deprecated. My understanding is that the two following > command should be equivalent to create a floating ip on the provider-public > subnet. However the first listed subnet (provider-campus) is always used by > the openstack cli and is the default is not subnet is specified: > > > This result is correct: > >> # neutron floatingip-create --tenant-id 774810c91edf4f97ae23ad55ebaf2a18 >> --subnet b955a7bf-0965-4e56-a224-8a93bbcb3e99 provider >> neutron CLI is deprecated and will be removed in the future. Use openstack >> CLI instead. >> Created a new floatingip: >> +---------------------+--------------------------------------+ >> | Field | Value | >> +---------------------+--------------------------------------+ >> | created_at | 2018-05-23T13:51:51Z | >> | description | | >> | fixed_ip_address | | >> | floating_ip_address | 1.1.1.39 | >> | floating_network_id | 67917c09-6cb4-4622-ae1b-9f5aef890b0f | >> | id | 3b02eb6a-12b1-46d8-980c-a543c47836c9 | >> | port_id | | >> | project_id | 774810c91edf4f97ae23ad55ebaf2a18 | >> | revision_number | 0 | >> | router_id | | >> | status | DOWN | >> | tags | | >> | tenant_id | 774810c91edf4f97ae23ad55ebaf2a18 | >> | updated_at | 2018-05-23T13:51:51Z | >> +---------------------+--------------------------------------+ > > > This result is incorrect: > >> # openstack floating ip create --project 774810c91edf4f97ae23ad55ebaf2a18 >> --subnet b955a7bf-0965-4e56-a224-8a93bbcb3e99 provider >> +---------------------+--------------------------------------+ >> | Field | Value | >> +---------------------+--------------------------------------+ >> | created_at | 2018-05-23T13:53:35Z | >> | description | | >> | fixed_ip_address | None | >> | floating_ip_address | 172.31.96.61 | >> | floating_network_id | 67917c09-6cb4-4622-ae1b-9f5aef890b0f | >> | id | 37fd261d-ffd3-440b-a19e-6d0fd093d575 | >> | name | 172.31.96.61 | >> | port_id | None | >> | project_id | 774810c91edf4f97ae23ad55ebaf2a18 | >> | revision_number | 0 | >> | router_id | None | >> | status | DOWN | >> | updated_at | 2018-05-23T13:53:35Z | >> +---------------------+--------------------------------------+ > > > Is this broken or am I doing something incorrect here? Any pointers would > be appreciated. > > Version details: > > BaseOS : Centos 7.4.1708 > Openstack-release: centos-release-openstack-pike-1-1.el7.x86_64 > openstack client: python2-openstackclient-3.12.1-1.el7.noarch > neutron client: python2-neutronclient-6.5.0-1.el7.noarch
There was a bug in openstacksdk that could cause this behaviour, see https://bugs.launchpad.net/python-openstacksdk/+bug/1733258 . You may want to install the latest version of python-openstackclient into a virtualenv and use that as a workaround. Not sure if we can backport the fix, but I'll take a look. Yours, Jens _______________________________________________ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to : openstack@lists.openstack.org Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack