azurelinux
azurelinux copied to clipboard
Image Customizer: Improve resolv.conf behavior.
Instead of just deleting the resolv.conf file at the end of customization, restore it to its original state that was seen in the base image.
In addition, if the resolv.conf didn't exist in the base image and the systemd-resolved service is enabled, then add the symlink that would normally be created during first-boot. This is particularly useful for verity images where the filesytem is readonly.
Also, fix the verity example config for Azure Linux 3.0 to have default network settings that enable a DHCP client on all "physical" NICs. This is needed since cloud-init doesn't work well in verity images.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
- [x] The toolchain has been rebuilt successfully (or no changes were made to it)
- [x] The toolchain/worker package manifests are up-to-date
- [x] Any updated packages successfully build (or no packages were changed)
- [x] Packages depending on static components modified in this PR (Golang,
*-staticsubpackages, etc.) have had theirReleasetag incremented. - [x] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
- [x] All package sources are available
- [x] cgmanifest files are up-to-date and sorted (
./cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json) - [x] LICENSE-MAP files are up-to-date (
./SPECS/LICENSES-AND-NOTICES/data/licenses.json,./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md,./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON) - [x] All source files have up-to-date hashes in the
*.signatures.jsonfiles - [x]
sudo make go-tidy-allandsudo make go-test-coveragepass - [x] Documentation has been updated to match any changes to the build system
- [x] If you are adding/removing a .spec file that has multiple-versions supported, please add @microsoft/cbl-mariner-multi-package-reviewers team as reviewer (Eg. golang has 2 versions 1.18, 1.21+)
- [x] Ready to merge
Does this affect the toolchain?
NO
Test Methodology
- Ran existing UTs.
- Added new UTs.
- Manually ran image customizer tool.