Hey guys, i need some help trying to find the cause of a really weird issue.
I have a VM on OpenStack with NethServer configured as Samba DC (192.168.0.4 and nsdc 192.168.0.5).
Everything is working fine.
Then i created another VM on Openstach with NethServer, This VM can reach the Samba DC on .5 and the host .4 without any problems.
I was following the wiki to setup a secondary DC on this VM, set host ip 192.168.0.6 and the NSDC ip 192.168.0.7.
When the NSDC starts, i cannot reach 192.168.0.4 and 192.168.0.5 anymore. Theres no reference at this machine to those ip addresses anywhere.
If i remove the NSDC, without any reboot, i can reach those addresses again.
The VM was not cloned, but i checked the mac address. They both have different macs BUT this new VM ended with the ETH1 mac equals the bridge mac. Is that a problem? The other vm have differenct macs for eth1 and bridge.
Its
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000
link/ether fa:16:3e:0c:b0:2e brd ff:ff:ff:ff:ff:ff
inet6 fe80::f816:3eff:fe0c:b02e/64 scope link
valid_lft forever preferred_lft forever
8: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether fa:16:3e:0c:b0:2e brd ff:ff:ff:ff:ff:ff
inet 192.168.0.6/16 brd 192.168.255.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::f816:3eff:fe0c:b02e/64 scope link
valid_lft forever preferred_lft forever
Its seems that the NSDC interface from this new VM have the same Mac Address that the Samba DC NSDC.
They both now have ETH1 and BR0 with different macs.
It seems that systemd-spawn uses a hash on the container name to generate a mac address. Both containers have the same fixed name.
I manually changed the macaddress at : /var/lib/machines/nsdc/etc/systemd/network/green.network
and its working!
I dont know how to set the mac address at the template to make it permanent.
Also i believe this needs to be documented, right?
Nice find. I think this is something to keep in mind. Especially when multi-DC is involved. IMO sooner or later this scenario must be supported by NS Samba4 AD account provider.
Create /etc/e-smith/templates-custom/var/lib/machines/nsdc/etc/systemd/network/green.network/90setmac with following content. I assume you used something like this: