CA-311211: Fix destroy_existing_vlan_bridge when enic workaround is e… #157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…nabled
The function
destroy_existing_vlan_bridgeis called fromBridge.createifthe bridge to be created is for a VLAN. The purpose is to get rid of any
existing bridge for the same VLAN but with a different name. This was not
working properly if case the enic workaround is in place, and the Linux bridge
backend is used.
The main use of this is installing a host with the management interface on a
VLAN, where early in the host boot process, xcp-networkd creates a temporary
bridge for the VLAN, called
xentemp. This is because xcp-networkd does notyet know the final name of the VLAN bridge, which is determined later by xapi.
When firstboot scripts run, a VLAN is created through xapi, with a new bridge
name that is meant to replace the
xentempbridge.For example, for VLAN 123, the output of
brctl showwould be like this afterxcp-network has started:
The desired state after the firstboot scripts run is:
Now, the problem occurred when running on a Cisco UCS host, with the "enic
workaround" enabled. What happens then, is that not the eth0, but a VLAN0
device eth0.0 is added to the "parent" bridge xenbr0:
The function
destroy_existing_vlan_bridgedid not take this into account. Itis fixed by push the call to this function further down into
Bridge.create,below the point where the enic workaround has been dealt with. It turned out
easier to split the function into separate OVS and Linux bridge versions.
Signed-off-by: Rob Hoes [email protected]