Skip to content

Delete /etc/resolv.conf in captured image #6

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

Merged
merged 2 commits into from
Aug 8, 2022
Merged

Delete /etc/resolv.conf in captured image #6

merged 2 commits into from
Aug 8, 2022

Conversation

sjpb
Copy link
Collaborator

@sjpb sjpb commented Aug 4, 2022

CI on arcus is broken with the previous image openhpc-220526-1354.qcow2. That image was built on arcus's portal-internal subnet and /etc/resolv.conf contains that subnets DHCP addresses as the nameservers. When booted on the ilab-60 subnet cloud-init detects there is dns information on the subnet, disables network manager's control of /etc/resolv.conf, and APPENDS (rather than rewriting entirely) one of the ilab-60 subnet's nameservers (which are external cambridge ones) to /etc/resolv.conf. The upshot is that /etc/resolv.conf on ilab-60 contains two nameservers which the VM can't connect to, so it eventually falls back to the last one. However the fallback is slow enough (~16s) to entirely break e.g. dnf install.

Note the previous image works on smslabs as the subnet used there does not contain dns information, hence network manager is left in control of /etc/resolv.conf and can entirely rewrite it.

The fix is simply to delete /etc/resolv.conf; this enables either network manager or cloud-init to generate it in full on boot.

NB: This also bumps the base image from RockyLinux 8.5 to 8.6, seeing as a rebuild was required anyway.

@sjpb
Copy link
Collaborator Author

sjpb commented Aug 4, 2022

Created openhpc-220804-1319.qcow2

@sjpb
Copy link
Collaborator Author

sjpb commented Aug 4, 2022

Failed on upload to s3 because of lack of quota.

@sjpb sjpb merged commit f116608 into main Aug 8, 2022
@sjpb sjpb deleted the fix/resolv branch October 5, 2022 16:18
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.

1 participant