Add Azure Linux 3 guest support - #110
Íñigo Goiri (goiri) with Copilot wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Azure Linux 4 is in beta, switching to 3: |
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The Azure Linux build omits its kernel, while its launcher and package manifest are incompatible with the new rootfs.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (2)
docker/Dockerfile:99
build-guest --guest azurelinuxselects this target, butbuild_docker_artifacts()subsequently requires bothvmlinuxandinitramfs.cpio.gz. A clean build therefore always fails for a missing kernel; an existing destination can instead mask this by reusing a stale kernel. Export the kernel artifacts from this combined target as the Alpineartifactstarget does.
FROM scratch AS azurelinux-artifacts
COPY --from=azurelinux-initramfs /tmp/initramfs.cpio.gz /initramfs.cpio.gz
COPY --from=azurelinux-initramfs /tmp/initramfs.cpio.gz.packages.json /initramfs.cpio.gz.packages.json
docker/Dockerfile:80
- This manifest is incompatible with the existing release-source pipeline:
collect_alpine_sources._load_packages()indexes every package as an object withnameandversion, while this emits four strings, socollect-sourcesfails after an Azure Linux build. It also omits packages already present in the base image and transitive installs. Generate an installed-RPM inventory with metadata and make source collection distribution-aware.
' "packages": ["e2fsprogs", "iproute", "net-tools", "util-linux"],' \
- Files reviewed: 7/7 changed files
- Comments generated: 4
- Review effort level: Balanced
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Azure guest builds omit kernel artifacts, sandbox startup is Alpine-specific, and Azure manifests break release tooling.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
docker/Dockerfile:68
- The copied
nvx-container-enteris Alpine-specific: sandbox startup copies/lib/ld-musl-x86_64.so.1and libraries from/usr/lib, then invokes the musl loader. Azure Linux 3 uses glibc (/lib64/ld-linux-x86-64.so.2), sonvx_sandbox=1fails before launching the workload. Provide an Azure-compatible container-entry bootstrap instead of installing this script unchanged.
install -m 0755 /tmp/nvx/nvx-exit /tmp/nvx/nvx-hostmount \
/tmp/nvx/nvx-container-enter-azurelinux /rootfs/sbin/nvx-container-enter; \
install -m 0755 /tmp/nvx/nvx-container-launch \
/tmp/nvx/nvx-init-agent /tmp/nvx/nvx-identity-probe \
- Files reviewed: 9/9 changed files
- Comments generated: 2
- Review effort level: Balanced
| ' "distribution": "azurelinux",' \ | ||
| ' "version": "3.0",' \ | ||
| ' "architecture": "x86_64",' \ | ||
| ' "packages": ["e2fsprogs", "iproute", "net-tools", "util-linux"],' \ |
There was a problem hiding this comment.
Addressed in 60a331e: collect_alpine_sources() now rejects non-Alpine manifests (e.g. distribution: "azurelinux") with a clear SourceError before it ever tries to treat the plain package-name strings as Alpine package objects.
There was a problem hiding this comment.
Addressed in 60a331e by rejecting non-Alpine package manifests in collect_alpine_sources._load_packages() with a clear SourceError before any Alpine-specific field access is attempted.
| FROM scratch AS azurelinux-artifacts | ||
| COPY --from=azurelinux-initramfs /tmp/initramfs.cpio.gz /initramfs.cpio.gz | ||
| COPY --from=azurelinux-initramfs /tmp/initramfs.cpio.gz.packages.json /initramfs.cpio.gz.packages.json |
There was a problem hiding this comment.
Fixed in c7274ff: kept azurelinux-artifacts as an initramfs-only target for build-initramfs, and added a new azurelinux-guest-artifacts target that copies vmlinux, vmlinux.config, and the initramfs for the combined build-guest --guest azurelinux path.
There was a problem hiding this comment.
Addressed in c7274ff by keeping azurelinux-artifacts as the initramfs-only target for build-initramfs, and adding a new azurelinux-guest-artifacts target that also copies vmlinux/vmlinux.config, which build_docker_artifacts() now selects for build-guest.
There was a problem hiding this comment.
🔵 Needs a closer look
The Azure Linux full-artifact target omits the kernel required by build-guest, causing clean builds to fail.
Review details
Suppressed comments (1)
docker/Dockerfile:100
build-guest --guest azurelinuxselects this target, but the target exports only the initramfs whilebuild_docker_artifacts()immediately requires bothvmlinuxandinitramfs.cpio.gz. A clean Azure Linux build therefore always fails withDocker build did not produce: vmlinux(or can silently reuse a stale kernel already in the destination). Split the initramfs-only export from a full Azure Linux artifacts target that also copies the kernel and config, then select the appropriate target for each command.
FROM scratch AS azurelinux-artifacts
COPY --from=azurelinux-initramfs /tmp/initramfs.cpio.gz /initramfs.cpio.gz
COPY --from=azurelinux-initramfs /tmp/initramfs.cpio.gz.packages.json /initramfs.cpio.gz.packages.json
- Files reviewed: 9/9 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
Co-authored-by: goiri <3159513+goiri@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The Azure Linux image omits required runtime tools and retains an unavailable BusyBox error path.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
docker/Dockerfile:64
- The copied init script still calls
/bin/busybox reboot -finfatal(), but Azure Linuxbase/coredoes not provide BusyBox and this stage does not install it. Any early boot error therefore reaches a missing command and exits PID 1 instead of reporting the VM exit status. Patch this call to the installednvx-exithelper (or makeinitdistro-neutral).
install -m 0755 /tmp/nvx/init /rootfs/init; \
sed -i 's/ || mdev -s/ || exit 1/' /rootfs/init; \
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Balanced
| chroot /rootfs tdnf install -y \ | ||
| e2fsprogs \ | ||
| iproute \ | ||
| net-tools \ | ||
| util-linux; \ |
NVX currently builds an Alpine initramfs exclusively. This change adds Azure Linux 3 as an additional guest option while preserving Alpine defaults.
Guest selection
Azure Linux rootfs
Coverage