-
Notifications
You must be signed in to change notification settings - Fork 371
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
[BUG] waagent delete resolv.conf between reboots #1878
Comments
Hey @trstringer, @anhvoms could you take a look at this? Thanks. |
Any news on this? @trstringer, @anhvoms |
walinuxagent should only be deleting this file on deprovisioning. Can you provide the scenario that this is happening to you with? |
@trstringer we have following all steps described here to upload our custom vhd: This guide requires deprovision before vhd upload to azure... We are deploying using terraform (azureRM) and every reboot /etc/resolv.conf is deleted (we are using chattr +i as a workaround) |
Do you mean more specifically these steps (Prepare a Red Hat-based virtual machine for Azure)? Can you share your |
Yes that is the document. Please let me reproduce the error and post the logs... |
Is your machine running NetworkManager? It appears as though NetworkManager should be managing and updating |
Closing this issue, but if you want to continue troubleshooting please feel free to re-open. |
I'd like to reopen this issue, as I've encountered the same odd behavior, and had to use the same workaround to set the file immutable. This feature only works correctly if you're presuming that NetworkManager is handling that file's contents - in which case it would replace it anyway. If you need to retain a static DNS configuration, then waagent blows it away with no option to exclude that file. It's fine as a default, but there really should be a waagent.conf setting that controls this or overrides it. |
Description:
in our RHEL7.7 systems DNS resolution is missing between reboots because waagent deletes /etc/resolv.conf always... the unique available fix to circumvent this behavior is set immutable flag in /etc/resolv.conf (this is fairly very problematic, nobody else imagine setting that flag in that file...)
So, that is the same as in #1151 #1164 #1215 #754 and #855 (cloud-init, fixed by not deleting cloud-init files that waagent have not created)
waagent should not be deleting files that it didn't create At least not system critical files.
resolv.conf belongs to a package in the network stack and if waagent messes with it this will generate system malfunction and system package problems (if we check integrity of package it will report that the package have problems because some files were deleted).
Distro and WALinuxAgent details
The text was updated successfully, but these errors were encountered: