juju-solutions / layer-flannel

0 stars 2 forks source link

Behavior of determining network interface is currently cumbersome and does not work by default #16

Closed lazypower closed 8 years ago

lazypower commented 8 years ago

With the change to s ystem d, we can no longer rely on 'eth0' being the holy grail of network interfaces.

This poses a problem for "works by default" without user intervention. what we want to do is instead: sniff the primary network device.

(handy little snippet from bruzer to determine this)

route | grep default | head -n 1 | awk {'print $8'}

and change the default option to 'none'. This will give a sane default behavior across clouds, laptops, and metal alike when running on both systemd, and upstart based systems. If this is not the appropriate network interface, we can then take config p

juju set-config $application iface=myiface1

Which will trigger flannel to re-configure itself and bind to a different address, and then restart the workload daemon, so the containers are on the appropriate bridge