[PATCH v2 0/2] fadump: reduce initramfs image size
by Hari Bathini
With commit fa9201b2 ("fadump: isolate fadump initramfs image within
the default one"), initramfs image gets to hold two images, one for
production kernel boot purpose and the other for capture kernel boot.
Having separate images improved reliability for both production kernel
and capture kernel boot scenarios, but the size of initramfs image
became considerably larger.
There is scope to reduce the size requirement by avoiding squash and
hardlinking identical files, which are quite a few in this case as
two images would have almost the same binaries and libraries.
The first patch opts out of using squash and the second patch ensures
file modification time is preserved to ensure hardlinking goes through
smoothly.
Changes in v2:
* Avoid polluting is_squash_available(). Instead, modify mkfadumprd
to ensure 'squash' dracut module is not used for fadump case.
Hari Bathini (2):
fadump: do not use squash to reduce image size
fadump: preserve file modification time to help with hardlinking
mkfadumprd | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--
2.37.3
1 year
[PATCH] tests: use .nmconnection to set up test network
by Coiby Xu
F36 has dropped support on ifcfg and as a result all network tests fail.
Use .nmconnection to set up test network instead.
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
tests/scripts/testcases/nfs-kdump/0-server.sh | 13 +++++++------
tests/scripts/testcases/ssh-kdump/0-server.sh | 13 +++++++------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/tests/scripts/testcases/nfs-kdump/0-server.sh b/tests/scripts/testcases/nfs-kdump/0-server.sh
index cf54e70a..5436d3d2 100755
--- a/tests/scripts/testcases/nfs-kdump/0-server.sh
+++ b/tests/scripts/testcases/nfs-kdump/0-server.sh
@@ -16,12 +16,13 @@ on_build() {
img_run_cmd "echo dhcp-range=192.168.77.50,192.168.77.100,255.255.255.0,12h >> /etc/dnsmasq.conf"
img_run_cmd "systemctl enable dnsmasq"
- img_run_cmd 'echo DEVICE="eth0" > /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo BOOTPROTO="none" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo ONBOOT="yes" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo PREFIX="24" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo IPADDR="192.168.77.1" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo TYPE="Ethernet" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
+ img_run_cmd 'echo [connection] > /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo type=ethernet >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo interface-name=eth0 >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo [ipv4] >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo address1=192.168.77.1/24 >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo method=manual >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'chmod 600 /etc/NetworkManager/system-connections/eth0.nmconnection'
img_add_qemu_cmd "-nic socket,listen=:8010,mac=52:54:00:12:34:56"
}
diff --git a/tests/scripts/testcases/ssh-kdump/0-server.sh b/tests/scripts/testcases/ssh-kdump/0-server.sh
index 6dfcc913..b4b84c96 100755
--- a/tests/scripts/testcases/ssh-kdump/0-server.sh
+++ b/tests/scripts/testcases/ssh-kdump/0-server.sh
@@ -17,12 +17,13 @@ on_build() {
img_run_cmd "echo dhcp-range=192.168.77.50,192.168.77.100,255.255.255.0,12h >> /etc/dnsmasq.conf"
img_run_cmd "systemctl enable dnsmasq"
- img_run_cmd 'echo DEVICE="eth0" > /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo BOOTPROTO="none >> /etc/sysconfig/network-scripts/ifcfg-eth0"'
- img_run_cmd 'echo ONBOOT="yes" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo PREFIX="24" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo IPADDR="192.168.77.1" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo TYPE="Ethernet" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
+ img_run_cmd 'echo [connection] > /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo type=ethernet >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo interface-name=eth0 >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo [ipv4] >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo address1=192.168.77.1/24 >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo method=manual >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'chmod 600 /etc/NetworkManager/system-connections/eth0.nmconnection'
}
# Executed when VM boots
--
2.37.3
1 year, 1 month
[PATCH v6 0/5] Add lvm2 thin provision support for kdump
by Tao Liu
Thin provision is a mechanism that you can allocate a lvm volume which has
a large virtual size for file systems but actually in a small physical
size. The physical size can be autoextended in use if thin pool reached a
threshold specified in /etc/lvm/lvm.conf.
There are 2 works should be handled when enable lvm2 thinp for kdump:
1) Check if the dump target device or directory is thinp device.
2) Monitor the thin pool and autoextend its size when it reached the threshold
during kdump.
According to my testing, the memory consumption procedure for lvm2 thinp is the thin pool
size-autoextend phase. For fedora and rhel9, the default crashkernel value is enough. But
for rhel8, the default crashkernel value 1G-4G:160M is not enough, so it should
be handled particularly.
v1 -> v2:
1) Modified the usage of lvs cmd when check if target is lvm2 thinp
device.
2) Removed the sync flag way of mounting for lvm2 thinp target
during kdump, use "sync -f vmcore" to force sync data, and handle
the error if fails.
v2 -> v3:
1) Removed "sync -f vmcore" patch out of the patch set, for it is
addressing an issue which is not specifically to lvm2 thinp support for
kdump.
v3 -> v4:
1) Removed lvm2-monitor.service, implemented the monitor service with
a loop function within a shell script instead.
2) Add lvm2 thinp support for dump_raw, for it is addressing the similar
issue as dump_fs.
3) Dave suggested me to implement the lvm2 thin support in dracut
modules instead of kexec-tools. If you are OK with the loop-function-shell-script
technical way, I will give a try to migrate it to dracut.
v4 -> v5:
1) A new 80lvmthinpool-monitor module [1] has been integrated in dracut.
Now we simply depend on it.
2) Add lvm2 thin provision selftest.
[1]: https://github.com/dracutdevs/dracut/pull/1842
v5 -> v6:
1) Code refactoring based on Philipp's comments.
2) Print warning if lvmthinpool-monitor module is not exist.
Tao Liu (5):
Add lvm2 thin provision dump target checker
lvm.conf should be check modified if lvm2 thinp enabled
Add dependency of dracut lvmthinpool-monitor module
selftest: Only iterate the .sh files for test execution
selftest: Add lvm2 thin provision for kdump test
dracut-module-setup.sh | 8 +++
kdump-lib-initramfs.sh | 10 ++++
kdump-lib.sh | 6 ++
kdumpctl | 1 +
tests/scripts/run-test.sh | 3 +-
.../lvm2-thinp-kdump/0-local-lvm2-thinp.sh | 59 +++++++++++++++++++
.../testcases/lvm2-thinp-kdump/lvm.conf | 5 ++
7 files changed, 90 insertions(+), 2 deletions(-)
create mode 100755 tests/scripts/testcases/lvm2-thinp-kdump/0-local-lvm2-thinp.sh
create mode 100644 tests/scripts/testcases/lvm2-thinp-kdump/lvm.conf
--
2.33.1
1 year, 1 month
[PATCH 0/2] fadump: reduce initramfs image size
by Hari Bathini
With commit fa9201b2 ("fadump: isolate fadump initramfs image within
the default one"), initramfs image gets to hold two images, one for
production kernel boot purpose and the other for capture kernel boot.
Having separate images improved reliability for both production kernel
and capture kernel boot scenarios, but the size of initramfs image
became considerably larger.
There is scope to reduce the size requirement by avoiding squash and
hardlinking identical files, which are quite a few in this case as
two images would have almost the same binaries and libraries.
The first patch opts out of using squash and the second patch ensures
file modification time is preserved to ensure hardlinking goes through
smoothly.
Hari Bathini (2):
fadump: do not use squash to reduce image size
fadump: preserve file modification time to help with hardlinking
kdump-lib.sh | 7 +++++++
mkfadumprd | 12 +++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
--
2.37.3
1 year, 1 month
[PATCH] Skip reading /etc/defaut/grub for s390x
by Coiby Xu
Currently, updating kexec-tools gives the warning
sed: can't read /etc/default/grub: No such file or directory
This happens because s390x doesn't use GRUB and /etc/default/grub
doesn't exist. We need to skip both reading and writing to
/etc/default/grub.
Reported-by: Jie Li <jieli(a)redhat.com>
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
kdumpctl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kdumpctl b/kdumpctl
index c7efa2c3..498bb964 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -1428,10 +1428,6 @@ _update_kernel_arg_in_grub_etc_default()
{
local _para=$1 _val=$2 _para_val
- if [[ $(uname -m) == s390x ]]; then
- return
- fi
-
if [[ -n $_val ]]; then
_para_val="$_para=$_val"
fi
@@ -1606,6 +1602,10 @@ update_crashkernel_in_grub_etc_default_after_update()
local _crashkernel _fadump_val
local _dump_mode _old_default_crashkernel _new_default_crashkernel
+ if [[ $(uname -m) == s390x ]]; then
+ return
+ fi
+
_crashkernel=$(_read_kernel_arg_in_grub_etc_default crashkernel)
if [[ -z $_crashkernel ]]; then
--
2.37.3
1 year, 1 month
[PATCH] Fix grep warnings "grep: warning: stray \ before -"
by Coiby Xu
Latest grep (3.8) warns about unneeded backslashes when building kdump
initrd [1],
kdump: Rebuilding /boot/initramfs-6.0.0-0.rc5.a335366bad13.40.test.fc38.aarch64kdump.img
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
Use the -- argument (don't treat the following - as options) to get rid
of these warnings.
[1] https://s3.us-east-1.amazonaws.com/arr-cki-prod-datawarehouse-public/data...
Reported-by: Baoquan He <bhe(a)redhat.com>
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
kdump-lib-initramfs.sh | 4 ++--
kdumpctl | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh
index 84e6bf75..73a464d5 100755
--- a/kdump-lib-initramfs.sh
+++ b/kdump-lib-initramfs.sh
@@ -58,13 +58,13 @@ is_fs_type_nfs()
# If $1 contains dracut_args "--mount", return <filesystem type>
get_dracut_args_fstype()
{
- echo $1 | grep "\-\-mount" | sed "s/.*--mount .\(.*\)/\1/" | cut -d' ' -f3
+ echo $1 | grep -- "--mount" | sed "s/.*--mount .\(.*\)/\1/" | cut -d' ' -f3
}
# If $1 contains dracut_args "--mount", return <device>
get_dracut_args_target()
{
- echo $1 | grep "\-\-mount" | sed "s/.*--mount .\(.*\)/\1/" | cut -d' ' -f1
+ echo $1 | grep -- "--mount" | sed "s/.*--mount .\(.*\)/\1/" | cut -d' ' -f1
}
get_save_path()
diff --git a/kdumpctl b/kdumpctl
index 0e37d36e..3503befe 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -224,7 +224,7 @@ parse_config()
case "$config_opt" in
dracut_args)
if [[ $config_val == *--mount* ]]; then
- if [[ $(echo "$config_val" | grep -o "\-\-mount" | wc -l) -ne 1 ]]; then
+ if [[ $(echo "$config_val" | grep -o -- "--mount" | wc -l) -ne 1 ]]; then
derror 'Multiple mount targets specified in one "dracut_args".'
return 1
fi
@@ -506,7 +506,7 @@ check_fs_modified()
# if --mount argument present then match old and new target, mount
# point and file system. If any of them mismatches then rebuild
- if echo "$_dracut_args" | grep -q "\-\-mount"; then
+ if echo "$_dracut_args" | grep -q -- "--mount"; then
# shellcheck disable=SC2046
set -- $(echo "$_dracut_args" | awk -F "--mount '" '{print $2}' | cut -d' ' -f1,2,3)
_old_dev=$1
--
2.37.3
1 year, 1 month
[PATCH v2 00/11] reuse NetworkManager connection profiles to set up kdump network
by Coiby Xu
Currently, kexec-tools parses legacy ifcfg-* configuration files or
NetworkManager .nmconnection connection profiles to build up dracut
command line parameters like ip=. Then dracut parses these parameters and
runs nm-initrd-generator to generate NetworkManager connection profiles.
Taking a bonding network as an example, nm-initrd-generator generates two
connections as follows,
$ /usr/libexec/nm-initrd-generator -s -- bootdev=mybond0 rd.neednet kdumpnic=mybond0 bond=mybond0:kdump-eth0
*** Connection 'mybond0' ***
[connection]
id=mybond0
uuid=ed87d02b-dd44-4f0e-8b11-37db7e89bb48
interface-name=mybond0
[ipv4]
dhcp-timeout=90
...
*** Connection 'kdump-eth0' ***
[connection]
id=kdump-eth0
uuid=ed6a7448-b5f8-4f8a-b718-3e24ea1c924b
type=ethernet
interface-name=kdump-eth0
master=ed87d02b-dd44-4f0e-8b11-37db7e89bb48
slave-type=bond
wait-device-timeout=60000
...
Later in kdump initrd, dracut starts NetworkManager to activate these
profiles to bring up the network connections. This way of setting up
kdump network is tedious, error-prone and unnecessary. A better way is
to directly copy the needed connection profiles to initrd. A potential
benefit of this approach for the users is they can simply edit the
connection profile directly like changing ipv4.dhcp-timeout instead of
being forced to use the hard-coded value enforced by
nm-initrd-generator.
This patch set reuses NetworkManager connection profiles to setup kdump
network. It also reduces the memory consumption of network drivers and
fix other issues at the same time. A machine could have multiple network
drivers and a network driver may manage multiple NICs. It's possible
kdump may only need one NIC. In this case, there is no need to install
unneeded network drivers or bring up unneeded NICs.
There are cases where a NIC may have a different name in the kdump
kernel. Currently, kexec-tools creates udev rules to rename NIC to have
a consistent name. With the new approach, we can simply ask NM to match
the connection profile by MAC address instead.
Here are the bug list that addressed by this patch set,
- Bug 1962421 - [RHEL-9]"eth0: Failed to rename network interface 3 from 'eth0' to 'kdump-eth0': File exists"
- Bug 2064708 - kdump: mkdumprd: failed to make kdump initrd for bridge network on z15 z/vm
- bugs related to OOM caused by network driver
- Bug 1950282 - shutdown those unneeded network interfaces to save memory for kdump
- Bug 1958587 - the kdump initramfs includes unnecessary NIC drivers for SSH/NFS dumping target
- Bug 1890021 - be2net is using too much memory during kdump
- Bug 1662202 - [RHEL-8.1] aarch64: hpe-apache crashkernel OOM when dump to network targe
Note this patch set is available for review on
https://github.com/coiby/kexec-tools/pull/9
v2:
- removes useless cat which also avoids SC2013
- fix code format issue and shellcheck warning
- squash four commits "set up kdump network {bridge,vlan,bridge,team} by directly
copying NM connection profile to initrd" to switch to the new approach
all at once to avoid confusion and causing trouble for git bisection
- fix several issues found by Philipp
- add missing reference
- use an array instead of supress shellchek SC2086 warning
- use $_netifs instead of $_netif_allowlist to intruct NM to only
manage specified NICs
- multiple typos
- use nmcli --get-values to get type first then construct MAC field
name
- get rid of the extra indentation
- s/uniq_name/unique_name/
v1:
- refactor complex kdump_copy_nmconnection_file [Philipp]
- clean up temporary file in a trap [Philipp]
- improve sed [Philipp]
- use long name consistently [Philipp]
- use nmcli -t, --terse option to suppress printing of the header [Philipp]
- don't pass kdumpip to initrd [Kairui]
- address the case where kdump_install_net is called multiple times like
fence kdump
- call kdump_install_nm_netif_allowlist after all kdump_install_net
calls have been finished
- ask NM to match a connection profile to a physical NIC by MAC address
- stop treating vlan specially when its parent interface is a physical NIC
- don't add unused NIC drivers to kdump initrd
- fix the error of "/etc/NetworkManager/system-connections/*.nmconnection" not exist
grep: /etc/NetworkManager/system-connections/*.nmconnection: No such file or directory
- redirect the messages of nmcli to ddebug
- use "grep -s" to get rid of the following warnings
grep: /var/tmp/dracut.6tqUm0/initramfs//etc/NetworkManager/system-connections/*.nmconnection: No such file or directory
grep: /etc/sysconfig/network-scripts/ifcfg-*: No such file or directory
grep: /etc/NetworkManager/system-connections/*.nmconnection: No such file or directory
Coiby Xu (11):
add function to copy NetworkManage connection profile to the initramfs
clone NM connection profiles to support legacy ifcfg automatically
ask NM to wait the network device to be available
stop dracut 35network-manager from running nm-initrd-generator
fix error for vlan over team network interface
set up kdump network by directly copying NM connection profile to
initrd
clean up unneeded code after copying .nmconnection to initrd
reduce kdump memory consumption by not letting NetworkManager manage
unneeded network interfaces
reduce kdump memory consumption by only installing needed NIC drivers
address the cases where a NIC has a different name in kdump kernel
simplify setup_znet by copying connection profile to initrd
dracut-kdump.sh | 39 +-
dracut-module-setup.sh | 483 ++++++++----------
dracut-module-setup.sh.fix | 994 +++++++++++++++++++++++++++++++++++++
kdump-lib-initramfs.sh | 14 +
mkdumprd | 2 +-
5 files changed, 1243 insertions(+), 289 deletions(-)
create mode 100755 dracut-module-setup.sh.fix
--
2.37.1
1 year, 1 month
[PATCH 1/2] Choosing the most memory-consuming key slot when estimating the memory requirement for LUKS-encrypted target
by Coiby Xu
When there are multiple key slots, "kdumpctl estimate" uses the least
memory-consuming key slot. For example, when there are two memory slots
created with --pbkdf-memory=1048576 (1G) and --pbkdf-memory=524288 (512M),
"kdumpctl estimate" thinks the extra memory requirement is only 512M.
This will of course lead to OOM if the user uses the more
memory-consuming key slot. Fix it by sorting in reverse order.
Fixes: e9e6a2c ("kdumpctl: Add kdumpctl estimate")
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
kdumpctl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl
index 126ecb9..ee40d33 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -1241,7 +1241,7 @@ do_estimate()
for _dev in $(get_all_kdump_crypt_dev); do
_crypt_info=$(cryptsetup luksDump "/dev/block/$_dev")
[[ $(echo "$_crypt_info" | sed -n "s/^Version:\s*\(.*\)/\1/p") == "2" ]] || continue
- for _mem in $(echo "$_crypt_info" | sed -n "s/\sMemory:\s*\(.*\)/\1/p" | sort -n); do
+ for _mem in $(echo "$_crypt_info" | sed -n "s/\sMemory:\s*\(.*\)/\1/p" | sort -n -r); do
crypt_size=$((crypt_size + _mem * 1024))
break
done
--
2.37.1
1 year, 1 month
[PATCH v1 00/14] reuse NetworkManager connection profiles to set up kdump network
by Coiby Xu
Currently, kexec-tools parses legacy ifcfg-* configuration files or
NetworkManager .nmconnection connection profiles to build up dracut
command line parameters like ip=. Then dracut parses these parameters and
runs nm-initrd-generator to generate NetworkManager connection profiles.
Taking a bonding network as an example, nm-initrd-generator generates two
connections as follows,
$ /usr/libexec/nm-initrd-generator -s -- bootdev=mybond0 rd.neednet kdumpnic=mybond0 bond=mybond0:kdump-eth0
*** Connection 'mybond0' ***
[connection]
id=mybond0
uuid=ed87d02b-dd44-4f0e-8b11-37db7e89bb48
interface-name=mybond0
[ipv4]
dhcp-timeout=90
...
*** Connection 'kdump-eth0' ***
[connection]
id=kdump-eth0
uuid=ed6a7448-b5f8-4f8a-b718-3e24ea1c924b
type=ethernet
interface-name=kdump-eth0
master=ed87d02b-dd44-4f0e-8b11-37db7e89bb48
slave-type=bond
wait-device-timeout=60000
...
Later in kdump initrd, dracut starts NetworkManager to activate these
profiles to bring up the network connections. This way of setting up
kdump network is tedious, error-prone and unnecessary. A better way is
to directly copy the needed connection profiles to initrd. A potential
benefit of this approach for the users is they can simply edit the
connection profile directly like changing ipv4.dhcp-timeout instead of
being forced to use the hard-coded value enforced by
nm-initrd-generator.
This patch set reuses NetworkManager connection profiles to setup kdump
network. It also reduces the memory consumption of network drivers and
fix other issues at the same time. A machine could have multiple network
drivers and a network driver may manage multiple NICs. It's possible
kdump may only need one NIC. In this case, there is no need to install
unneeded network drivers or bring up unneeded NICs.
Here are the bug list that addressed by this patch set,
- Bug 1962421 - [RHEL-9]"eth0: Failed to rename network interface 3 from 'eth0' to 'kdump-eth0': File exists"
- Bug 2064708 - kdump: mkdumprd: failed to make kdump initrd for bridge network on z15 z/vm
- bugs related to OOM caused by network driver
- Bug 1950282 - shutdown those unneeded network interfaces to save memory for kdump
- Bug 1958587 - the kdump initramfs includes unnecessary NIC drivers for SSH/NFS dumping target
- Bug 1890021 - be2net is using too much memory during kdump
- Bug 1662202 - [RHEL-8.1] aarch64: hpe-apache crashkernel OOM when dump to network targe
v1:
- refactor complex kdump_copy_nmconnection_file [Philipp]
- clean up temporary file in a trap [Philipp]
- improve sed [Philipp]
- use long name consistently [Philipp]
- use nmcli -t, --terse option to suppress printing of the header [Philipp]
- don't pass kdumpip to initrd [Kairui]
- address the case where kdump_install_net is called multiple times like
fence kdump
- call kdump_install_nm_netif_allowlist after all kdump_install_net
calls have been finished
- ask NM to match a connection profile to a physical NIC by MAC address
- stop treating vlan specially when its parent interface is a physical NIC
- don't add unused NIC drivers to kdump initrd
- fix the error of "/etc/NetworkManager/system-connections/*.nmconnection" not exist
grep: /etc/NetworkManager/system-connections/*.nmconnection: No such file or directory
- redirect the messages of nmcli to ddebug
- use "grep -s" to get rid of the following warnings
grep: /var/tmp/dracut.6tqUm0/initramfs//etc/NetworkManager/system-connections/*.nmconnection: No such file or directory
grep: /etc/sysconfig/network-scripts/ifcfg-*: No such file or directory
grep: /etc/NetworkManager/system-connections/*.nmconnection: No such file or directory
Coiby Xu (14):
add function to copy NetworkManage connection profile to the initramfs
clone NM connection profiles to support legacy ifcfg automatically
ask NM to wait the network device to be available
stop dracut 35network-manager from running nm-initrd-generator
set up kdump network bridge by directly copying NM connection profile
to initrd
set up kdump bonding network by directly copying NM connection profile
to initrd
fix error for vlan over team network interface
set up kdump vlan network by directly copying NM connection profile to
initrd
set up kdump teaming network by directly copying NM connection profile
to initrd
clean up unneeded code after copying .nmconnection to initrd
reduce kdump memory consumption by not letting NetworkManager manage
unneeded network interfaces
reduce kdump memory consumption by only installing needed NIC drivers
address the cases where a NIC has a different name in kdump kernel
simplify setup_znet by copying connection profile to initrd
dracut-kdump.sh | 25 ++-
dracut-module-setup.sh | 484 ++++++++++++++++++-----------------------
kdump-lib-initramfs.sh | 12 +
mkdumprd | 2 +-
4 files changed, 239 insertions(+), 284 deletions(-)
--
2.35.3
1 year, 1 month
[PATCH 1/2] Prefix reset-crashkernel-{for-installed_kernel,after-update} with underscore
by Coiby Xu
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2048690
To indicate they are for internal use only, underscore them.
Reported-by: rcheerla(a)redhat.com
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
92-crashkernel.install | 2 +-
kdumpctl | 4 ++--
kexec-tools.spec | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/92-crashkernel.install b/92-crashkernel.install
index 1d67a133..19bd0784 100755
--- a/92-crashkernel.install
+++ b/92-crashkernel.install
@@ -7,7 +7,7 @@ KERNEL_IMAGE="$4"
case "$COMMAND" in
add)
- kdumpctl reset-crashkernel-for-installed_kernel "$KERNEL_VERSION"
+ kdumpctl _reset-crashkernel-for-installed_kernel "$KERNEL_VERSION"
exit 0
;;
esac
diff --git a/kdumpctl b/kdumpctl
index 0e37d36e..19febd53 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -1764,12 +1764,12 @@ main()
shift
reset_crashkernel "$@"
;;
- reset-crashkernel-after-update)
+ _reset-crashkernel-after-update)
if [[ $(kdump_get_conf_val auto_reset_crashkernel) != no ]]; then
reset_crashkernel_after_update
fi
;;
- reset-crashkernel-for-installed_kernel)
+ _reset-crashkernel-for-installed_kernel)
if [[ $(kdump_get_conf_val auto_reset_crashkernel) != no ]]; then
reset_crashkernel_for_installed_kernel "$2"
fi
diff --git a/kexec-tools.spec b/kexec-tools.spec
index ee43b13c..5f0e1b53 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -343,7 +343,7 @@ done
# 2. "[ $1 == 1 ]" in posttrans scriptlet means both install and upgrade. The
# former case is used to set up crashkernel for osbuild
if [ ! -f /run/ostree-booted ] && [ $1 == 1 ]; then
- kdumpctl reset-crashkernel-after-update
+ kdumpctl _reset-crashkernel-after-update
rm /tmp/old_default_crashkernel 2>/dev/null
%ifarch ppc64 ppc64le
rm /tmp/old_default_crashkernel_fadump 2>/dev/null
--
2.37.2
1 year, 1 month