Skip to content
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

Fix kdump-tools to not overwrite MODULES conf to dep #17490

Merged
merged 1 commit into from
Dec 25, 2023

Conversation

vivekrnv
Copy link
Contributor

Why I did it

Fix kdump-tools to not overwrite MODULES conf to dep. Problem is seen if the build is failed and the build is retriggered immediately as part of retry mechanism
This command is failing during the second run

+ for kernel_release in $(ls $FILESYSTEM_ROOT/lib/modules/)
+ sudo LANG=C chroot ./fsroot-mellanox /etc/kernel/postinst.d/kdump-tools 6.1.0-11-2-amd64
+ clean_sys

https://github.com/sonic-net/sonic-buildimage/blob/master/files/build_templates/sonic_debian_extension.j2#L311

Community Issue: https://www.mail-archive.com/kernel-packages@lists.launchpad.net/msg515013.html

How I did it

Add a patch to revert the override

How to verify it

vkarri@482a053c44f4:/sonic$ sudo unsquashfs -d ./fsroot-mellanox target/sonic-mellanox.bin__mellanox__rfs.squashfs
vkarri@482a053c44f4:/sonic$ sudo DEBIAN_FRONTEND=noninteractive dpkg --root=./fsroot-mellanox -i target/debs/bookworm/kdump-tools_1.8.1_amd64.de

vkarri@482a053c44f4:/sonic$ sudo LANG=C chroot ./fsroot-mellanox mount proc /proc -t proc
vkarri@482a053c44f4:/sonic$ sudo LANG=C chroot ./fsroot-mellanox mount sysfs /sys -t sysfs

Before the fix:

vkarri@482a053c44f4:/sonic$ sudo LANG=C chroot ./fsroot-mellanox /etc/kernel/postinst.d/kdump-tools 6.1.0-11-2-amd64
kdump-tools: Generating /var/lib/kdump/initrd.img-6.1.0-11-2-amd64
mkinitramfs: failed to determine device for /
mkinitramfs: workaround is MODULES=most, check:
grep -r MODULES /var/lib/kdump/initramfs-tools
Error please report bug on initramfs-tools
Include the output of 'mount' and 'cat /proc/mounts'

vkarri@482a053c44f4:/sonic$ echo $?
1

With the patch:

vkarri@482a053c44f4:/sonic$ sudo LANG=C chroot ./fsroot-mellanox /etc/kernel/postinst.d/kdump-tools 6.1.0-11-2-amd64
kdump-tools: Generating /var/lib/kdump/initrd.img-6.1.0-11-2-amd64

vkarri@482a053c44f4:/sonic$ echo $?
0

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
@xumia
Copy link
Collaborator

xumia commented Dec 14, 2023

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vivekrnv
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vivekrnv
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik liat-grozovik merged commit 18dd948 into sonic-net:master Dec 25, 2023
18 checks passed
@vivekrnv vivekrnv deleted the kdump_tools_fix branch January 3, 2024 17:19
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.

5 participants