Bug 1036851

Summary: Atomically setup OVS ports
Product: Red Hat OpenStack Reporter: Bob Kukura <rkukura>
Component: openstack-neutronAssignee: lpeer <lpeer>
Status: CLOSED NEXTRELEASE QA Contact: Ofer Blaut <oblaut>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: chrisw, lpeer, yeylon
Target Milestone: z3Keywords: ZStream
Target Release: 4.0Flags: lpeer: needinfo? (rkukura)
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-06 10:58:57 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:

Description Bob Kukura 2013-12-02 18:38:51 UTC
Normal operation of the openvswitch-agent results in various warning and error messages being logged to /var/log/openvswitch/ovs-vswitchd.log, which, although not representing actual failures, can cause concern.

For example, setting up the patch port connecting br-int and br-tun results in:

2013-12-02T16:35:45Z|00103|netdev_vport|ERR|patch-tun: patch type requires valid 'peer' argument
2013-12-02T16:35:45Z|00104|bridge|WARN|could not configure network device patch-tun (Invalid argument)
2013-12-02T16:35:45Z|00105|netdev_vport|ERR|patch-tun: patch type requires valid 'peer' argument
2013-12-02T16:35:45Z|00106|bridge|WARN|could not configure network device patch-tun (Invalid argument)
2013-12-02T16:35:45Z|00107|bridge|INFO|bridge br-int: added interface patch-tun on port 1
2013-12-02T16:35:46Z|00108|netdev_linux|WARN|ethtool command ETHTOOL_GFLAGS on network device patch-int failed: No such device
2013-12-02T16:35:46Z|00109|dpif|WARN|system@ovs-system: failed to add patch-int as port: No such device
2013-12-02T16:35:46Z|00110|netdev_vport|ERR|patch-int: patch type requires valid 'peer' argument
2013-12-02T16:35:46Z|00111|bridge|WARN|could not configure network device patch-int (Invalid argument)
2013-12-02T16:35:46Z|00112|bridge|INFO|bridge br-tun: added interface patch-int on port 1

And setting up a tunnel port on br-tun results in:

2013-12-02T16:35:48Z|00113|netdev_linux|WARN|ethtool command ETHTOOL_GFLAGS on network device gre-1 failed: No such device
2013-12-02T16:35:48Z|00114|dpif|WARN|system@ovs-system: failed to add gre-1 as port: No such device
2013-12-02T16:35:49Z|00115|netdev_vport|ERR|gre-1: gre type requires valid 'remote_ip' argument
2013-12-02T16:35:49Z|00116|bridge|WARN|could not configure network device gre-1 (Invalid argument)
2013-12-02T16:35:49Z|00117|bridge|INFO|bridge br-tun: added interface gre-1 on port 2

These messages seem to be due to the neutron.agent.linux.ovs_lib.add_patch_port() and neutron.agent.linux.ovs_lib.add_tunnel_port() functions setting DB attributes one-by-one, which results in invalid intermediate states. In addition to the noise in the log files, attempts to use the ports while in these intermediate states could result in transient incorrect behavior.

This can be resolved by changing these functions to atomically create and configure the OVS ports using a single ovs-vsctl command, with multiple sub-commands separated by "--" as arguments. This would also have the benefit of reducing the overhead of executing multiple commands via rootwrap when a single command would do.

Comment 2 lpeer 2013-12-04 15:27:53 UTC
It is being handled in u/s.
We can get it as part of the next rebase on stable havana, not critical for 4.0 RC.

Comment 3 lpeer 2014-02-12 13:17:46 UTC
per discussion with Bob we can wait for this to be merged u/s, bob can you submit the patch to u/s stable branch and update the bug with a link to it.

Comment 6 lpeer 2014-03-06 10:58:57 UTC
closing this bug as this is fixed in Icehouse and a backport was not requested by a customer.