-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.2.12] /etc/resolv.conf is removed if create a VM base on an specialized image #754
Comments
@yuxisun1217 When the VM unique identifier changes, the VHD / image could be running anywhere, even in an entirely new region. If so, cached network state is almost certain to be invalid. I don't believe the agent should "restart" the network in this case. That feels like distribution-related code that best belongs in a systemd unit. However, we can make the changes necessary to ensure all messages get properly emitted to the log file. |
Hi @brendandixon , Everytime the VM is booted, the NetworkManager(RHEL-7) or dhclient(RHEL-6) will regenerate the /etc/resolv.conf. When we create a VM base on the specialized image, the /etc/resolv.conf is a new file, not the cached one. |
@yuxisun1217 I appreciate the details. I need to consider distributions other than Red Hat as well. |
Addressed by #776 |
Hi @brendandixon , In WALA-2.2.14, it seem that the 2nd issue still exists: |
@yuxisun1217 That is correct. I have mixed emotions about writing the message to |
@brendandixon OK, got it. Thanks! |
Hi,
In WALA-2.2.12, when I create a VM base on a specialized image, the /etc/resolv.conf file is removed and cannot be generated only if I restart network or reboot.
Reproduce steps:
/var/log/messages:
Additional Info:
Root cause is when creating a VM and the /var/lib/waagent/provisioned file exists, wala runs "deprovision_handler.run_changed_unique_id()", it calls "del_resolv"(Line#212 in pa/deprovision/default.py), which will delete the /etc/resolv.conf.
In my opinion, when we create a new VM, the /etc/resolv.conf will be regenerated by dhclient script or NetworkManager. Do we need to remove it? And if we have to remove it, I think we'd better restart network to regenerate it.
The WARNING logs "WARNING! Cached DHCP leases will be deleted.", "WARNING! /etc/resolv.conf will be deleted." are only printed in /var/log/messages but not in /var/log/waagent.log. I think we'd better also print them in /var/log/waagent.log.
Thanks!
The text was updated successfully, but these errors were encountered: