Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
network: fix bridge script for multiple stanzas #6962
Conversation
jameinel
approved these changes
Feb 10, 2017
Some comments but as we likely need this for 2.1 we should probably land it.
| + self.bond_master_options = False | ||
| + self.bridge_ports = [] | ||
| + | ||
| + for s in stanzas: |
| - return True, words[1:] | ||
| - return False, [] | ||
| + if not self.is_bonded: | ||
| + self.is_bonded = any(("bond-" in x for x in s.options)) |
| if self.is_physical_interface: | ||
| self.phy = PhysicalInterface(definition) | ||
| def __str__(self): | ||
| return self.definition | ||
| + def has_option(self, options): |
| + def _collect_logical_interfaces(self): | ||
| + """ | ||
| + Collects the parsed stanzas related to logical interfaces, | ||
| + returning a list of LogicalInterfaces. |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 77ab102
into
juju:2.1
Feb 10, 2017
pushed a commit
to frobware/juju
that referenced
this pull request
Feb 10, 2017
This was referenced Feb 10, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
axw commentedFeb 10, 2017
Description of change
The add-juju-bridge.py script was not coping
with /etc/network/interfaces files containing
multiple stanzas for the same logical interface.
For example, if an interface "eth0" has two
"iface" stanzas, one for each of inet and inet6,
the script would generate two bridge ifaces
each with bridge_ports set to eth0. Only one
may have bridge_ports.
The program has been restructured a little so
that a LogicalInterface contains a collection
of stanzas. This better matches the concepts
in /e/n/i.
At the same time, we now only add bridge_ports
to the first logical interface stanza for a
bridged interface.
QA steps
Documentation changes
None.
Bug reference
At least partially fixes https://bugs.launchpad.net/juju/+bug/1650304