Resolves: bz2106645
This reverts commit 163c02970e4ddcf238b2ac09eadf380744e01ba2.
The code of commit 163c02970e4ddc takes effect in rhel firstly, later pulled to Fedora. However, Fedora OS doesn't have 40-redhat.rules in systemd-udev package. With this commit applied, a warning message can always been seen as below. So reverting commit 163c02970e4ddc to remove the unnecessary warning message.
[root@ ~]# kdumpctl restart kdump: kexec: unloaded kdump kernel kdump: Stopping kdump: [OK] kdump: No kdump initial ramdisk found. kdump: Rebuilding /boot/initramfs-5.19.0-rc6+kdump.img sed: can't read /var/tmp/dracut.NnAV2g/initramfs/usr/lib/udev/rules.d/40-redhat.rules: No such file or directory kdump: kexec: loaded kdump kernel kdump: Starting kdump: [OK]
Signed-off-by: Baoquan He bhe@redhat.com --- dracut-module-setup.sh | 18 ------------------ 1 file changed, 18 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c319fc2db7aa..1ea0d9596f9c 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1010,29 +1010,11 @@ kdump_install_systemd_conf() { echo "ForwardToConsole=yes" >> "${initdir}/etc/systemd/journald.conf.d/kdump.conf" }
-remove_cpu_online_rule() { - local file=${initdir}/usr/lib/udev/rules.d/40-redhat.rules - - sed -i '/SUBSYSTEM=="cpu"/d' "$file" -} - install() { - local arch - kdump_module_init kdump_install_conf remove_sysctl_conf
- # Onlining secondary cpus breaks kdump completely on KVM on Power hosts - # Though we use maxcpus=1 by default but 40-redhat.rules will bring up all - # possible cpus by default. (rhbz1270174 rhbz1266322) - # Thus before we get the kernel fix and the systemd rule fix let's remove - # the cpu online rule in kdump initramfs. - arch=$(uname -m) - if [[ "$arch" = "ppc64le" ]] || [[ "$arch" = "ppc64" ]]; then - remove_cpu_online_rule - fi - if is_ssh_dump_target; then kdump_install_random_seed fi
Hi Baoquan,
Please see the comments inline.
On Thu, Jul 14, 2022 at 9:16 AM Baoquan He bhe@redhat.com wrote:
Resolves: bz2106645
This reverts commit 163c02970e4ddcf238b2ac09eadf380744e01ba2.
The code of commit 163c02970e4ddc takes effect in rhel firstly, later pulled to Fedora. However, Fedora OS doesn't have 40-redhat.rules in systemd-udev package. With this commit applied, a warning message
Let's say RHEL-10 forked from Fedora, then RHEL-10 will miss this patch. So, any better solution?
Thanks, PIngfan
can always been seen as below. So reverting commit 163c02970e4ddc to remove the unnecessary warning message.
[root@ ~]# kdumpctl restart kdump: kexec: unloaded kdump kernel kdump: Stopping kdump: [OK] kdump: No kdump initial ramdisk found. kdump: Rebuilding /boot/initramfs-5.19.0-rc6+kdump.img sed: can't read /var/tmp/dracut.NnAV2g/initramfs/usr/lib/udev/rules.d/40-redhat.rules: No such file or directory kdump: kexec: loaded kdump kernel kdump: Starting kdump: [OK]
Signed-off-by: Baoquan He bhe@redhat.com
dracut-module-setup.sh | 18 ------------------ 1 file changed, 18 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c319fc2db7aa..1ea0d9596f9c 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1010,29 +1010,11 @@ kdump_install_systemd_conf() { echo "ForwardToConsole=yes" >> "${initdir}/etc/systemd/journald.conf.d/kdump.conf" }
-remove_cpu_online_rule() {
- local file=${initdir}/usr/lib/udev/rules.d/40-redhat.rules
- sed -i '/SUBSYSTEM=="cpu"/d' "$file"
-}
install() {
local arch
kdump_module_init kdump_install_conf remove_sysctl_conf
# Onlining secondary cpus breaks kdump completely on KVM on Power hosts
# Though we use maxcpus=1 by default but 40-redhat.rules will bring up all
# possible cpus by default. (rhbz1270174 rhbz1266322)
# Thus before we get the kernel fix and the systemd rule fix let's remove
# the cpu online rule in kdump initramfs.
arch=$(uname -m)
if [[ "$arch" = "ppc64le" ]] || [[ "$arch" = "ppc64" ]]; then
remove_cpu_online_rule
fi
if is_ssh_dump_target; then kdump_install_random_seed fi
-- 2.34.1
On 07/14/22 at 10:08am, Pingfan Liu wrote:
Hi Baoquan,
Please see the comments inline.
On Thu, Jul 14, 2022 at 9:16 AM Baoquan He bhe@redhat.com wrote:
Resolves: bz2106645
This reverts commit 163c02970e4ddcf238b2ac09eadf380744e01ba2.
The code of commit 163c02970e4ddc takes effect in rhel firstly, later pulled to Fedora. However, Fedora OS doesn't have 40-redhat.rules in systemd-udev package. With this commit applied, a warning message
Let's say RHEL-10 forked from Fedora, then RHEL-10 will miss this patch. So, any better solution?
Commenting out the function invocation works for you? In RHEL0, we just revert the commenting commit manually.
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c319fc2db7aa..517882d3ba3c 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1030,7 +1030,7 @@ install() { # the cpu online rule in kdump initramfs. arch=$(uname -m) if [[ "$arch" = "ppc64le" ]] || [[ "$arch" = "ppc64" ]]; then - remove_cpu_online_rule + # remove_cpu_online_rule fi
if is_ssh_dump_target; then
Thanks, PIngfan
can always been seen as below. So reverting commit 163c02970e4ddc to remove the unnecessary warning message.
[root@ ~]# kdumpctl restart kdump: kexec: unloaded kdump kernel kdump: Stopping kdump: [OK] kdump: No kdump initial ramdisk found. kdump: Rebuilding /boot/initramfs-5.19.0-rc6+kdump.img sed: can't read /var/tmp/dracut.NnAV2g/initramfs/usr/lib/udev/rules.d/40-redhat.rules: No such file or directory kdump: kexec: loaded kdump kernel kdump: Starting kdump: [OK]
Signed-off-by: Baoquan He bhe@redhat.com
dracut-module-setup.sh | 18 ------------------ 1 file changed, 18 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c319fc2db7aa..1ea0d9596f9c 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1010,29 +1010,11 @@ kdump_install_systemd_conf() { echo "ForwardToConsole=yes" >> "${initdir}/etc/systemd/journald.conf.d/kdump.conf" }
-remove_cpu_online_rule() {
- local file=${initdir}/usr/lib/udev/rules.d/40-redhat.rules
- sed -i '/SUBSYSTEM=="cpu"/d' "$file"
-}
install() {
local arch
kdump_module_init kdump_install_conf remove_sysctl_conf
# Onlining secondary cpus breaks kdump completely on KVM on Power hosts
# Though we use maxcpus=1 by default but 40-redhat.rules will bring up all
# possible cpus by default. (rhbz1270174 rhbz1266322)
# Thus before we get the kernel fix and the systemd rule fix let's remove
# the cpu online rule in kdump initramfs.
arch=$(uname -m)
if [[ "$arch" = "ppc64le" ]] || [[ "$arch" = "ppc64" ]]; then
remove_cpu_online_rule
fi
if is_ssh_dump_target; then kdump_install_random_seed fi
-- 2.34.1
What about the following:
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c319fc2..08b5639 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1013,7 +1013,9 @@ kdump_install_systemd_conf() { remove_cpu_online_rule() { local file=${initdir}/usr/lib/udev/rules.d/40-redhat.rules
- sed -i '/SUBSYSTEM=="cpu"/d' "$file" + if [[ -f $file ]]; then + sed -i '/SUBSYSTEM=="cpu"/d' "$file" + fi }
Thanks
On Thu, Jul 14, 2022 at 10:25 AM Baoquan He bhe@redhat.com wrote:
On 07/14/22 at 10:08am, Pingfan Liu wrote:
Hi Baoquan,
Please see the comments inline.
On Thu, Jul 14, 2022 at 9:16 AM Baoquan He bhe@redhat.com wrote:
Resolves: bz2106645
This reverts commit 163c02970e4ddcf238b2ac09eadf380744e01ba2.
The code of commit 163c02970e4ddc takes effect in rhel firstly, later pulled to Fedora. However, Fedora OS doesn't have 40-redhat.rules in systemd-udev package. With this commit applied, a warning message
Let's say RHEL-10 forked from Fedora, then RHEL-10 will miss this patch. So, any better solution?
Commenting out the function invocation works for you? In RHEL0, we just revert the commenting commit manually.
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c319fc2db7aa..517882d3ba3c 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1030,7 +1030,7 @@ install() { # the cpu online rule in kdump initramfs. arch=$(uname -m) if [[ "$arch" = "ppc64le" ]] || [[ "$arch" = "ppc64" ]]; then
remove_cpu_online_rule
# remove_cpu_online_rule fi
if is_ssh_dump_target; then
Thanks, PIngfan
can always been seen as below. So reverting commit 163c02970e4ddc to remove the unnecessary warning message.
[root@ ~]# kdumpctl restart kdump: kexec: unloaded kdump kernel kdump: Stopping kdump: [OK] kdump: No kdump initial ramdisk found. kdump: Rebuilding /boot/initramfs-5.19.0-rc6+kdump.img sed: can't read /var/tmp/dracut.NnAV2g/initramfs/usr/lib/udev/rules.d/40-redhat.rules: No such file or directory kdump: kexec: loaded kdump kernel kdump: Starting kdump: [OK]
Signed-off-by: Baoquan He bhe@redhat.com
dracut-module-setup.sh | 18 ------------------ 1 file changed, 18 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c319fc2db7aa..1ea0d9596f9c 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1010,29 +1010,11 @@ kdump_install_systemd_conf() { echo "ForwardToConsole=yes" >> "${initdir}/etc/systemd/journald.conf.d/kdump.conf" }
-remove_cpu_online_rule() {
- local file=${initdir}/usr/lib/udev/rules.d/40-redhat.rules
- sed -i '/SUBSYSTEM=="cpu"/d' "$file"
-}
install() {
local arch
kdump_module_init kdump_install_conf remove_sysctl_conf
# Onlining secondary cpus breaks kdump completely on KVM on Power hosts
# Though we use maxcpus=1 by default but 40-redhat.rules will bring up all
# possible cpus by default. (rhbz1270174 rhbz1266322)
# Thus before we get the kernel fix and the systemd rule fix let's remove
# the cpu online rule in kdump initramfs.
arch=$(uname -m)
if [[ "$arch" = "ppc64le" ]] || [[ "$arch" = "ppc64" ]]; then
remove_cpu_online_rule
fi
if is_ssh_dump_target; then kdump_install_random_seed fi
-- 2.34.1
Resolves: bz2106645
The code of commit 163c02970e4ddc takes effect in rhel firstly, later pulled to Fedora. However, Fedora OS doesn't have 40-redhat.rules in systemd-udev package. With this commit applied, a false positive warning message can always been seen as below.
So fixing it by checking if 40-redhat.rules exists before handling. With this change, the false warning is gone.
[root@ ~]# kdumpctl restart kdump: kexec: unloaded kdump kernel kdump: Stopping kdump: [OK] kdump: No kdump initial ramdisk found. kdump: Rebuilding /boot/initramfs-5.19.0-rc6+kdump.img sed: can't read /var/tmp/dracut.NnAV2g/initramfs/usr/lib/udev/rules.d/40-redhat.rules: No such file or directory kdump: kexec: loaded kdump kernel kdump: Starting kdump: [OK]
Signed-off-by: Baoquan He bhe@redhat.com --- v1->v2: Checking the existence of 40-redhat.rule befor handling.
dracut-module-setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c319fc2db7aa..4c6096a8df97 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1013,7 +1013,9 @@ kdump_install_systemd_conf() { remove_cpu_online_rule() { local file=${initdir}/usr/lib/udev/rules.d/40-redhat.rules
- sed -i '/SUBSYSTEM=="cpu"/d' "$file" + if [[ -f $file ]]; then + sed -i '/SUBSYSTEM=="cpu"/d' "$file" + fi }
install() {
On Thu, Jul 14, 2022 at 6:55 PM Baoquan He bhe@redhat.com wrote:
Resolves: bz2106645
The code of commit 163c02970e4ddc takes effect in rhel firstly, later pulled to Fedora. However, Fedora OS doesn't have 40-redhat.rules in systemd-udev package. With this commit applied, a false positive warning message can always been seen as below.
So fixing it by checking if 40-redhat.rules exists before handling. With this change, the false warning is gone.
[root@ ~]# kdumpctl restart kdump: kexec: unloaded kdump kernel kdump: Stopping kdump: [OK] kdump: No kdump initial ramdisk found. kdump: Rebuilding /boot/initramfs-5.19.0-rc6+kdump.img sed: can't read /var/tmp/dracut.NnAV2g/initramfs/usr/lib/udev/rules.d/40-redhat.rules: No such file or directory kdump: kexec: loaded kdump kernel kdump: Starting kdump: [OK]
Signed-off-by: Baoquan He bhe@redhat.com
v1->v2: Checking the existence of 40-redhat.rule befor handling.
dracut-module-setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c319fc2db7aa..4c6096a8df97 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1013,7 +1013,9 @@ kdump_install_systemd_conf() { remove_cpu_online_rule() { local file=${initdir}/usr/lib/udev/rules.d/40-redhat.rules
- sed -i '/SUBSYSTEM=="cpu"/d' "$file"
- if [[ -f $file ]]; then
sed -i '/SUBSYSTEM=="cpu"/d' "$file"
- fi
}
install() {
2.34.1
LGTM,
Acked-by: Pingfan Liu piliu@redhat.com
Patch merged, thanks to Baoquan and Pingfan!
On Thu, Jul 14, 2022 at 09:30:23PM +0800, Pingfan Liu wrote:
On Thu, Jul 14, 2022 at 6:55 PM Baoquan He bhe@redhat.com wrote:
Resolves: bz2106645
The code of commit 163c02970e4ddc takes effect in rhel firstly, later pulled to Fedora. However, Fedora OS doesn't have 40-redhat.rules in systemd-udev package. With this commit applied, a false positive warning message can always been seen as below.
So fixing it by checking if 40-redhat.rules exists before handling. With this change, the false warning is gone.
[root@ ~]# kdumpctl restart kdump: kexec: unloaded kdump kernel kdump: Stopping kdump: [OK] kdump: No kdump initial ramdisk found. kdump: Rebuilding /boot/initramfs-5.19.0-rc6+kdump.img sed: can't read /var/tmp/dracut.NnAV2g/initramfs/usr/lib/udev/rules.d/40-redhat.rules: No such file or directory kdump: kexec: loaded kdump kernel kdump: Starting kdump: [OK]
Signed-off-by: Baoquan He bhe@redhat.com
v1->v2: Checking the existence of 40-redhat.rule befor handling.
dracut-module-setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index c319fc2db7aa..4c6096a8df97 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1013,7 +1013,9 @@ kdump_install_systemd_conf() { remove_cpu_online_rule() { local file=${initdir}/usr/lib/udev/rules.d/40-redhat.rules
- sed -i '/SUBSYSTEM=="cpu"/d' "$file"
- if [[ -f $file ]]; then
sed -i '/SUBSYSTEM=="cpu"/d' "$file"
- fi
}
install() {
2.34.1
LGTM,
Acked-by: Pingfan Liu piliu@redhat.com _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure