Octavia v2 API Requesting a VIP address is not working

Bug #1695331 reported by Michael Johnson
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
octavia
Fix Released
Critical
Nir Magnezi

Bug Description

When I create a new load balancer requesting an vip address from the subnet specified, I do not get the requested VIP address.

(octaviaclient) michjohn@devstackpy27:~/.../testclient/python-octaviaclient$ openstack loadbalancer create --name "my lb" --subnet private-subnet --description "My description" --vip-address 10.0.0.66
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| Admin State Up | True |
| Created At | 2017-06-02T16:49:26 |
| Description | My description |
| Flavor | |
| ID | 94d8f3cb-3fef-4c13-89f6-6341b89468d5 |
| Listeners | |
| Name | my lb |
| Operating Status | OFFLINE |
| Pools | |
| Project ID | 0abf90fddd82430c8e7b370654f7e222 |
| Provider | octavia |
| Provisioning Status | PENDING_CREATE |
| VIP Address | 10.0.0.66 |
| VIP Network ID | 0f39a434-d4df-4158-a43e-071d3280439f |
| VIP Port ID | None |
| VIP Subnet ID | 8d80351a-0683-4804-9ed1-db0e619d5fff |
+---------------------+--------------------------------------+

(octaviaclient) michjohn@devstackpy27:~/.../testclient/python-octaviaclient$ openstack loadbalancer show "my lb"
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| Admin State Up | True |
| Created At | 2017-06-02T16:49:26 |
| Description | My description |
| Flavor | |
| ID | 94d8f3cb-3fef-4c13-89f6-6341b89468d5 |
| Listeners | |
| Name | my lb |
| Operating Status | ONLINE |
| Pools | |
| Project ID | 0abf90fddd82430c8e7b370654f7e222 |
| Provider | octavia |
| Provisioning Status | ACTIVE |
| VIP Address | 10.0.0.13 |
| VIP Network ID | 0f39a434-d4df-4158-a43e-071d3280439f |
| VIP Port ID | 3ac614ba-27c5-4b0f-ad70-e8f5d35ceaa0 |
| VIP Subnet ID | 8d80351a-0683-4804-9ed1-db0e619d5fff |
+---------------------+--------------------------------------+

Querying the neutron database, 10.0.0.66 is available on the subnet requested.

Tags: lbaas-merge
Changed in octavia:
assignee: nobody → Pradeep Kumar Singh (pradeep-singh-u)
Revision history for this message
Pradeep Kumar Singh (pradeep-singh-u) wrote :

Hello Michal,

I have analysed the issue, below are my findings.

When we call v1 apis via neutron, port is already provided to octavia, so octavia need not to do any thing[1].
But when we use V2 api and don't provide the port_id, then port is created in octavia[1]

Then in DB fixed IP of this port is assigned to vip.ip_address[2].

If my understanding is correct i will fix it by assigning the vip.ip_address to port during its creation.

[1]https://github.com/openstack/octavia/blob/623eec6015a73cc739a796bda470f7a19a50c701/octavia/network/drivers/neutron/allowed_address_pairs.py#L331
[2]https://github.com/openstack/octavia/blob/623eec6015a73cc739a796bda470f7a19a50c701/octavia/network/drivers/neutron/base.py#L75

Could you please confirm my understanding.

Changed in octavia:
status: Triaged → In Progress
Revision history for this message
Michael Johnson (johnsom) wrote :

Pradeep, you are right, when we create the port on Octavia, the ip_address is not specified.

I want to get this fixed by RC1 next week, so I hope you don't mind if I push up a patch for it. I will put you down as a co-author. I don't see a currently open patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to octavia (master)

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

Changed in octavia:
assignee: Pradeep Kumar Singh (pradeep-singh-u) → Michael Johnson (johnsom)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on octavia (master)

Change abandoned by Michael Johnson (<email address hidden>) on branch: master
Review: https://review.openstack.org/491111
Reason: Actually, this is a better fix: https://review.openstack.org/#/c/463289

Revision history for this message
Michael Johnson (johnsom) wrote :

It looks like Cheng already fixed this as part of fixing another bug.

Changed in octavia:
assignee: Michael Johnson (johnsom) → Nir Magnezi (nmagnezi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to octavia (master)

Reviewed: https://review.openstack.org/463289
Committed: https://git.openstack.org/cgit/openstack/octavia/commit/?id=e797e8763fdfca767bb808dfa1558eed55f38fe9
Submitter: Jenkins
Branch: master

commit e797e8763fdfca767bb808dfa1558eed55f38fe9
Author: cheng <email address hidden>
Date: Sun May 7 10:34:11 2017 -0400

    Add allocate vip port when create loadbalancer in server side

    Closes-Bug: #1666559
    Closes-Bug: #1695331
    Change-Id: I102efb9a22ac1cdcffc0f959d0b04401e34f425c
    Signed-off-by: cheng <email address hidden>

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

This issue was fixed in the openstack/octavia 1.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.