Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1380278

Summary: Missing way to create floating IP on a specific subnet ID
Product: Red Hat OpenStack Reporter: Robin Cernin <rcernin>
Component: python-neutronclientAssignee: anil venkata <vkommadi>
Status: CLOSED ERRATA QA Contact: Eran Kuris <ekuris>
Severity: low Docs Contact:
Priority: low    
Version: 8.0 (Liberty)CC: amuller, chrisw, ihrachys, jlibosva, jruzicka, lpeer, molasaga, nyechiel, rcernin, srevivo
Target Milestone: asyncKeywords: Reopened, Triaged, ZStream
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-neutronclient-3.1.0-2.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-21 16:45:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robin Cernin 2016-09-29 07:52:18 UTC
Neutron in liberty supports a way to create fip on subnet id [1] but the support for python-neutronclient is missing [2]

---
[1]
 Create fip on subnet id

If there are multiple subnets in the external networks, users can expect
to create a floatingip on a specific subnet on which the quality or cost
is maybe different than other ones.

This patch allows users to create floating ip on specified subnet.

DocImpact
APIImpact

Change-Id: I7a3c27c1d0d2685e31201f1eac6ec74dfb96b279
Closes-Bug: #1468175

https://github.com/openstack/neutron/commit/e5e5f7a281fd89c06d65da3a6d3a1fe194647432

---
[2]
 Create floating IP on a specific subnet ID

Implemented optional parameter (with dashed arguments only)
for python-neutronclient to create floating IP on a subnet
ID. Created corresponding unit test cases.

Closes-Bug: #1482496
Change-Id: Iea9175bd534fdfd1bbfa6819f8ef6f45fcbcfa5e

https://github.com/openstack/python-neutronclient/commit/a77d3148b3ed087830ca78b94cf25271fca2de35

Comment 1 Robin Cernin 2016-09-29 07:52:43 UTC
Adding external Launchpad bug

Comment 3 Assaf Muller 2016-09-29 13:42:31 UTC
@Anil, can you please backport the patch to downstream Liberty CLI client?

Comment 4 Robin Cernin 2016-10-03 12:22:42 UTC
Update from Launchpad bug

~~~
This functionality exists in the python-openstackclient, which is the go-forward utility for configuring all openstack components. Can you make sure it works for you then we can close this.

https://review.openstack.org/#/c/288441/ was the change.
~~~

Would it be possible to backport this to openstackclient [1] ? Checking version python-openstackclient-1.7.2-1.el7ost.noarch and still missing.

Thanks!
Robin

---
[1] https://review.openstack.org/#/c/288441/

    openstack ip floating create
        [--subnet <subnet>]
        [--port <port>]
        [--floating-ip-address <floating-ip-address>]
        [--fixed-ip-address <fixed-ip-address>]
        <network>

Comment 5 Robin Cernin 2016-10-03 12:28:12 UTC
Changed the python-neutronclient to python-openstackclient in Launchpad bug. Same issue. The https://review.openstack.org/#/c/288441/ is missing in Liberty.

https://bugs.launchpad.net/python-openstackclient/+bug/1628813

Comment 6 anil venkata 2016-10-04 15:14:08 UTC
We can't backport https://review.openstack.org/#/c/288441/ to upstream liberty patch. This patch is dependent on 8 other patches https://review.openstack.org/#/q/topic:bug/1519502

I tried to backport all the 8 patches to liberty but I got merge conflicts and fixing those merge conflicts was not straight forward. So I prefer not to backport these patches to liberty and better to close this bug.

Comment 7 anil venkata 2016-10-04 15:15:06 UTC
@Assaf,

We can't backport the requested changes in upstream. Can you please close this bug?

Comment 8 Assaf Muller 2016-10-04 16:29:09 UTC
@Robin, note comment 7 from Anil. We're talking about 8 patches, all with conflicts and risk of regressions, to backport simple functionality that exists in the next OSP version. We had good intentions but unfortunately I don't think we're going to be able to answer this request.

Comment 9 Ihar Hrachyshka 2016-11-02 12:35:58 UTC
Assaf, I was thinking we will just backport neutronclient (not OSC!) patch: https://github.com/openstack/python-neutronclient/commit/a77d3148b3ed087830ca78b94cf25271fca2de35 that should not have any dependencies as you suggested.

Comment 11 anil venkata 2016-11-08 11:15:46 UTC
@ Robin Cernin 

Neutronclient build python-neutronclient-3.1.0-2.el7ost with the backport [1] is available.

[1] https://code.engineering.redhat.com/gerrit/#/c/89225/

Comment 13 Eran Kuris 2016-11-23 10:32:11 UTC
Verified on OSP8 [root@controller-0 ~]# rpm -qa |grep python-neutronclient
python-neutronclient-3.1.0-2.el7ost.noarch
check that connectivity to floating IP still working too .

[root@controller-0 ~]# neutron net-list
+--------------------------------------+----------+--------------------------------------------------+
| id                                   | name     | subnets                                          |
+--------------------------------------+----------+--------------------------------------------------+
| 29477716-4966-43e4-ae06-3b3f530cb0a3 | nova     | 1f250227-17c9-4949-ae5e-fec7371ad338 10.0.0.0/24 |
|                                      |          | 2435500b-ab13-4785-87b2-d1532a91db98 10.0.2.0/24 |
| a38032e3-f7a0-4788-a869-342baf5bc2a0 | net-64-2 | 78cabcd4-2e44-4db6-8b6b-271d297e0e19 10.0.5.0/24 |
|                                      |          | 4f2cfe1d-35e8-4efb-847c-a057c9e126cc 2005::/64   |
[root@controller-0 ~]# neutron floatingip-create --subnet 2435500b-ab13-4785-87b2-d1532a91db98 nova
Created a new floatingip:
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| fixed_ip_address    |                                      |
| floating_ip_address | 10.0.2.102                           |
| floating_network_id | 29477716-4966-43e4-ae06-3b3f530cb0a3 |
| id                  | b4f54055-abfd-4b27-bc24-8f8875256bb2 |
| port_id             |                                      |
| router_id           |                                      |
| status              | DOWN                                 |
| tenant_id           | 13515cd9f6f7421c9a8b10d9d1be2c4f     |
+---------------------+--------------------------------------+
[root@controller-0 ~]# neutron floatingip-create --subnet 1f250227-17c9-4949-ae5e-fec7371ad338 nova
Created a new floatingip:
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| fixed_ip_address    |                                      |
| floating_ip_address | 10.0.0.102                           |
| floating_network_id | 29477716-4966-43e4-ae06-3b3f530cb0a3 |
| id                  | 90ad3a35-7fd1-489a-845a-365739abbe1e |
| port_id             |                                      |
| router_id           |                                      |
| status              | DOWN                                 |
| tenant_id           | 13515cd9f6f7421c9a8b10d9d1be2c4f     |
+---------------------+--------------------------------------+

Comment 15 errata-xmlrpc 2016-12-21 16:45:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2988.html