Age | Commit message (Collapse) | Author | Files | Lines |
|
This change cleans up some of the Linux Bond and Linux Bridge logic
that processes member interfaces and VLANs.
One bug is fixed, where a VLAN might be assigned as a slave
interface on a bond.
Changes were made so that if VLANs are placed under a Linux Bond,
the PHYSDEV is set to the bond, so the device: does not need to
be specified in the config.
This change ensures that if a bridge has a bond and VLANs as members,
that the VLAN will be a member of the bridge and not the bond.
Change-Id: Id329737f0032e781b111741086ded83f378297a7
|
|
This change generates /etc/sysconf/network-scripts/ifcfg-* for ivs.
It also generates /etc/sysconf/ivs configuration file for ivs.
It supports only RedHat at this point.
Indigo Virtual Switch (IVS, https://github.com/floodlight/ivs)
is a virtual switch for Linux. It is compatible with the KVM
hypervisor and leveraging the Open vSwitch kernel module for
packet forwarding. There are three major differences between
IVS and OVS:
1. Each node can have at most one ivs, name is not required.
2. Bond is not allowed to attach to an ivs. It is the SDN
controller's job to dynamically form bonds on ivs.
3. IP address can only be statically assigned.
Change-Id: I276d736794d123405de793c2a4eb2c1ee55a0fad
|
|
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
|
|
|
|
This change modifies the kwargs in the object instantiation to
use immutable default assignments. This is for object safety,
since a mutable object will not point to a new memory address
on modification. In Python, lists and dicts should not be used
as default assignments for kwargs.
Change-Id: I73993df12ca317161ba32e02a98a5f40ef8904f3
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
Implements a new active NIC abstraction and naming convention
that allows nic1, nic2, etc. to be translated to actual (active)
network device names like em1, em2 (or eth0, eth1).
This includes some logic to map ordered active nics to the
nic1, nic2 naming scheme. Embedded nics are always listed
first (in sort order) followed by any other active Nics
on the system.
With the new code:
{"type": "interface", "name": "nic1" }
is automatically translated (internally) to:
{"type": "interface", "name": "em1" }
This works for all top level "interface" devices, vlans, bonds, and
bridges alike. For vlans the 'device' name is translated instead
of the device name per vlan object conventions.
|
|
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.
|
|
|
|
Adds a from_json static method to all objects.
Also adds a top level object_from_json function that
can be used for all the interface and bridge types.
(everything except addresses and routes). This should
be useful for wiring processing JSON from the CLI.
|
|
Supports the configuration of OVS bond interfaces.
Also adds the ability to configure extra OVS_OPTIONS
for both bonds and bridges (useful for some modes of
operation)
|
|
Add ifcfg configuration support for Vlans and Vlan OVS ports.
|
|
Adds new object for OvsBridge. Also update the ifcfg network
config class to support adding bridges.
As part of the change both the bridge and interface classes
extend a _BaseOpts base class.
|
|
Adds an apply function to the ifcfg implementation
which:
1) Shuts down existing interfaces w/ ifdown
2) writes new interfaces config files (routes too)
3) Starts up new interfaces w/ ifup
|
|
Ifcfg formatted persistence for interfaces and routes.
|
|
Add some initial objects for interfaces, routes and addresses.
|