Upcoming networking changes summary

Hello everyone,

Recently, we've been working on Foreman networking refactoring [1]. While it
seemed as a simple change it changes a lot in orchestration code. We have a
stable-ish branch [2] from which we'll create a PR soon and which will be used
for next weeks deep dive [3]. We'd like to give you some overview of our work
before that so you can get your hands on code and eventually help us testing
this.

First you'll notice UI changes. You no longer specify IP/MAC/Domain/Subnet
directly in networking tab but you set it on Primary interface. Networking tab
contains list of all interfaces and you edit them in modal window. Primary
interface is always precreated for you so you just have to adjust values.
Primary interface is used to determine the host's FQDN. The shortname from the
first tab (Host) is synced to Primary interface sub-form. Changes to the
shortname in either place should reflected in the other place.

Then we have also Provision interface. Every host must have one Primary and
one Provision interface (actually one interface can be both primary and
provision). Provision interface determines on which subnet you want to
provision the host (TFTP). Eventually we'll allow mutliple provisioning
interfaces (for bonds etc) but for now we're limiting it to one.

If you don't deploy on bare metal you probably know that we have also nic
objects on Virtual Machine tab in host form. We added some linking to nics
from Networking tab. You can specify identifier of interface from Networking
tab and orchestration will sync MAC address after NIC is created in CR. This
is required for Libvirt/oVirt CRs, as we need to associate the MAC(s)
returned from Fog to the Nic objects (e.g. for a single interface system put
"eth0" in the Identifier field for the Nic, and the same "eth0" in the Id
field on the VM tab. It's not too convenient but it's important milestone for
following PRs since we'll be able to merge both sub-forms into one and do the
linking automatically.

It also fixes issues with update of IP and MAC during facts import. We don't
rely in ipaddress and macaddress facts for primary interface determination.

So far we tested this on baremetal, Libvirt, oVirt, and Openstack environments
and we are testing VMware at the moment. We would really appreciate helping
with testing. In particular, testing of the other Compute Resources is needed.

For testers:

Warning, before testing you should backup your database! If you want to help
with testing, I suggest you try edge cases like rollbacks, conflicting
records, multiple nics, bmc orchestration etc.

Note that the branch may change (there are still minor issues). Once we have
PR opened I'll send a link here. We already know about these:

  • oVirt VM form namespace overlaps with Nic form
  • Name on the primary nic not always updated when primary nic flag is moved
  • Libvirt VMs must have the provisioning interface as the first in the list of
    VM nics
    • Position in the list of Network nics is irrelevant, it's just that
      libvirt will only boot from the first vm nic
    • This issue probably always existed, but it's worth remembering :slight_smile:
  • Editing or adding new interface in host edit form creates some "undefined"
    interface
  • Hitting enter on host's name field triggers modal window which will freeze
    your screen

For developers:

There might be some internal backward incompatible changes. Some plugins may
be affected, foreman_discovery should be fixed but staypuft plugin might be
broken by this change. If you are author of a plugin that deals with Foreman
networking and it stopped to work, please let us know so we can help.

[1] Refactor #7456: Extract primary interface from host - Foreman
[2] https://github.com/ares/foreman/commits/fix/7456-extract-host-interface
[3] https://plus.google.com/u/0/events/cuvptj02clqur9nojqcflc4pijc

··· -- Marek

Addition: VMware appears to have the same namespace clash as oVirt,
we're looking into it.

Namespace issues in the forms appear to be fixed - I've successfully
played with Libvirt and Openstack, and am currently testing VMware and
Ovirt.

Pull request is now open at
https://github.com/theforeman/foreman/pull/1988 for initial review,
but reviews may wish to wait for the demo on Monday first :wink:

Greg

··· On 26 November 2014 at 18:17, Greg Sutcliffe wrote: > Addition: VMware appears to have the same namespace clash as oVirt, > we're looking into it.