Unable to install kdump tools: post install script returning fail

Bug #1850548 reported by bugproxy
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Invalid
High
Canonical Kernel Team
makedumpfile (Ubuntu)
Invalid
Undecided
Ubuntu on IBM Power Systems Bug Triage

Bug Description

---Problem Description---
Unable to install Kdump-tools.

---Steps to Reproduce---
 Unable to Install Kdump-tool Debian package kdump-tools_1.6.3-2_ppc64el.deb
============================================================================
Note: Unable to install the Kdump-tool. The problem comes when postinst script is run:

root@pok1-qz1-sr1-rk005-s10:~/tar# uname -a
Linux pok1-qz1-sr1-rk005-s10 4.15.0-1039-ibm-gt #41-Ubuntu SMP Wed Oct 2 10:52:25 UTC 2019 ppc64le ppc64le ppc64le GNU/Linux

root@pok1-qz1-sr1-rk005-s10:~/tar# dmesg | grep crash
[ 0.000000] Kernel command line: imgurl=http://192.168.0.2:80//install/netboot/ubuntu18.04/ppc64el/hostos-boot_bionic-4.15.0.1039-20191003-6f8d26a/rootimg.tar.gz XCAT=192.168.0.2:3001 XCATHTTPPORT=80 BOOTIF=08:94:EF:80:1B:54 console=tty0 console=hvc0,115200 default_hugepagesz=1G hugepagesz=1G hugepages=1 transparent_hugepage=never intel_iommu=on iommu=pt cloud-config-url=http://192.168.0.2/install/netboot/cloud-init/pok1-qz1-sr1-rk005-s10.txt ds=nocloud crashkernel=768M,low crashkernel=4G,high

Error:
=====
update-alternatives: using /usr/bin/bsd-write to provide /usr/bin/write (write) in auto mode^M
update-alternatives: warning: skip creation of /usr/share/man/man1/write.1.gz because associated file /usr/share/man/man1/bsd-write.1.gz (of link group write) doesn't exist^M
update-alternatives: using /usr/bin/bsd-from to provide /usr/bin/from (from) in auto mode^M
update-alternatives: warning: skip creation of /usr/share/man/man1/from.1.gz because associated file /usr/share/man/man1/bsd-from.1.gz (of link group from) doesn't exist^M
Setting up ifenslave (2.9ubuntu1) ...^M
Setting up file (1:5.32-2ubuntu0.2) ...^M
Setting up kdump-tools (1:1.6.3-2) ...^M
^M
Creating config file /etc/default/kdump-tools with new version^M
dpkg: error processing package kdump-tools (--configure):^M
 installed kdump-tools package post-installation script subprocess returned error exit status 1^M
dpkg: dependency problems prevent configuration of linux-crashdump:^M
 linux-crashdump depends on kdump-tools; however:^M
  Package kdump-tools is not configured yet.^M
^M

Detail Log:
===========

root@pok1-qz1-sr1-rk005-s10:~/tar# dpkg -i libmagic1_5.32-2ubuntu0.2_ppc64el.deb
(Reading database ... 65250 files and directories currently installed.)
Preparing to unpack libmagic1_5.32-2ubuntu0.2_ppc64el.deb ...
Unpacking libmagic1:ppc64el (1:5.32-2ubuntu0.2) over (1:5.32-2ubuntu0.2) ...
Setting up libmagic1:ppc64el (1:5.32-2ubuntu0.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
root@pok1-qz1-sr1-rk005-s10:~/tar# dpkg -i libmagic-mgc_5.32-2ubuntu0.2_ppc64el.deb
(Reading database ... 65250 files and directories currently installed.)
Preparing to unpack libmagic-mgc_5.32-2ubuntu0.2_ppc64el.deb ...
Unpacking libmagic-mgc (1:5.32-2ubuntu0.2) over (1:5.32-2ubuntu0.2) ...
Setting up libmagic-mgc (1:5.32-2ubuntu0.2) ...
root@pok1-qz1-sr1-rk005-s10:~/tar# dpkg -i file_5.32-2ubuntu0.2_ppc64el.deb
(Reading database ... 65250 files and directories currently installed.)
Preparing to unpack file_5.32-2ubuntu0.2_ppc64el.deb ...
Unpacking file (1:5.32-2ubuntu0.2) over (1:5.32-2ubuntu0.2) ...
Setting up file (1:5.32-2ubuntu0.2) ...
root@pok1-qz1-sr1-rk005-s10:~/tar# dpkg -i bsdmainutils_11.1.2ubuntu1_ppc64el.deb
(Reading database ... 65250 files and directories currently installed.)
Preparing to unpack bsdmainutils_11.1.2ubuntu1_ppc64el.deb ...
Unpacking bsdmainutils (11.1.2ubuntu1) over (11.1.2ubuntu1) ...
Setting up bsdmainutils (11.1.2ubuntu1) ...
root@pok1-qz1-sr1-rk005-s10:~/tar# dpkg -i makedumpfile_1.6.5-1ubuntu1~18.04.1_ppc64el.deb
(Reading database ... 65250 files and directories currently installed.)
Preparing to unpack makedumpfile_1.6.5-1ubuntu1~18.04.1_ppc64el.deb ...
Unpacking makedumpfile (1:1.6.5-1ubuntu1~18.04.1) over (1:1.6.5-1ubuntu1~18.04.1) ...
Setting up makedumpfile (1:1.6.5-1ubuntu1~18.04.1) ...
root@pok1-qz1-sr1-rk005-s10:~/tar# dpkg -i kexec-tools_2.0.16-1ubuntu1.1_ppc64el.deb
(Reading database ... 65250 files and directories currently installed.)
Preparing to unpack kexec-tools_2.0.16-1ubuntu1.1_ppc64el.deb ...
Unpacking kexec-tools (1:2.0.16-1ubuntu1.1) over (1:2.0.16-1ubuntu1.1) ...
Setting up kexec-tools (1:2.0.16-1ubuntu1.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Configuring kexec-tools
-----------------------

If you choose this option, a system reboot will trigger a restart into a kernel loaded by kexec instead of going
through the full system boot loader process.

Should kexec-tools handle reboots (sysvinit only)? [yes/no] yes

Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.29) ...
root@pok1-qz1-sr1-rk005-s10:~/tar# dpkg -i kdump-tools_1.6.3-2_ppc64el.deb
(Reading database ... 65250 files and directories currently installed.)
Preparing to unpack kdump-tools_1.6.3-2_ppc64el.deb ...
Unpacking kdump-tools (1:1.6.3-2) over (1:1.6.3-2) ...
Setting up kdump-tools (1:1.6.3-2) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Configuring kdump-tools
-----------------------

If you choose this option, the kdump-tools mechanism will be enabled. A reboot is still required in order to enable
the crashkernel kernel parameter.

Should kdump-tools be enabled by default? [yes/no] yes

dpkg: error processing package kdump-tools (--install):
 installed kdump-tools package post-installation script subprocess returned error exit status 1
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.29) ...
Errors were encountered while processing:
 kdump-tools

root@pok1-qz1-sr1-rk005-s10:~/tar# DEBIAN_FRONTEND=noninteractive dpkg -i kdump-tools_1.6.3-2_ppc64el.deb
(Reading database ... 65250 files and directories currently installed.)
Preparing to unpack kdump-tools_1.6.3-2_ppc64el.deb ...
Unpacking kdump-tools (1:1.6.3-2) over (1:1.6.3-2) ...
Setting up kdump-tools (1:1.6.3-2) ...
dpkg: error processing package kdump-tools (--install):
 installed kdump-tools package post-installation script subprocess returned error exit status 1
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.29) ...
Errors were encountered while processing:
 kdump-tools

---uname output---
Linux pok1-qz1-sr1-rk005-s10 4.15.0-1039-ibm-gt #41-Ubuntu SMP Wed Oct 2 10:52:25 UTC 2019 ppc64le ppc64le ppc64le GNU/Linux

This is on Diskless Environment

====
Can you attach the /var/log/syslog to see what sort of messages are getting logged (if any)?

It might be worthwhile if you can add a set -x at the start of the following:

/target/var/lib/dpkg/info/kdump-tools.postinst

and

/etc/kernel/postinst.d/kdump-tools

if they exist to see what is going on in them at the time of the failure

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-182124 severity-critical targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → makedumpfile (Ubuntu)
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2019-10-29 16:20 EDT-------
The reporter, Kuldip, also opened this case simultaneously to the bug https://support.canonical.com/ua/s/case/5003z000021SHJ0/server-unable-to-install-kdumptools-on-the-diskless-machine where he was asked to try installing a new kdump-tools. Kuldip agreed to try that and report back...

Revision history for this message
Frank Heimes (fheimes) wrote :

The package kdump-tools_1.6.3-2_ppc64el.deb is the very first package that was shipped with the initial release of 18.04. It got in between superseded with a more current package from bionic-updates (and there is even a newer one in bionic-proposed):
$ rmadison -a ppc64el kdump-tools | grep bionic
 kdump-tools | 1:1.6.3-2 | bionic | ppc64el
 kdump-tools | 1:1.6.5-1ubuntu1~18.04.1 | bionic-updates | ppc64el
[ kdump-tools | 1:1.6.5-1ubuntu1~18.04.3 | bionic-proposed | ppc64el ]
Means that an old package version is in use and the system is not up-to-date.

Please install and then retry with the current kdump-tools version 1:1.6.5-1ubuntu1~18.04.1.

Update the archive index with:
sudo apt update
and either install all updates (if appropriate):
sudo apt full-upgrade
or selective install/update with:
sudo apt install kdump-tools
and post again the output/result. Thx

Changed in ubuntu-power-systems:
status: New → Incomplete
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Manoj Iyer (manjo)
Changed in ubuntu-power-systems:
importance: Undecided → Low
Revision history for this message
bugproxy (bugproxy) wrote :
Download full text (34.5 KiB)

------- Comment From <email address hidden> 2019-10-30 11:25 EDT-------
I have tested this with kdump-tools=1:1.6.5-1ubuntu1~18.04.1 linux-crashdump=4.15.0.66.68
and it is still failling.

Please do not decrease the priority of this. as this is very critical for us.

b"DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -o Acquire::AllowInsecureRepositories=true -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef --allow-unauthenticated --allow-downgrades -yq install libmagic1=1:5.32-2ubuntu0.2 libmagic-mgc=1:5.32-2ubuntu0.2 file=1:5.32-2ubuntu0.2 bsdmainutils=11.1.2ubuntu1 makedumpfile=1:1.6.5-1ubuntu1~18.04.1 kexec-tools=1:2.0.16-1ubuntu1.1 kdump-tools=1:1.6.5-1ubuntu1~18.04.1 linux-crashdump=4.15.0.66.68\n

Stdout: Reading package lists...\nBuilding dependency tree...\nReading state information...\nSuggested packages:\n wamerican | wordlist whois vacation crash\nRecommended packages:\n crash\nThe following NEW packages will be installed:\n bsdmainutils file kdump-tools kexec-tools libmagic-mgc libmagic1\n linux-crashdump makedumpfile\n0 upgraded, 8 newly installed, 0 to remove and 1 not upgraded.\n

Need to get 0 B/720 kB of archives.

After this operation, 7,713 kB of additional disk space will be used.\n
WARNING: The following packages cannot be authenticated!\n
bsdmainutils libmagic-mgc libmagic1 file kexec-tools makedumpfile\n
kdump-tools linux-crashdump\n
Authentication warning overridden.\n
Get:1 file:/tmp/nextgen_1572446483354_4538/base-os-sw_0.1.0-6a0c051_ppc64el ./ bsdmainutils 11.1.2ubuntu1 [185 kB]\n
Get:2 file:/tmp/nextgen_1572446483354_4538/base-os-sw_0.1.0-6a0c051_ppc64el ./ libmagic-mgc 1:5.32-2ubuntu0.2 [184 kB]\n
Get:3 file:/tmp/nextgen_1572446483354_4538/base-os-sw_0.1.0-6a0c051_ppc64el ./ libmagic1 1:5.32-2ubuntu0.2 [76.9 kB]\n
Get:4 file:/tmp/nextgen_1572446483354_4538/base-os-sw_0.1.0-6a0c051_ppc64el ./ file 1:5.32-2ubuntu0.2 [22.8 kB]\n
Get:5 file:/tmp/nextgen_1572446483354_4538/base-os-sw_0.1.0-6a0c051_ppc64el ./ kexec-tools 1:2.0.16-1ubuntu1.1 [91.6 kB]\n
Get:6 file:/tmp/nextgen_1572446483354_4538/base-os-sw_0.1.0-6a0c051_ppc64el ./ makedumpfile 1:1.6.5-1ubuntu1~18.04.1 [134 kB]\n
Get:7 file:/tmp/nextgen_1572446483354_4538/base-os-sw_0.1.0-6a0c051_ppc64el ./ kdump-tools 1:1.6.5-1ubuntu1~18.04.1 [23.4 kB]\n
Get:8 file:/tmp/nextgen_1572446483354_4538/base-os-sw_0.1.0-6a0c051_ppc64el ./ linux-crashdump 4.15.0.66.68 [2,536 B]\n
Selecting previously unselected package bsdmainutils.\r\n(
Reading database ... \r(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r(Reading database ... 70%\r(Reading database ... 75%\r(Reading database ... 80%\r(Reading database ... 85%\r(Reading database ... 90%\r(Reading database ... 95%\r(Reading database ... 100%\r(Reading database ... 67628 files and directories currently installed.)\r\n
Preparing to unpack .../0-bsdmainutils_11.1.2ubuntu1_ppc64el.deb ...\r\n
Unpacking bsdmainut...

Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

Thanks for confirming that the issue reproduces with the latest version of the package. I've moved the bug back to "triaged" and adjusted the priority.

Changed in ubuntu-power-systems:
status: Incomplete → Triaged
importance: Low → High
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2019-10-30 15:01 EDT-------
I think we can close this - I think the issue came down to customization. Kuldip - that ok?

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

So, the postinst code will generate a new initrd based on the installed kernel and write it to /var/lib/kdump/.

As you mention this is a diskless system, I wonder if there is a kernel installed and if it shows up at /boot/ and /lib/modules/, and if it is allowed to write to /var/lib/kdump/ and /var/crash/.

Can you confirm if there is a kernel installed and if it shows up and if you can write to these directories as root?

Thank you very much.
Cascardo.

Revision history for this message
Frank Heimes (fheimes) wrote :

Just as a side note and to make sure that there is no general problem with the package (or it's dependencies):
I just setup a clean ppc64el 18.04.3 system with default kernel 4.15 (but _with_ disks) and could install the kdump-tools package without any issues on that system.

Revision history for this message
bugproxy (bugproxy) wrote :
Download full text (4.8 KiB)

------- Comment From <email address hidden> 2019-10-31 10:05 EDT-------
Hi,

Please see the detail information below
----------------------------------------------------
root@pok1-qz1-sr1-rk005-s10:~# mount | sed -e 's/^/ /g'
/proc on /proc type proc (rw,relatime)
/sys on /sys type sysfs (rw,relatime)
/dev on /dev type devtmpfs (rw,relatime,size=188307264k,nr_inodes=2942301,mode=755)
/dev/pts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
rootfs on / type tmpfs (rw,relatime,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=23573)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=1024M)
tmpfs on /var/tmp type tmpfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
lxcfs on /var/lib/lxcfs type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=39788672k,mode=700)

root@pok1-qz1-sr1-rk005-s10:~# ls -l /boot/
total 91840
-rw------- 1 root root 3661770 Oct 8 18:31 System.map-4.15.0-1039-ibm-gt
-rw-r--r-- 1 root root 192377 Oct 8 18:31 config-4.15.0-1039-ibm-gt
drwxr-xr-x 5 root root 160 Oct 8 18:31 grub
lrwxrwxrwx 1 root root 29 Oct 8 18:31 ...

Read more...

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2019-10-31 10:11 EDT-------
This problem will be seen ion any of the diskless workstation;
Please note as I see there are three places which are of concern

/var/lib/dpkg/info/kdump-tools.postinst fails because:
1. It cannot make the initrd image because of wrong values set in /etc/initramfs-tools/initramfs.conf
a) Post installation script calls /etc/kernel/postinst.d/kdump-tools which does not sets the tag to "Modules=most" in /etc/initramfs-tools/initramfs.conf
b) Post installation script does not set the tag BusyBox=y in /etc/initramfs-tools/initramfs.conf.

2. It runs update-grub. This fails with the below message
# update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of `rootfs'
Disabling it I could proceed.

3. Even after making all these changes, it failed to start the kdump-tools-dump.service. Please see below:
+ deb-systemd-invoke start kdump-tools-dump.service
kdump-tools-dump.service is a disabled or a static unit, not starting it.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2019-10-31 10:20 EDT-------
I thought a lot about it and I think this problem will come in any time the m/c is network booted and diskless. So in a way it is still generic and not IBM specific.
Based on this I now have second thought on if we should really close this.
Can kdump-tools be extended to take care of the diskless workstations.

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

kdump-tools requires a kernel to be loaded by kexec -p to work. There is no workaround on that. If your /boot/ does not contain a kernel, it could possibly use a kernel from somewhere else, but you would still need a kernel.

There is a pending patch that I have in the works that would postpone the creation of the initrd after the first reboot or after kdump-tools is first started. That would allow postinst to succeed and the installation would be fine. However, kdump-tools might still not work before proper configuration.

About the GRUB support, it's used to add the crashkernel parameter to the bootloader, GRUB being one of the options supported. If your netbooting, it's very likely GRUB is not used at all or the local configuration is totally ignored, so you would still need to manually configure your netboot setup to add that parameter to the kernel command line.

I will send a test version to a ppa that skips the initrd creation during postinst. Which series are you testing this on? Is it bionic?

Cascardo.

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

Sorry, I missed the entirety of the message with the logs and didn't notice that there was a kernel there, and that /var/lib/kdump-tools/ and /var/crash/ seem to be writable.

As I said, I just pushed a test makedumpfile/kdump-tools to ppa:cascardo/ppa that does not create the initrd during postinst.

Also, notice that kdump-tools.service needs to be enabled, but that it will fail to load if crashkernel has not been reserved, that is, you need crashkernel=..... in the kernel command line. Can you verify what is the value of /sys/kernel/kexec_crash_size ?

The only thing I guess would be a pending issue for this case is the drivers that are included in the kdump initrd. As you said, it uses MODULES=dep instead of MODULES=most to reduce the memory footprint for the crashkernel. We could work on a solution there.

But can you at least install and load kdump-tools with this fixed package, once you make sure you have a proper crashkernel on the command line?

Thank you.
Cascardo.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2019-11-01 10:07 EDT-------
Hi,
The crash memory is reserved:
root@pok1-qz1-sr1-rk005-s10:~# cat /proc/cmdline
imgurl=http://192.168.0.2:80//install/netboot/ubuntu18.04/ppc64el/hostos-boot_bionic-4.15.0.1039-20191003-6f8d26a/rootimg.tar.gz XCAT=192.168.0.2:3001 XCATHTTPPORT=80 BOOTIF=08:94:EF:80:1B:54 console=tty0 console=hvc0,115200 default_hugepagesz=1G hugepagesz=1G hugepages=1 transparent_hugepage=never intel_iommu=on iommu=pt cloud-config-url=http://192.168.0.2/install/netboot/cloud-init/pok1-qz1-sr1-rk005-s10.txt ds=nocloud crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M

I had to make multiple changes in the kdump-tools.deb to make it work with diskless workstation. Major things to note
1. change to the config file
2. commenting out update-grub

Please see below:

diff -ur kdump/DEBIAN/control kdump.old/DEBIAN/control
--- kdump/DEBIAN/control 2019-11-01 00:30:15.070597083 -0400
+++ kdump.old/DEBIAN/control 2019-02-07 06:22:23.000000000 -0500
@@ -1,6 +1,6 @@
Package: kdump-tools
Source: makedumpfile
-Version: 1:1.6.51-1ubuntu1~18.04.1
+Version: 1:1.6.5-1ubuntu1~18.04.1
Architecture: ppc64el
Maintainer: Louis Bouchard <email address hidden>
Installed-Size: 111
diff -ur kdump/DEBIAN/postinst kdump.old/DEBIAN/postinst
--- kdump/DEBIAN/postinst 2019-10-31 15:17:18.319831610 -0400
+++ kdump.old/DEBIAN/postinst 2019-02-07 06:22:23.000000000 -0500
@@ -83,10 +83,9 @@
;;
esac
-# This is commented out by hostos
-#if [ -x /usr/sbin/update-grub ] && [ -e /boot/grub/grub.cfg ]; then
-# update-grub
-#fi
+if [ -x /usr/sbin/update-grub ] && [ -e /boot/grub/grub.cfg ]; then
+ update-grub
+fi
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
diff -ur kdump/etc/kernel/postinst.d/kdump-tools kdump.old/etc/kernel/postinst.d/kdump-tools
--- kdump/etc/kernel/postinst.d/kdump-tools 2019-10-31 15:15:27.164300906 -0400
+++ kdump.old/etc/kernel/postinst.d/kdump-tools 2019-02-07 06:22:23.000000000 -0500
@@ -50,14 +50,7 @@
echo "${I}" >> $initramfsdir/modules
done
-# These changes to install the debian on HostOS
-sed -e 's/MODULES=.*/MODULES=most/' /etc/initramfs-tools/initramfs.conf > "$initramfsdir/initramfs.conf" || true
-if ! [ -e "$initramfsdir/initramfs.conf" ];then
- echo >&2 "W: kdump-tools: Unable to create $initramfsdir/initramfs.conf"
- exit 2
-fi
-# These changes to install the debian on HostOS
-sed -e 's/BUSYBOX=.*/BUSYBOX=y/' /etc/initramfs-tools/initramfs.conf > "$initramfsdir/initramfs.conf" || true
+sed -e 's/MODULES=.*/MODULES=dep/' /etc/initramfs-tools/initramfs.conf > "$initramfsdir/initramfs.conf" || true
if ! [ -e "$initramfsdir/initramfs.conf" ];then
echo >&2 "W: kdump-tools: Unable to create $initramfsdir/initramfs.conf"
exit 2

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

So, update-grub is only run if you have it there. Can you remove it, if it's not supported/installed on disk at all? Otherwise, how does it fail? Can you add a log for that?

I see how the version that I have on the ppa would still fail postinst if update-grub is failing, so installation would still be a problem. But did the other change make it better in any way?

How about starting the service without the MODULES=most change? Does it at least create an initrd and what is the output of 'kdump-config show' after that?

Thanks.
Cascardo.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2019-11-01 11:46 EDT-------
1. upgrade-grub is part of the original image which we take as is from canonical. We do not change the original image, but install packages as needed.
2. As per initial work done making it dep instead of most does not work.

-Kuldip

Revision history for this message
Manoj Iyer (manjo) wrote :

Would it be acceptable if we suggest a workaround of incorporating config file changes in the "diskless custom image" that you are using to boot?

Revision history for this message
Mike Ranweiler (mranweil) wrote :

Hi Manoj, I think config changes work great - the whole solution is scripted, so it could be added in there.

Revision history for this message
Frank Heimes (fheimes) wrote :

Just for completeness reasons:
This is now first of all handled via SF, a patches package is available via PPA.
No decision yet if that can be SRUed to the Ubuntu archive.
Hence setting the makedumpfile status to 'In Progress' and the project entry first of all to 'Opinion'.

Changed in ubuntu-power-systems:
status: Triaged → Opinion
Changed in makedumpfile (Ubuntu):
status: New → In Progress
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2019-12-04 11:47 EDT-------
This can now be closed as the we have validated in our test environment and it works.

tags: added: targetmilestone-inin1804
removed: targetmilestone-inin---
Revision history for this message
Frank Heimes (fheimes) wrote :

This got addressed in a SF case outside of the standard Ubuntu archives, hence I'm close it here as Invalid.

Changed in makedumpfile (Ubuntu):
status: In Progress → Invalid
Changed in ubuntu-power-systems:
status: Opinion → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.