gislab-npo / gislab

GIS.lab - total reduction of deployment and maintenance costs for complete free and open source geospatial infrastructure
http://gislab-npo.github.io/gislab/
GNU General Public License v3.0
40 stars 14 forks source link

xenial: network devices names #497

Closed landam closed 7 years ago

landam commented 8 years ago

After GIS.lab initialization (see #496) I run

ansible ... system/gislab.yml

which failed with

TASK [basic-configuration : Activate GIS.lab network IP address if not received from provider] ***
fatal: [gislab-unit-cvut]: FAILED! => {"changed": true, "cmd": ["ip", "addr", "add", "192.168.17.5/24", "dev", "eth0"], "delta": "0:00:00.004454", "end": "2016-06-05 14:19:02.564178", "failed": true, "rc": 1, "start": "2016-06-05 14:19:02.559724", "stderr": "Cannot find device \"eth0\"", "stdout": "", "stdout_lines": [], "warnings": []}
landam commented 8 years ago

@mpastor I guees that the settings should be set from eth0 to eno1?

landam commented 8 years ago

The issue with network device should be fixed by 6fe4b95.

landam commented 8 years ago

The rest of roles finishes successfully.

PLAY RECAP *********************************************************************
gislab-unit-cvut           : ok=347  changed=285  unreachable=0    failed=0   
landam commented 8 years ago

Shouldn't be GISLAB_SERVER_NETWORK_DEVICE in Vagrantfile changed from eth1 to eno2? BTW, there are still references in the code to eth0:

 providers/gislab-unit/iso/gislab.seed.template:d-i netcfg/choose_interface select eth0
providers/gislab-unit/templates/network/fix-hardware-unit-hang.j2:ethtool -K eth0 tso off
system/roles/client-desktop/templates/initramfs-tools/scripts/init-premount/udhcp.j2:iface=eth0
system/roles/client-desktop/templates/initramfs-tools/scripts/init-premount/udhcp.j2:        # Make a DHCP request for interface eth0
system/roles/client-desktop/templates/desktop/conky/conky.conf.j2:${color0}ETH0 ${color1}${downspeed eth0}:${upspeed eth0}
system/group_vars/all:# 'eth0' and setting default gateway via 'eth1' device.
system/group_vars/all:# Removing original default gateway: ip route del default via 10.0.2.2 dev eth0
landam commented 8 years ago

See https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

landam commented 8 years ago

In summary:

@imincik @mpastor Make sense to you?

imincik commented 8 years ago

@landam , network devices names can vary in different systems. It is very complicated, but I have some ideas.

For sure, the network names should be replaced by ansible network device variables, they shouldn't be hardcoded.

In "client-desktop" we can even implement predictable network names, because we have full control on that system, but with server we must probably finish with some better solution.

landam commented 7 years ago

@imincik , can you provide some details about your idea? Thanks!

landam commented 7 years ago

All issues seems to be solved.