Discovery and bonding

Good day!

I'm trying to configure bonding with discovery.

All of my servers are equipped with 4 interfaces.

After powering a server on
it gets discovery image and sends facts about itself to foreman.

I click 'Provision' and it redirects me to
https://foreman.qa.linx.sbx.avp.ru/discovered_hosts/mac000c29e51652/edit
screen
I choose 'Interfaces' tab where I'm presented with all the interfaces

<https://lh3.googleusercontent.com/-48_yrE_2pXo/VsTYTzkyigI/AAAAAAAALVg/lFJe7b7I6lE/s1600/foreman_discovery.png>

How should I proceed further?

I've tried multiple scenarios and either way I ended up with not what I
wanted:

  • either bond's IP wasn't configured because I didn't specify IP in
    interface tab (I don't want two IPs wasted on one server)
  • FQDN doesn't resolves to bond's IP (but it resolves to one of it's slaves)
  • somehoow I ended up with half written host. When I try to delete it
    foreman fails with Host::Base#name= delegated to primary_interface.name=,
    but primary_interface is nil

Could please someone guide me through this stuff?

Hello,

> How should I proceed further?

discovery provided information about bare-metal interfaces.

Now, if you want to use Linux to create software bond, you need to
use Add Interface button, give it a type Bond, identifier will be
"bond0" and provide Attached devices (enoXYZ,enoABC) and then provision
your server.

What Foreman does during provisioning is really just configuring
network. For example in RHEL, configuration files are dropped as
described in the docs:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Network_Bonding_Using_the_Command_Line_Interface.html

The template which is used is in your Foreman, here is the source code:

https://github.com/theforeman/community-templates/blob/develop/snippets/kickstart_networking_setup.erb

I assume you will end up with one provisioning interface which you
select as Managed/Primary/provision and two others which will be bond
slaves. Those, you can keep unmanaged, therefore no DHCP reservation or
DNS record will be created. But you can still keep them managed if you
want.

The process for discovered hosts is very same as for New Hosts, the only
difference is that interfaces has been discovered already. There is no
magic really.

HELP NEEDED! We need to put this in our documentation, any volunteers?

ยทยทยท -- Later, Lukas #lzap Zapletal

Hi, Lukas!

Thanks to you I've managed to 'provision' server like I wanted (more or
less) clicking buttons in UI.

What about auto-provision feature?
I know that all of my servers have 4 nics and I want one bond in "802.3ad"
mode wth those 4 nics attached to it.
Is there any way to configure it in foreman?

ยทยทยท On Thursday, 18 February 2016 15:59:33 UTC+3, Lukas Zapletal wrote: > > Hello, > > > How should I proceed further? > > discovery provided information about bare-metal interfaces. > > Now, if you want to use Linux to create software bond, you need to > use Add Interface button, give it a type Bond, identifier will be > "bond0" and provide Attached devices (enoXYZ,enoABC) and then provision > your server. > > What Foreman does during provisioning is really just configuring > network. For example in RHEL, configuration files are dropped as > described in the docs: > > > https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Network_Bonding_Using_the_Command_Line_Interface.html > > The template which is used is in your Foreman, here is the source code: > > > https://github.com/theforeman/community-templates/blob/develop/snippets/kickstart_networking_setup.erb > > I assume you will end up with one provisioning interface which you > select as Managed/Primary/provision and two others which will be bond > slaves. Those, you can keep unmanaged, therefore no DHCP reservation or > DNS record will be created. But you can still keep them managed if you > want. > > The process for discovered hosts is very same as for New Hosts, the only > difference is that interfaces has been discovered already. There is no > magic really. > > HELP NEEDED! We need to put this in our documentation, any volunteers? > > -- > Later, > Lukas #lzap Zapletal >

> What about auto-provision feature?
> I know that all of my servers have 4 nics and I want one bond in "802.3ad"
> mode wth those 4 nics attached to it.
> Is there any way to configure it in foreman?

Auto-provisioning such a configuration is not yet possible.

ยทยทยท -- Later, Lukas #lzap Zapletal

> > Is there any way to configure it in foreman?
>
> Auto-provisioning such a configuration is not yet possible.

For the record, we are tracking this now under

http://projects.theforeman.org/issues/13847

ยทยทยท -- Later, Lukas #lzap Zapletal
1 Like