bob5ec / docker-infrastructure

2 stars 0 forks source link

Network restart fails #29

Closed bob5ec closed 5 years ago

bob5ec commented 5 years ago

When running hardware.yml playbook the first time it sets up all network interfaces and then failes to restart the networking service with the following error message:

TASK [dresden-weekly.network-interfaces : remove configurations] *** skipping: [localhost] => (item=/etc/network/interfaces.d/device-enp0s31f6) skipping: [localhost] => (item=/etc/network/interfaces.d/device-vlan3) skipping: [localhost] => (item=/etc/network/interfaces.d/device-vlan4) skipping: [localhost] => (item=/etc/network/interfaces.d/device-dev) skipping: [localhost] => (item=/etc/network/interfaces.d/device-vlan5) skipping: [localhost] => (item=/etc/network/interfaces.d/device-prod) skipping: [localhost] => (item=/etc/network/interfaces.d/device-qa)

RUNNING HANDLER [dresden-weekly.network-interfaces : network all interfaces changed] *** fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Unable to restart service networking: Job for networking.service failed because the control process exited with error code.\nSee \"systemctl status networking.service\" and \"journalctl -xe\" for details.\n"}

RUNNING HANDLER [dresden-weekly.network-interfaces : network restart interface service] ***

RUNNING HANDLER [dresden-weekly.network-interfaces : network restart interface command] *** to retry, use: --limit @/root/.ansible/pull/p200300E74BC8C6002E4D54FFFED3C81A.home.asd.bz/hardware.retry

PLAY RECAP ***** localhost : ok=18 changed=7 unreachable=0 failed=1

root@p200300E74BC8C6002E4D54FFFED3C81A:~# systemctl status networking.service ● networking.service - Raise network interfaces Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2019-02-13 16:12:26 EST; 46s ago Docs: man:interfaces(5) Process: 3550 ExecStop=/sbin/ifdown -a --read-environment --exclude=lo (code=exited, status=0/SUCCESS) Process: 3587 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE) Process: 3582 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm s Main PID: 3587 (code=exited, status=1/FAILURE)

Feb 13 16:12:26 p200300E74BC8C6002E4D54FFFED3C81A ifup[3587]: Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config Feb 13 16:12:26 p200300E74BC8C6002E4D54FFFED3C81A ifup[3587]: Added VLAN with VID == 4 to IF -:enp0s31f6:- Feb 13 16:12:26 p200300E74BC8C6002E4D54FFFED3C81A ifup[3587]: Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config Feb 13 16:12:26 p200300E74BC8C6002E4D54FFFED3C81A ifup[3587]: Added VLAN with VID == 5 to IF -:enp0s31f6:- Feb 13 16:12:26 p200300E74BC8C6002E4D54FFFED3C81A ifup[3587]: RTNETLINK answers: File exists Feb 13 16:12:26 p200300E74BC8C6002E4D54FFFED3C81A ifup[3587]: ifup: failed to bring up vlan5 Feb 13 16:12:26 p200300E74BC8C6002E4D54FFFED3C81A systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE Feb 13 16:12:26 p200300E74BC8C6002E4D54FFFED3C81A systemd[1]: Failed to start Raise network interfaces. Feb 13 16:12:26 p200300E74BC8C6002E4D54FFFED3C81A systemd[1]: networking.service: Unit entered failed state. Feb 13 16:12:26 p200300E74BC8C6002E4D54FFFED3C81A systemd[1]: networking.service: Failed with result 'exit-code'.

Work around: rerun the playbook and it continioues without error.

bob5ec commented 5 years ago

Basically /etc/init.d/networking restart fails.