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

Ensure /etc/resolv.conf symlink exists by default as it has regressed with overlayfs switch from previous behavior #1265

Closed
invidian opened this issue Nov 28, 2023 · 2 comments
Labels
kind/bug Something isn't working platform/Azure

Comments

@invidian
Copy link
Member

Description

I'm reporting it as a bug, as it's a regression from earlier Flatcar versions where this issue did not occur.

With image-builder project, as part of building Flatcar CAPI images, we run /usr/share/oem/bin/waagent -force -deprovision+user before shutting down building machine to ensure resulting OS image can be used for booting multiple instances.

Waagent deprovisioning removes /etc/resolv.conf file which with Flatcar version stable 3602.2.2 results in a broken DNS resolution on newly booted machines. This is because /etc/resolv.conf symlink has been removed and there is nothing to re-create it. This hasn't been an issue in the past, as Flatcar was not using overlayfs for /etc/ directory.

Impact

This has broken CAPZ e2e tests, meaning CAPZ deployments for Flatcar are currently broken.

Environment and steps to reproduce

  1. Set-up: [ describe the environment Flatcar/Lokomotive/Nebraska etc was running in when encountering the bug; Platform etc. ]
  2. Task: [ describe the task performing when encountering the bug ]
  3. Action(s): [ sequence of actions that triggered the bug, see example below ]
    a. [ requested the start of a new pod or container ]
    b. [ container image downloaded ]
  4. Error: [describe the error that was triggered]

Expected behavior

/etc/resolv.conf file should be recreated by default by Flatcar, for example with a tmpfiles.d rule.

CC @pothos @jepio @tormath1

@pothos
Copy link
Member

pothos commented Nov 28, 2023

It can also happen with other files. In Flatcar we have to either add the filtered-out /etc tmpfile rules back (downside is that it creates state in the upperdir) or clean up the overlayfs whiteouts for files that should exist (according to a tmpfile rule) so that they get propagated from the lowerdir.

PR: flatcar/scripts#1442

@pothos
Copy link
Member

pothos commented Nov 30, 2023

Merged and picked for Stable, Beta, Alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working platform/Azure
Projects
None yet
Development

No branches or pull requests

3 participants