Age | Commit message (Collapse) | Author | Files | Lines |
|
Currently os-net-config exits immediately if an interface fails to
come up. This causes problems when we call it with a failsafe
configuration because it can result in working interfaces not
being configured if there are also non-functional interfaces, which
can leave a system unreachable over the network even though it may
have a working connection.
This change stores errors and handles them after all interfaces have
been processed to allow os-net-config to do what it can even with an
invalid configuration. If any failures are detected it will still
cause os-net-config to report failure at the end.
Change-Id: I3bc75e217d0b7c5ae62900f4253ad57ee3720685
Closes-Bug: 1692725
|
|
This patch improves Python 3 compatibility by replacing .iteritems()
with .items() for iterating over dicts and fixing two tests to use
portable string comparison.
Change-Id: I8e1acafe372f1696823561d6aa8aae5437d34025
Closes-Bug: #1654187
|
|
This patch adds support for enabling hotplugging on interfaces (disabled
by default). This is useful for configuring SR-IOV root devices so that
they "return" to the system when no longer used by a VM.
Note: also updates an invalid value in the interface and ib_interface
sample files.
Partial-Bug: #1639901
Change-Id: Idfc17d6f20bb306271838895bc53f4b109dd664d
|
|
|
|
route_options will append additional options
to route definitions.
Change-Id: I2b70efdd9c6df7ea252576e245fbc0e9c46ea4bd
|
|
NotImplementedError is the name of the exception
(https://docs.python.org/2/library/exceptions.html).
NotImplemented is the name of a constant
(https://docs.python.org/2/library/constants.html).
>>> raise NotImplemented()
Traceback (most recent call last):
File "<pyshell#31>", line 1, in <module>
raise NotImplemented()
TypeError: 'NotImplementedType' object is not callable
>>> raise NotImplementedError()
Traceback (most recent call last):
File "<pyshell#32>", line 1, in <module>
raise NotImplementedError()
NotImplementedError
This patch fix it.
Change-Id: I8b8b47de26b9bf688d9d27a4daa6d9910994ac4a
Closes-Bug: #1339855
|
|
There are times when it is desirable to set the MTU of an
"interface" to 1500 -- when the external network and the storage
network are different VLANs on the same physical interface, for
example.
Change-Id: Ic5ea6ad05118fd57c26c898a460c19969de4109d
Closes-Bug: #1539821
|
|
Currently only the first IPv4/v6 address is assigned to a NIC
even if multiple addresses are specified in config file.
With this change, eni implementation can configure multiple
IPv4/v6 addresses for a NIC.
Also this fixes IPv6 netmask format, which currently causes
an error on ifup.
Change-Id: I0a38d376bece8af297bddede594962fd3a193d09
|
|
Change-Id: Ice1b8d17804cf7a0aafd308945a5e960fe927bbc
|
|
Allows you to only install the config, but not take interfaces
down/up. Useful if you wish to defer activation of a new config
until a later time (e.g reboot).
Change-Id: I42f3195e1d3d5d3b9d1c9dbb1f7cf1364503cbd3
|
|
Refactor some common code so the base-class handles the ifup/down
Change-Id: Id1fee1d2d5c9315717611b7bf18f058c49fe3622
|
|
Currently we only output the config file contents in noop mode,
but it's very useful to see what would be done in terms of taking
interfaces up and down, and especially what will be removed when
--cleanup mode is specified
So this refactors the operations skipped by noop into the base-class
so we can conveniently log what they would do when --noop is selected.
Change-Id: Ia9cfa9a05b2df02c165a2ff992765ab63e55ae6b
|
|
Purge references to modules which have been deprecated by various oslo
libraries.
Requires changes to use oslo.utils and oslo.concurrency, which are
added to the requirements, syncing with the latest in global requirements
so we can also move to the un-namespaced oslo package names.
Change-Id: Idacb71b7871330e3b3fabf4a926a5b8987614c4d
|
|
Moving this flag makes it easier to implement additional functions
which work differently depending on noop mode being set, vs passing
it into every function like apply()
Change-Id: I796792aece3e40322523e910a3b87f7ab9a451dd
|
|
This adds the option to permanently rewrite the configuration so the
aliases are used instead of the system name. This is useful where
you have a variety of hardware and you want to have consistent device
naming accross all platforms - this allows you to essentially rename
the interfaces permanently so they match the abstracted nicN names.
Note, this needs to be run with --cleanup or the old (now conflicting)
configs will still be in place, and it may require a reboot before
the changes are fully applied.
Change-Id: I5af146e764b72c4beaa41c549fabff0af8802152
|
|
|
|
Change-Id: I88118836605fade6bc7978b2d65ed51cef0cdc80
|
|
Without this change, when configuring a default route, it's neccessary
to explicitly provide an ip_netmask of 0.0.0.0/0 - otherwise line 177
errors because there's no route.ip_netmask.
With this change, it's still possible to provide an ip_netmask for a
default route (even though that makes no sense), but if none is provided
The Right Thing is done.
Change-Id: Idac59e571a72cc8d5693f811ec0121273b891d0f
|
|
|
|
Adds support for ovs_extra to the OVS Bridge and
OVS bond objects.
|
|
Updates the object model so that a VLAN on top of a bridge
(an OVS int port) doesn't require a physical device to
be set in the object model.
|
|
Corrects the eni provider so that it returns the correct
format in noop mode.
|
|
|
|
Adds a new cleanup option which can be used to ifdown and
remove interfaces that exists but aren't specified in
the object model (or JSON).
|
|
|
|
Adds support for a new 'primary' interface option exposed via the
object model and JSON parsers which can be used to force the
MAC address on a bridge. Only one interface on a given
bridge (or bond) may be set as the primary interface.
Also, update the ifcfg and eni providers so that they use
OVS_EXTRA (or ovs_extra) to pin the mac accordingly.
|
|
Updates the apply() function for each NetConfig object
so that it now accepts noop instead. Also, the updated
files are not returned (always instead of conditionally
if mock was used).
|
|
Specifying mock=True for 'apply' will return a string
representing the changes required, or commands to be used
in order to implement the requested/specified configuration.
This is also exposed to the cli, with -m (--mock), e.g.
os-net-config --mock -c ./etc/example_os_net_config_1.json -p eni
|
|
|
|
|
|
We should bring up the interfaces on boot in the same order
with which we bring them up in this tool.
|
|
|
|
|
|
|
|
We were shutting the interfaces down but not bringing them up
again. This fixes that...
|
|
Updates the ENI format so it creates multiple config sections
for a single os-net-config interface object if both v4 and v6
IP addresses are defined.
Also, fixes several of the test so that DHCP is not enabled on
OvsPorts. If an OVS port is part of a bridge that is itself using
DHCP we don't also need to run DHCP on the OvsPort interface.
|
|
Add ifcfg configuration support for Vlans and Vlan OVS ports.
|
|
This uses /etc/network/interfaces single file format.
Includes basic tests
|