Public bug reported:

When building an image for Azure, we install walinuxagent by default.
The current postinst has a branch for dracut. The dracut command
utilizes `uname -r` to get the current kernel version. However, this
returns the kernel version for the builder machine (host kernel), not
the new image kernel that is temporarily mounted. This results in a
kernel mismatch and the postinst fail to process, resulting in the
inability to build resolute with walinuxagent pre-installed. Notably,
the update-initramfs is a valid command for both dracut and initramfs-
tools, so the dracut command likely is not needed anyway. See build
failure log below:

Setting up walinuxagent (2.15.0.1-0ubuntu1) ...
update-initramfs: deferring update (trigger activated)
depmod: FATAL: could not load /boot/System.map-6.8.0-101-generic: No such file 
or directory
dracut: Generating /boot/initrd.img-6.8.0-101-generic
realpath: /lib/modules/6.8.0-101-generic: No such file or directory
dracut[F]: Cannot find module directory 
dracut[F]: and --no-kernel was not specified
dpkg: error processing package walinuxagent (--configure):
 installed walinuxagent package post-installation script subprocess returned 
error exit status 1
Setting up cifs-utils (2:7.4-1build1) ...
update-alternatives: using /usr/lib/x86_64-linux-gnu/cifs-utils/idmapwb.so to 
provide /etc/cifs-utils/idmap-plugin (idmap-plugin) in auto mode
Processing triggers for dracut (110-1ubuntu2) ...
update-initramfs: Generating /boot/initrd.img-6.19.0-1001-azure
Processing triggers for libc-bin (2.42-2ubuntu5) ...
Processing triggers for man-db (2.13.1-1build1) ...
Errors were encountered while processing:
 walinuxagent
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
+ cleanup

** Affects: walinuxagent (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2146170

Title:
  dracut resolves to incorrect kernel during image building

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/walinuxagent/+bug/2146170/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to