Find redhat kernel version command gives invalid output when multiple versions are installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Triaged
|
Medium
|
Unassigned | ||
curtin |
New
|
Undecided
|
Unassigned |
Bug Description
When building Rocky 9 images for MAAS, if you update the kernel in the source image and don't clean up the previous kernel version, the "rpm -q --queryformat "%{VERSION}
# rpm -q --queryformat "%{VERSION}
5.14.0-
This causes the subsequent initramfs command to fail, resulting in a failed OS deployment:
finish: cmd-install/
finish: cmd-install/
Traceback (most recent call last):
File "/curtin/
ret = args.func(args)
File "/curtin/
builtin_
File "/curtin/
redhat_
File "/curtin/
in_
File "/curtin/
return subp(*args, **kwargs)
File "/curtin/
return _subp(*args, **kwargs)
File "/curtin/
raise ProcessExecutio
curtin.
Command: ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpms1dg_
Exit code: 1
Reason: -
Stdout: /etc/dracut.
Stderr:
dracut: WARNING: <key>+=" <values> ": <values> should have surrounding white spaces!
dracut: WARNING: This will lead to unwanted side effects! Please fix the configuration file.
dracut: Cannot find module directory /lib/modules/
dracut: and --no-kernel was not specified
Unexpected error while running command.
The command should be altered to something that returns only the latest installed kernel version.
For example:
# ls -t /lib/modules | head -1
5.14.0-
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → 3.6.0 |