Problem with register host with bond0

Hi,
I have problem with correct interpretation of facts.
I have server with 4 interfaces and 2 of them (eth0, eth1) are up and
bonded.
eth0 is "primary" and set to boot from it.
When there is no bond0 everything is OK. After bond0 is set, foreman can
not register host. bond0 has te same IP and MAC as eth0.

More details:

On start i have interface settings:
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen
1000
link/ether 00:07:43:30:34:f0 brd ff:ff:ff:ff:ff:ff
inet 172.xx.xx.134/24 brd 172.18.20.255 scope global dynamic eth0
valid_lft 43172sec preferred_lft 43172sec
inet6 fe80::207:43ff:fe30:34f0/64 scope link
valid_lft forever preferred_lft forever
5: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen
1000
link/ether 00:07:43:30:34:f8 brd ff:ff:ff:ff:ff:ff

Facts:
[root@fdi /]# facter
auto_negotiation_eno1 => true
auto_negotiation_eno2 => true
auto_negotiation_eth0 => true
auto_negotiation_eth1 => true

dhcp_servers => {"system"=>"172.xx.xx.4", "eth0"=>"172.xx.xx.4"}
discovery_bootif => 00:07:43:30:34:f0
discovery_bootip => 172.xx.xx.134
discovery_release => 20150825.1

interfaces => eno1,eno2,eth0,eth1,lo
ipaddress => 172.xx.xx.134
ipaddress_eth0 => 172.xx.xx.134
ipaddress_lo => 127.0.0.1

link_eno1 => false
link_eno2 => false
link_eth0 => true
link_eth1 => true
link_lo => true
macaddress => 0c:c4:7a:55:0c:5c
macaddress_eno1 => 0c:c4:7a:55:0c:5c
macaddress_eno2 => 0c:c4:7a:55:0c:5d
macaddress_eth0 => 00:07:43:30:34:f0
macaddress_eth1 => 00:07:43:30:34:f8

netmask => 255.255.255.0
netmask_eth0 => 255.255.255.0
netmask_lo => 255.0.0.0
network_eth0 => 172.xx.xx.0
network_lo => 127.0.0.0

In foreman host is discovered correctly. In Provisioning->Interfaces every
interfaces has correct settings.

Create bond0:
nmcli con add type bond con-name bond0 ifname bond0 mode active-backup
nmcli con add type bond-slave ifname eth0 master bond0
nmcli con add type bond-slave ifname eth1 master bond0
nmcli con up bond0
nmcli con up bond-slave-eth0
nmcli con up bond-slave-eth1

New interface stettings:
4: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond0 state UP qlen 1000
link/ether 00:07:43:30:34:f0 brd ff:ff:ff:ff:ff:ff
5: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond0 state UP qlen 1000
link/ether 00:07:43:30:34:f0 brd ff:ff:ff:ff:ff:ff
6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP
link/ether 00:07:43:30:34:f0 brd ff:ff:ff:ff:ff:ff
inet 172.xx.xx.134/24 brd 172.18.20.255 scope global dynamic bond0
valid_lft 43176sec preferred_lft 43176sec
inet6 fe80::207:43ff:fe30:34f0/64 scope link
valid_lft forever preferred_lft forever

New facts:
[root@fdi /]# facter
auto_negotiation_bond0 => false
auto_negotiation_eno1 => true
auto_negotiation_eno2 => true
auto_negotiation_eth0 => true
auto_negotiation_eth1 => true

dhcp_servers => {"system"=>"172.xx.xx.4", "bond0"=>"172.xx.xx.4"}
discovery_bootif => 00:07:43:30:34:f0
discovery_bootip => 172.xx.xx.134
discovery_release => 20150825.1

interfaces => bond0,eno1,eno2,eth0,eth1,lo
ipaddress => 172.xx.xx.134
ipaddress_bond0 => 172.xx.xx.134
ipaddress_lo => 127.0.0.1

link_bond0 => true
link_eno1 => false
link_eno2 => false
link_eth0 => true
link_eth1 => true
link_lo => true
macaddress => 00:07:43:30:34:f0
macaddress_bond0 => 00:07:43:30:34:f0
macaddress_eno1 => 0c:c4:7a:55:0c:5c
macaddress_eno2 => 0c:c4:7a:55:0c:5d
macaddress_eth0 => 00:07:43:30:34:F0
macaddress_eth1 => 00:07:43:30:34:F8

netmask => 255.255.255.0
netmask_bond0 => 255.255.255.0
netmask_lo => 255.0.0.0
network_bond0 => 172.xx.xx.0
network_lo => 127.0.0.0

Everything seems to be OK.

And now in foreman -> discovered hosts I select "Refresh facts" and get:
"Warning!
Could not get facts from proxy http://:8443: the scheme http does not
accept registry part: :8443 (or bad hostname?)"
and in console i see:
"Response from Foreman 500: {
"error" : {"message": "address family must be specified"}

But when i go back to discovered host i see this server. Details are the
same as sent facts.

When i go to provisioning->interfaces i see 2 extra bond intefaces with
different MACs (I think that they are random) then eth0 (other interfaces
are there to).
I need to have in this place the same interface settings as facts but they
are different.

Do I something wrong or it's a bug?

Best Regards

Hello,

> When there is no bond0 everything is OK. After bond0 is set, foreman can
> not register host. bond0 has te same IP and MAC as eth0.

I don't understand your use-case. It looks like you are trying to create
bond on the discovered node? Main and the only purpose of fdi is to
report facts and reboot into installer. It's Anaconda job to configure
bonds afterwards.

··· -- Later, Lukas #lzap Zapletal

That was a shortcut. I did the same using modified .ks file and .zip file
as well. But restarting server all the time for testing take time, so I
tried with "refresh facts" after interfaces settings changes on discovered
host.
My use-case is to receive facts where there will be bond0 as master and
eth0 nad eth1 as slaves. It is necessary for auto provisioning.
After many tries, I have stuck. I wonder if any of you had a similar
problem?

W dniu wtorek, 1 września 2015 14:28:46 UTC+2 użytkownik Lukas Zapletal
napisał:

··· > > Hello, > > > When there is no bond0 everything is OK. After bond0 is set, foreman can > > not register host. bond0 has te same IP and MAC as eth0. > > I don't understand your use-case. It looks like you are trying to create > bond on the discovered node? Main and the only purpose of fdi is to > report facts and reboot into installer. It's Anaconda job to configure > bonds afterwards. > > -- > Later, > Lukas #lzap Zapletal >

> My use-case is to receive facts where there will be bond0 as master and
> eth0 nad eth1 as slaves. It is necessary for auto provisioning.

We don't support this kind of setup yet. You can override our networking
setup snippet/template to configure it your way.

··· -- Later, Lukas #lzap Zapletal

Getting the bonds into anaconda from the UI is a painful experience.
Delete en1 ip, delete eno2 ip, set en2 to be managed. go back, add a bond,
set bond type, select both cards that should be bonded, copy and paste the
primary MAC addr into bond so the provisioning works. Then go create a
virtual interface, tag the bond0 as vlan, assign vlan id and save. ouch…

If there was a "rule" that could be applied "if machine boots pxe with two
active interfaces, bond them to bond0 and tag to vlan"… that way in
foreman you just click provision and assign a single ip address and tag its
new target vlan a little easier…

i guess in my head if there are two active links, reflecting that from
discovery would yield better meta data and allowing some sort of defaults
would reduce work on backend side.

··· On Tuesday, September 1, 2015 at 7:28:46 AM UTC-5, Lukas Zapletal wrote: > > Hello, > > > When there is no bond0 everything is OK. After bond0 is set, foreman can > > not register host. bond0 has te same IP and MAC as eth0. > > I don't understand your use-case. It looks like you are trying to create > bond on the discovered node? Main and the only purpose of fdi is to > report facts and reboot into installer. It's Anaconda job to configure > bonds afterwards. > > -- > Later, > Lukas #lzap Zapletal >

Just to add more, kickstart supports bonding from inception… i know all of
my physical servers on specific segments will all be multihomed with a/b
networks. It would greatly simplify provisioning if 99% of the data need to
provision a bond is provided through discovery and the only thing i have to
do to provision is use correct vlan tag and IP for target network.

··· On Monday, November 9, 2015 at 10:32:55 AM UTC-6, Byron Miller wrote: > > Getting the bonds into anaconda from the UI is a painful experience. > Delete en1 ip, delete eno2 ip, set en2 to be managed. go back, add a bond, > set bond type, select both cards that should be bonded, copy and paste the > primary MAC addr into bond so the provisioning works. Then go create a > virtual interface, tag the bond0 as vlan, assign vlan id and save. ouch.. > > If there was a "rule" that could be applied "if machine boots pxe with two > active interfaces, bond them to bond0 and tag to vlan".. that way in > foreman you just click provision and assign a single ip address and tag its > new target vlan a little easier.. > > i guess in my head if there are two active links, reflecting that from > discovery would yield better meta data and allowing some sort of defaults > would reduce work on backend side. > > > On Tuesday, September 1, 2015 at 7:28:46 AM UTC-5, Lukas Zapletal wrote: >> >> Hello, >> >> > When there is no bond0 everything is OK. After bond0 is set, foreman >> can >> > not register host. bond0 has te same IP and MAC as eth0. >> >> I don't understand your use-case. It looks like you are trying to create >> bond on the discovered node? Main and the only purpose of fdi is to >> report facts and reboot into installer. It's Anaconda job to configure >> bonds afterwards. >> >> -- >> Later, >> Lukas #lzap Zapletal >> >