Repository navigation
Known Issues
List of known issues:
- 2.2.54.2 - waagent-network-setup.service: main process exited, code=exited, status=2/INVALIDARGUMENT
[2.2.54.2] - waagent-network-setup.service: main process exited, code=exited, status=2/INVALIDARGUMENT
The waagent-network-setup.service is a helper utility service installed by the GuestAgent whose only purpose is to setup the firewall rules on the Linux VMs on system reboot before network.service is established on the VM. When a custom image is created from another VM, the new VM also inherits the unit file of this helper service which throws this error. Here's a snippet of the error -
Logs from the waagent-network-setup.service since system boot:
-- Logs begin at Thu 2021-04-15 20:33:35 UTC, end at Thu 2021-04-15 20:34:40 UTC. --
Apr 15 20:33:59 p0077c1d14pm01c000002 python[1079]: /usr/bin/python: can't open file '/var/lib/waagent/WALinuxAgent-2.2.54.2/bin/WALinuxAgent-2.2.54.2-py2.7.egg': [Errno 2] No such file or directory
Apr 15 20:34:01 p0077c1d14pm01c000002 systemd[1]: waagent-network-setup.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 15 20:34:01 p0077c1d14pm01c000002 systemd[1]: Failed to start Setup network rules for WALinuxAgent.
Apr 15 20:34:01 p0077c1d14pm01c000002 systemd[1]: Unit waagent-network-setup.service entered failed state.
Apr 15 20:34:01 p0077c1d14pm01c000002 systemd[1]: waagent-network-setup.service failed.
This is a benign issue which does not impact the working of the GuestAgent at all. All this error means is that the helper utility was unable to setup the firewall rules for the VM on boot, which is independent of the workings of the GuestAgent completely. On top of it, this error would go away as soon as the system is rebooted again because the agent on startup replaces the missing egg file with the most recent one for that specific VM.
The root cause of this issue is that during deprovision of the original VM, the unit file is not being cleaned up. This is due to the daemon version < 2.2.54.2 in the VM. Once the daemon version is updated to this version on the original VM, the unit file would be cleaned up properly on deprovision and you would not see this error anymore.
As mentioned before, this error message is benign and does not mean anything is wrong with the WALinuxAgent at all, but if it bothers the customers some temporary mitigations that can be applied are -
- Reboot the VM
- If restarting the VM is not an option, restart the service -
systemctl restart waagent-network-setup.serviceorsystemctl restart walinuxagent-network-setup.servicebased on the distro. - (Preventive measure) During deprovision of your VM, manually delete the unit files from the VM by executing these commands -
rm -rf /usr/lib/systemd/system/wa*agent-network-setup.service*
rm -rf /lib/systemd/system/wa*agent-network-setup.service*