Wrong ``binding_host_id`` on neutron ports when deployed in container on metal with multiple NICs and spaces

Bug #1823000 reported by Frode Nordahl
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Octavia Charm
Fix Released
Critical
Frode Nordahl

Bug Description

$ openstack port show ea5ec95f-6f18-45eb-b2d1-40b38cd31a1e
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+
| admin_state_up | UP |
| allowed_address_pairs | |
| binding_host_id | eth3 |
| binding_profile | |
| binding_vif_details | |
| binding_vif_type | binding_failed |
| binding_vnic_type | normal |
| created_at | 2019-04-03T11:18:21Z |
| data_plane_status | None |
| description | |
| device_id | |
| device_owner | Octavia:health-mgr |
| dns_assignment | fqdn='host-192-168-254-11.compute.dpcop01.customera.internal.', hostname='host-192-168-254-11', ip_address='192.168.254.11' |
| dns_domain | |
| dns_name | |
| extra_dhcp_opts | |
| fixed_ips | ip_address='192.168.254.11', subnet_id='528ea591-cb7c-4d73-9155-3b3e83cccfee' |
| id | ea5ec95f-6f18-45eb-b2d1-40b38cd31a1e |
| mac_address | fa:16:3e:d5:e8:a8 |
| name | octavia-health-manager-octavia-6-listen-port |
| network_id | fbbd96ee-19b1-4cb1-ad2f-e828f8480e9f |
| port_security_enabled | True |
| project_id | 4922384865774b73a5981e05af942869 |
| qos_policy_id | None |
| revision_number | 41 |
| security_group_ids | b4c32449-4647-4fd1-a22b-2e244ca3fc88 |
| status | DOWN |
| tags | charm-octavia, charm-octavia-octavia-6 |
| trunk_details | None |
| updated_at | 2019-04-03T11:44:58Z |
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------+

$ juju run --unit octavia/6 'unit-get private-address'
192.168.100.181

$ host 192.168.100.181
eth3.juju-e7f05f-3-lxd-10.maas.

$ neutron agent-list
xxx | Open vSwitch agent | juju-e7f05f-5-lxd-12 | xxx

Tags: atos
Revision history for this message
Frode Nordahl (fnordahl) wrote :

This is the culprit:
https://github.com/openstack/charm-octavia/blob/a7cd44e9b59d95eb4ff1f6f2c56d3cda68929212/src/lib/charm/openstack/api_crud.py#L215

We need to look at what the neutron-openvswitch agent does to determine hostname and replicate that in the octavia charm.

Daniel Mason (masond88)
tags: added: atos
Frode Nordahl (fnordahl)
summary: - Wrong ``binding_host_id`` on neutron ports when in a HA setup
+ Wrong ``binding_host_id`` on neutron ports when deployed in container on
+ metal with multiple NICs
summary: Wrong ``binding_host_id`` on neutron ports when deployed in container on
- metal with multiple NICs
+ metal with multiple NICs and spaces
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-octavia (master)

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

Revision history for this message
Lorenzo Cavassa (lorenzo-cavassa) wrote :

Octavia Neutron / Neutron API logs attached

Revision history for this message
Frode Nordahl (fnordahl) wrote :

A clue from the neutron-server logs may be this:

Network fbbd96ee-19b1-4cb1-ad2f-e828f8480e9f with segment a3dbce83-6e4c-4860-af9f-ff440fd9541a is type of vxlan but agent juju-e7f05f-3-lxd-10 or mechanism driver only support ['gre', 'local', 'flat', 'vlan']. check_segment_for_agent /usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/mech_agent.py:248

Is VXLAN actually used in the deployment or is the network created with the wrong type?

Does the ``neutron-openvswitch-octavia`` application have the right set of relations and comparable configuration to the ``neutron-openvswitch`` application?

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

Reviewed: https://review.openstack.org/649608
Committed: https://git.openstack.org/cgit/openstack/charm-octavia/commit/?id=d011c6b1eb13a4811079d7756a3d5be1746fcd71
Submitter: Zuul
Branch: master

commit d011c6b1eb13a4811079d7756a3d5be1746fcd71
Author: Frode Nordahl <email address hidden>
Date: Wed Apr 3 14:45:44 2019 +0200

    Use hostname of machine for ``binding_host_id``

    The current implementation relies on DNS to resolve the hostname
    associated with the ``private-address`` IP of the unit.

    This does not always provide a reliable result.

    Change-Id: I3a3a3cddd35354944196a155ca0b239e680333d3
    Closes-Bug: #1823000

Changed in charm-octavia:
status: In Progress → Fix Committed
James Page (james-page)
Changed in charm-octavia:
milestone: none → 19.04
David Ames (thedac)
Changed in charm-octavia:
status: Fix Committed → Fix Released
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.