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

MTL-1863 Add %posttrans #49

Merged
merged 1 commit into from
Aug 1, 2022
Merged

MTL-1863 Add %posttrans #49

merged 1 commit into from
Aug 1, 2022

Conversation

rustydb
Copy link
Contributor

@rustydb rustydb commented Jul 28, 2022

Summary and Scope

Issue Type

  • RFE Pull Request

Invoke both mkinitrd and mkdumprd, no need for updating the bootloader.

This will ensure that installing or upgrading this package will entail including this module in the existing initrd.

Currently we do this by hand by invoking the create-kis-artifacts.sh script in our NCN builds, but in general this RPM should do this automatically.

ncn-m002:~ # rpm -Uvh --oldpackage /tmp/dracut-metal-mdsquash-2.1.0~1~gc922514-1.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:dracut-metal-mdsquash-2.1.0~1~gc9################################# [ 50%]
Cleaning up / removing...
   2:dracut-metal-mdsquash-2.1.0~1~g6d################################# [100%]
Creating initrd: /boot/initrd-5.3.18-150300.59.76-default
dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-5.3.18-150300.59.76-default 5.3.18-150300.59.76-default
dracut: dracut module 'modsign' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'btrfs' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'dmraid' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'multipath' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'cifs' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'fcoe' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'fcoe-uefi' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'iscsi' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'nbd' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'nfs' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
bash
systemd
systemd-initrd
i18n
network-legacy
network
kernel-modules
kernel-modules-extra
kernel-network-modules
mdraid
dracut: Skipping udev rule: 64-md-raid.rules
metalmdsquash
nvdimm
metaldmk8s
metalluksetcd
rootfs-block
suse-btrfs
suse-xfs
terminfo
udev-rules
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
biosdevname
dracut-systemd
haveged
usrmount
base
fs-lib
shutdown
suse
suse-initrd
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
hardlink: /var/tmp/dracut.oLRFvY/initramfs/init is on different filesystem than the rest (use -f option to override).
dracut: *** Hardlinking files done ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Constructing GenuineIntel.bin ***
dracut: *** Store current command line parameters ***
dracut: Stored kernel commandline:
dracut: rd.driver.pre=raid1
dracut:  rd.md.uuid=d1c3d9db:b5b2c067:de5a0d87:65e6ca3b
dracut:  root=LABEL=ROOTRAID rootfstype=xfs rootflags=defaults
dracut: ro
dracut: *** Creating image file '/boot/initrd-5.3.18-150300.59.76-default' ***
dracut: *** Creating initramfs image file '/boot/initrd-5.3.18-150300.59.76-default' done ***
Did not refresh the bootloader. You might need to refresh it manually.
Regenerating kdump initrd ...
dracut: Executing: /usr/bin/dracut --force --hostonly --omit "plymouth resume usrmount" "--compress=xz -0 --check=crc32" --add kdump /boot/initrd-5.3.18-150300.59.76-default-kdump 5.3.18-150300.59.76-default
dracut: dracut module 'plymouth' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'resume' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'usrmount' will not be installed, because it's in the list to be omitted!
dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
bash
systemd
systemd-initrd
watchdog-modules
i18n
network-legacy
network
drm
kernel-modules
kernel-modules-extra
kernel-network-modules
mdraid
dracut: Skipping udev rule: 64-md-raid.rules
metalmdsquash
nvdimm
metaldmk8s
metalluksetcd
rootfs-block
suse-btrfs
suse-xfs
terminfo
udev-rules
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
biosdevname
dracut-systemd
haveged
base
fs-lib
kdump
shutdown
suse
suse-initrd
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
hardlink: /var/tmp/dracut.JMG99Y/initramfs/init is on different filesystem than the rest (use -f option to override).
dracut: *** Hardlinking files done ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Constructing GenuineIntel.bin ***
dracut: *** Store current command line parameters ***
dracut: Stored kernel commandline:
dracut: rd.driver.pre=raid1
dracut:  rd.md.uuid=d1c3d9db:b5b2c067:de5a0d87:65e6ca3b
dracut:  root=LABEL=ROOTRAID rootfstype=xfs rootflags=defaults
dracut: ro
dracut: *** Creating image file '/boot/initrd-5.3.18-150300.59.76-default-kdump' ***
dracut: *** Creating initramfs image file '/boot/initrd-5.3.18-150300.59.76-default-kdump' done ***

Prerequisites

  • I have included documentation in my PR (or it is not required)
  • I tested this on internal system (if yes, please include results or a description of the test)
  • I tested this on a vshasta system (if yes, please include results or a description of the test)

Idempotency

Risks and Mitigations

@rustydb rustydb requested a review from a team as a code owner July 28, 2022 18:48
@rustydb rustydb force-pushed the MTL-1863-posttrans branch 4 times, most recently from 6d56e76 to c922514 Compare August 1, 2022 06:21
@rustydb rustydb changed the title WIP MTL-1863 Add %posttrans for mkinitrd WIP MTL-1863 Add %posttrans Aug 1, 2022
@rustydb
Copy link
Contributor Author

rustydb commented Aug 1, 2022

kdump was still successful after upgrading with this RPM and regenerating the kdump initrd:

ncn-m002:~ # echo c >/proc/sysrq-trigger
[183785.979629] sysrq: Trigger a crash
[183785.983129] Kernel panic - not syncing: sysrq triggered crash
[183785.988968] CPU: 45 PID: 1574661 Comm: bash Kdump: loaded Tainted: G               X    5.3.18-150300.59.76-default #1 SLE15-SP3
[183786.000612] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0012.070720200218 07/07/2020
[183786.011123] Call Trace:
[183786.013670]  dump_stack+0x66/0x8b
[183786.017078]  panic+0xfe/0x2d7
[183786.020140]  ? printk+0x52/0x6e
[183786.023370]  sysrq_handle_crash+0x11/0x20
[183786.027468]  __handle_sysrq+0x89/0x140
[183786.031308]  write_sysrq_trigger+0x2b/0x30
[183786.035493]  proc_reg_write+0x39/0x60
[183786.039250]  vfs_write+0xad/0x1b0
[183786.042651]  ksys_write+0xa1/0xe0
[183786.046059]  do_syscall_64+0x5b/0x1e0
[183786.049812]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[183786.054948] RIP: 0033:0x7f8b866f5b13
[183786.058613] Code: 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 55 f3 c3 0f 1f 00 41 54 55 49 89 d4 53 48 89
[183786.077446] RSP: 002b:00007ffcddcda398 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[183786.085099] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f8b866f5b13
[183786.092316] RDX: 0000000000000002 RSI: 000055d484e61920 RDI: 0000000000000001
[183786.099535] RBP: 000055d484e61920 R08: 000000000000000a R09: 0000000000000000
[183786.106755] R10: 00007f8b865f6468 R11: 0000000000000246 R12: 00007f8b869d9500
[183786.113976] R13: 0000000000000002 R14: 00007f8b869dec00 R15: 0000000000000002
[    0.111901] [Firmware Bug]: the BIOS has corrupted hw-PMU resources (MSR 38d is b0)
�[    2.396970] mce: Unable to init MCE device (rc: -5)
Unable to ioctl(KDSETLED) -- are you not on the console? (Inappropriate ioctl for device)
Extracting dmesg
-------------------------------------------------------------------------------

The dmesg log is saved to /kdump/mnt0/LiveOS/overlay-SQFSRAID-53263b61-c625-4e55-b918-868cba97a859/var/crash/2022-08-01-06:26/dmesg.txt.

makedumpfile Completed.
-------------------------------------------------------------------------------
Saving dump using makedumpfile
-------------------------------------------------------------------------------
Copying data                                      : [100.0 %] |           eta: 0s

The dumpfile is saved to /kdump/mnt0/LiveOS/overlay-SQFSRAID-53263b61-c625-4e55-b918-868cba97a859/var/crash/2022-08-01-06:26/vmcore.

makedumpfile Completed.
-------------------------------------------------------------------------------
Generating README              Finished.
Copying System.map             Finished.
Copying kernel                 Finished.
umount: /kdump/mnt0: not mounted.
umount: /sys/fs/cgroup/unified: target is busy.
umount: /sys/fs/cgroup: target is busy.
umount: /run: target is busy.
umount: /dev: target is busy.
umount: /: not mounted.
Rebooting.
[  143.828673] reboot: Restarting system

@rustydb rustydb changed the title WIP MTL-1863 Add %posttrans MTL-1863 Add %posttrans Aug 1, 2022
@rustydb rustydb force-pushed the MTL-1863-posttrans branch 5 times, most recently from 1162e93 to 81c25a1 Compare August 1, 2022 19:11
Invoke both `mkinitrd` and `mkdumprd`, no need for updating the
bootloader.
@rustydb rustydb merged commit 9346a34 into main Aug 1, 2022
@rustydb rustydb deleted the MTL-1863-posttrans branch August 1, 2022 19:28
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.

2 participants