Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1511547 - host port bind to neutron fails
Summary: host port bind to neutron fails
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: puppet-tripleo
Version: 12.0 (Pike)
Hardware: x86_64
OS: Linux
Target Milestone: ---
: 12.0 (Pike)
Assignee: Or Idgar
QA Contact: nlevinki
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-09 14:42 UTC by Or Idgar
Modified: 2017-12-27 09:58 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-12-27 09:58:01 UTC
Target Upstream Version:

Attachments (Terms of Use)
log file (deleted)
2017-11-09 14:42 UTC, Or Idgar
no flags Details

Description Or Idgar 2017-11-09 14:42:06 UTC
Created attachment 1349965 [details]
log file

Description of problem:
After creating both neutron port and ovs port (through interface file),  neutron cannot bind the port.
only after updating binding:host_id to same value again the port is being bound.

Version-Release number of selected component (if applicable):

How reproducible:
Install OSP12, create both neutron port and OVS port (point to the same id/mac), restart neutron services.

Steps to Reproduce:
1. get the controller host name by running "hostname -f"

2. create neutron port:
neutron port-create {{ some vxlan network }} --binding:host_id={{ node_hostname }} --security-group {{ some security group }} --device-owner Octavia:health-mgr 
       --name test -f value -c id -c mac_address -c fixed_ips -c name

3. create interface file with the content below (/etc/sysconfig/network-scripts/ifcfg-test). complete the variables by the results from the previous step:

DEVICE={{ name }}
IPADDR={{ fixed_ips.ip_address }}
MACADDR={{ mac_address }}
MTU={{ connected vxlan network MTU }}
OVS_EXTRA="-- set Interface {{ name }} external-ids:iface-status=active \
           -- set Interface {{ name }} external-ids:attached-mac={{ mac_address }} \
           -- set Interface {{ name }} external-ids:iface-id={{ id }} \
           -- set Interface {{ name }} external-ids:skip_cleanup=true \
           -- set Interface {{ name }} mac=\"{{ mac_address }}\" \
           -- set Interface {{ name }} other-config:hwaddr={{ mac_address }}"

4. ifup test

5. systemctl restart 'neutron*'

Actual results:

binding_vif_type = "binding_failed"
status = "DOWN"

Expected results:

binding_vif_type = "{"port_filter": true, "datapath_type": "system", "ovs_hybrid_plug": true}"
status = "ACTIVE"

Additional info:

if you run "neutron port-update --binding:host_id={{ node_hostname }} {{ id }} it will fix it.

Comment 1 Jakub Libosvar 2017-11-13 14:52:51 UTC
I will triage this one.

Comment 2 Jakub Libosvar 2017-11-15 16:38:47 UTC
The issue was that ovs agent wasn't running at the time of port creation, that also included the host the port should bind to. That was the reason newly created port failed to bind.
Sounds like an issue in deployment steps that puppet-neutron doesn't start neutron-openvswitch-agent service.

Comment 3 Brent Eagles 2017-11-16 14:24:50 UTC
On baremetal deployments puppet starts the openvswitch agent at "step 5" and  after the octavia configuration workflow is run. A possible workaround in the octavia deployment case is to start the dhcp agent if it is not already running prior to creating the port.

We do not see this issue when deploying neutron in containers. I will verify but I think the containers are started earlier in the deployment.

Comment 5 Or Idgar 2017-12-27 09:58:01 UTC
Closing the ticket as the problem occurred as a result of neutron-ovs-agent service was down when trying to create the port binding with neutron CLI.

Note You need to log in before you can comment on or make changes to this bug.