netgroup-polito / un-orchestrator

Universal Node Orchestrator
Other
21 stars 13 forks source link

The evil network manager #126

Closed ivanocerrato closed 7 years ago

ivanocerrato commented 7 years ago

The network manager should not control the interfaces managed by the universal node:

As described here, to specify that the network manager must not control a specific interface, on Ubuntu (it's fine, since we explicitly say that the UN must be installed on Ubuntu) it is necessary to edit the file /etc/NetworkManager/NetworkManager.conf as follows:

[main]
plugins=keyfile

[keyfile]
unmanaged-devices=mac:xx:xx:xx:xx:xx:xx

where xx:xx:xx:xx:xx:xx is the mac address of the interface you want to ignore.

Then, each time the UN creates an interface, it has to retrieve the MAC address (e.g., through ifconfig) and edit the file above. Note that it is not necessary to restart the network manager when the file is edited.

This avoids that the nasty network manager keeps control of an interface when is created, it assigns it an IP address which (very likely in a live demo) will conflict with some other addresses we already configured on the box, with the consequence of messing up the entire routing and bringing the live demo to fail.