Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch adds support for Linux Bridges to os-net-config. This is
done completely with ifcfg files, brctl is not used directly.
Hierarchy is preserved, so a Linux Bridge may have a Linux Bond
as a member, which in turn may have multiple interfaces as members.
This changeset has been updated to include a more specific example
for Linux bridge configuration (that doesn't combine bridging and
bonding).
This change depends on the change to add support for Linux Bonds.
Change-Id: I1ddacd514b02af30139a868071d82cde19b1f946
|
|
|
|
|
|
This change adds support for Linux Bonding to the impl_ifcfg
in os-net-config. This change adds support for configuring Linux
Bonds using the Bonding module rather than Open vSwitch. Most of
the options for Linux Bonds are the same as OVS, with the exception
of bonding_options instead of ovs_options.
Change-Id: If8c6de1554234277843de9fac58536dd5b0a941b
|
|
|
|
|
|
Adds in the ability to optionally configure DNS
server settings via the ifcfg file formats.
The dns_servers JSON is an array which currently
supports either 1 or 2 DNS servers (per limitations
of the ifcfg format).
Change-Id: I9edecfdd4e1d0f39883b72be554cd92c5685881d
|
|
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
|
|
Currently only the first IPv4/v6 address is assigned to a NIC
even if multiple addresses are specified in config file.
With this change, ifcfg implementation can configure multiple
IPv4/v6 addresses for a NIC.
Also this enables os-net-config to configure IPv6 netmasks.
Change-Id: I31b39abae36e0620dbbcb1001fa51f5ca2bd9ea2
|
|
This patch fixes an issue in the ifcfg provider implementation
that caused interfaces to be started twice. This can
cause failures if the interface uses DHCP and dhclient
was already running.
The child_members function was incorrectly adding the interface
name to the child members set on key error. This patch removes
that logic and simply ignores key errors.
Change-Id: Ibe0e32bc09979bc68b92a722b2bfa383e77502a9
Closes-bug: #1485634
|
|
Change-Id: I3c2614028a8a009e24615dff7a8e2f0c570cbf70
|
|
This patch adds a new --detailed-exit-codes option which can
be used to optionally enable the os-net-config CLI to return
exit code 2 if there have been modifications. Detailed
exit codes are useful if you need to trigger subsequent
external actions based whether os-net-config made changes or not.
Change-Id: I8f22fa15335d1276f4e444a6454a24ff486e1495
|
|
Change-Id: Ice1b8d17804cf7a0aafd308945a5e960fe927bbc
|
|
This patch adds an optional flag that can be used to
pass in args for dhclient when using DHCP.
This use case for this is to be able to control which
DHCP options dhclient listens for and we can thus
disable specific options (like routing) for some
network configurations.
Change-Id: Ic21de0615ea0ef304843c55cc5abe43cb1771169
|
|
This change selects an interface to be the active slave in a bond
with active/passive characteristics. If one of the interfaces is
marked as primary, it will be the active slave. If none of the
interfaces are marked, the interface with the lowest alphanumeric
value will be chosen. For instance em2 comes before em3.
Co-Authored-By: Dan Prince <dprince@redhat.com>
Change-Id: Ic9b4e8c68b788b98a19ea33a76c9210a80deabeb
|
|
This change sets one of the member interfaces of a bond as the primary
interface, which results in that interface being the active slave.
This change adds a step to the apply method in impl_ifcfg which runs
'ovs-appctl bond/set-active-slave <bond> <iface>' after bringing up
the bond interfaces. This step ensures that the bonds work correctly
without LACP switch support. If a member interface on the bond is set
as primary, that interface will be used.
Co-Authored-By: Dan Prince <dprince@redhat.com>
Change-Id: I795bb3b8ef977f9276bfec062b197c473393942e
|
|
|
|
Updates the ifcfg provider so that we don't set
the OVSDHCPINTERFACES config setting if
the interface is private. This doesn't seem to cause
any functional issues but it is not required
and can be confusing.
Change-Id: I9d51905df87969ae1b221680e8f0b5befc7b6bfe
|
|
When using the ifcfg provider vlans on bridges (or bonds)
fail to startup correctly. This is because VLANs on an OVS
bridge are configured as internal ports and these should not
have the VLAN=yes or PHYSDEV ifcfg settings specified.
Change-Id: Ieb743eda8f0a25cdaca43bdea767af26bf504f15
Closes-bug: #1453904
|
|
|
|
In order to allow os-net-config to coexist with NetworkManager, this
patch adds NM_CONTROLLED=no to the top of each interface configuration.
This ensures that NetworkManager will not mess with interfaces that are
configured by os-net-config.
Change-Id: I9d226e032eb1cb411b6ea617936f4425c7fd2c74
|
|
On certain systems, the embedded NICs appear as eno1, eno2, etc.
This patch adds 'eno' to 'em' and 'eth' as interface names that
should be considered embedded NICs.
Change-Id: Icc49596573bdbb8af25f934a647f0a2ab82adaa5
|
|
When multiple interfaces are configured with DHCP, and more than
one interface receives a gateway from the DHCP server(s), the
resulting default gateway on the system is unpredictable. This
change adds the "defroute" boolean to the configuration syntax
for os-net-config. Any interface type may be marked so that the
gateway received from the DHCP server will not be eligible as a
default gateway for the system. This only works for ifcfg files,
/etc/network/interfaces lacks an equivalent option.
Change-Id: Id775f3506b2ec60c9a2833efd49fb8319151c00d
Closes-Bug: 1449288
|
|
This patch updates the handling of the --debug and --verbose
options so that if both are specified then log level is set to
DEBUG.
Change-Id: I65d5665631f5575d1c8343bb7c1b197a61e0e176
Closes-bug: #1450586
|
|
End users may not realize these files are autogenerated
and may be surprised if they make changes to the
/etc/sysconfig/network-scripts files which are then
overwritten on reboot.
Change-Id: I526c228463bd10de2cf3724aa4159b63a9aeff80
|
|
When using persist_mapping to rename nics, you can either use
--no-activate then reboot, or with this patch, allow activation
and we'll take the device links down and rename on the fly avoiding
the need for a reboot.
Change-Id: Ife9486c9f5447e9c7a55f90ba075e22b6344ad67
|
|
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
|
|
Currently there's a fixed mapping between abstracted interface
names (nic1, nic2 etc) and the underlying biosdevname for the
device.
In many cases, this mapping based on system enumeration is
sufficient, but in some cases, particularly when you perform
detailed pre-deployment discovery of interfaces, you may wish
to alter the mapping independently of the config (e.g if the
config is in a heat template, and the discovery data is
provided at runtime).
So this adds a -m option to os-net-config, which enables a
mapping file to be provided, such that specific interfaces
may be mapped to their abstract names based on knowledge of
the devices or the networks they are connected to.
The mapping file has the following format, where em1 and em2 are
device names as detected by the OS (e.g biosdevname):
interface_mapping:
nic1: em2
nic2: em1
Or you can use the device MAC instead:
interface_mapping:
nic1: 12:34:56:78:9a:bc
nic2: 12:34:56:de:f0:12
Change-Id: I93e6d3ed733244834bb3c2126c91db705b4d9167
|
|
Currently no check for error output on stderr is made, and no
sanity checked performed on the stdout string - both yaml and json
versions could be empty and the test would still pass.
So add sanity assertions for each case so the test is a bit more
robust.
Change-Id: Iced683ff3365e0766d345a2ce840b69b501fbb54
|
|
Currently test_cli fails if you don't run it from the repository
top directory, so instead derive a relative path from the test,
which e.g allows you to do nosetests -svx test_cli.py which can
be more convenient when debugging.
Change-Id: I120065ca17104be7c2f4bf00d3e4e281a3179703
|
|
Currently we ignore the actual return code from the main() function,
due to the try/catch, which isn't appropriate where we're directly
calling the function. Instead assert the return value directly,
which will catch failures where main returns a non-zero status.
Change-Id: Ic92ca243230f732201f30cc63be5101f70c206bb
|
|
Adds a simple example showing how an individual interface can be
configured, e.g outside of a bond etc.
Change-Id: I05dcb4fabe718686e306bdc719b32f0fb40c1b5e
|
|
|
|
|
|
Change-Id: I88118836605fade6bc7978b2d65ed51cef0cdc80
|
|
These options seem to be reversed, in most other tools verbose
means INFO and debug means DEBUG.
Change-Id: I31005e4e10372018685a93dc2f80619f16c513d9
|
|
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
|
|
Updates the impl_ifcfg.child_members method so that it
uses a set instead of an array (this avoids dups). Also
fixes an issue with this method which would cause tests
to fail intermittently due to ordering differences.
Adding each member object regardless solves this
(not sure why I had commented out the children.append before)
Also fixes an issue in test_cli which causes tests to fail
on Debian which doesn't yet support the add_bond method
on its ENI provider. This fix was to explicitly set
--provider=ifcfg on the failing tests. We should be able to
remove these once ENI supports bonding properly.
Closes-bug: #1370615
Change-Id: Id9cfa2b2eaab27c93113956f5956facfa2a2aeee
|
|
|
|
If a top level bridge or bond is modified we also want to
restart the child interfaces.
|
|
|
|
Update the utils.get_file_data method so that it doesn't log
errors if a file doesn't exist.
|
|
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.
|