Skip to content
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

modify resolv-conf resource #27

Merged
merged 1 commit into from
Aug 22, 2024
Merged

modify resolv-conf resource #27

merged 1 commit into from
Aug 22, 2024

Conversation

kornface13
Copy link

@kornface13 kornface13 commented Aug 21, 2024

Description

Modify the resolve.conf template resource so that it removes the systemd-resolve managed symlink and creates a regular file.

Context / Why are we making this change?

When chef attempts to update a template that's symlinked, it will update the source file instead of the file you intend to update.

On Ubuntu, /etc/resolv.conf is symlinked to /run/systemd/resolve/stub-resolv.conf and managed by systemd-resolved.
Resolve.conf and systemd-resovled both attempt to update the same file, so it's safe to assume you shouldn't ever be using both at the same time. If you use resolve.conf, we want to remove this symlink and treat resolv.conf as a normal file.

Both options (force_unlink and manage_symlink_source) seem to be needed based on this bug report: chef/chef#4992

Testing and QA Plan

Images build and function correctly with these additional options added to the template resource.

@kornface13 kornface13 merged commit ec07a0e into main Aug 22, 2024
1 of 10 checks passed
@kornface13 kornface13 deleted the update_fb_resolv branch August 22, 2024 14:17
ericnorris added a commit that referenced this pull request Nov 11, 2024
This reverts commit ec07a0e, reversing
changes made to b774201.
ericnorris added a commit that referenced this pull request Nov 11, 2024
Per @kornface13, this is no longer necessary - reverting so I can pull
in #28.

This reverts commit ec07a0e, reversing
changes made to b774201.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants