I have observed an issue where network interface name got updated from ens192 to eth0 on Ubuntu 20 OS after performing patching.
Because of this change in network interface name, docker container running on respective nodes throws below error -
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Before performing patching, output of "ip a" commands looks like below -
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
inet x.x.x.x/22 brd x.x.x.x scope global ens192
After performing patching, docker container throws an error as mentioned above. And doing node reboot results into node being inaccessible via ping and SSH.
When checked through VMWare console, we can see that network interface name is updated to eth0 which is not expected. We have defined ens192 interface name in /etc/netplan/99-netcfg-vmware.yaml as below -
# Generated by VMWare customization engine.
network:
version: 2
renderer: networkd
ethernets:
ens192:
dhcp4: no
dhcp6: no
addresses:
- x.x.x.x/22
gateway4: x.x.x.x
The netplan configuration on the node expects an interface named ens192, but suddenly nodes are using eth0 name instead.
As a workaround, we are renaming eth0 interface back to ens192 using below commands.
sudo ip link set eth0 down
sudo ip link set eth0 name ens192
sudo ip link set ens192 up
After executing above commands, node is responding via ping and SSH. But these changes are not persistent. After doing node reboot, network interface name is again getting updated to eth0 from ens192.