[PATCH v7 0/4] support dump ssh via link local ipv6 address
by Ziyue Yang
When dumping to ssh via link local ipv6 address, the ssh
parameter in kdump.conf is supposed to have the form like:
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
where "%eth0" is an existing network interface supporting ipv6.
However, there are 4 problems in enabling link local ipv6:
1) The get_remote_host function in kdump-lib.sh currently
doesn't remove the network interface in the ipv6 address,
causing the ip command in kdump_install_net function to fail,
leading to a "Bad kdump location" message.
2) The logic in kdump_install_net will find the network
interface to use by "ip route" command, which might be
different from what user specified in kdump.conf in link
local ipv6 cases.
3) The kdump_setup_ifname function in dracut-module-setup.sh
would add 'kdump-' prefix to network interfaces with name like
'eth*', causing ssh target specified in kdump.conf invalid
while dumping process.
4) ssh target with 'kdump-' prefixed interface name is not
in known_hosts while dumping, leading to ssh connection failure.
This patch series handles the problems above.
Ziyue Yang (4):
kdump-lib.sh: support link local ipv6 address with interface name
dracut-module-setup.sh: use network interface specified by user in
link local ipv6
dracut-module-setup.sh: add 'kdump-' prefix in kdump.conf for link
local ipv6
dracut-kdump.sh: support 'kdump-' prefixed interfaces for link local
ipv6
dracut-kdump.sh | 10 +++++++++-
dracut-module-setup.sh | 32 +++++++++++++++++++++++++++-----
kdump-lib.sh | 11 +++++++++++
3 files changed, 47 insertions(+), 6 deletions(-)
--
2.9.3
6 years, 7 months
[PATCH v5 0/3] support dump ssh via link local ipv6 address
by Ziyue Yang
When dumping to ssh via local ipv6 address, the ssh parameter
in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
where "%eth0" is an existing network interface supporting ipv6.
However, there are 3 problems in enabling ipv6:
1) The get_remote_host function in kdump-lib.sh currently
doesn't remove the network interface in the ipv6 address,
causing the ip command in kdump_install_net function to fail,
leading to a "Bad kdump location" message.
2) The kdump_setup_ifname function in dracut-module-setup.sh
would add 'kdump-' prefix to network interfaces with name like
'eth*', causing ssh target specified in kdump.conf invalid
while dumping process.
3) ssh target with 'kdump-' prefixed interface name is not
in known_hosts while dumping, leading to ssh connection failure.
This patch series handles the problems above.
Ziyue Yang (3):
kdump-lib.sh: support link local ipv6 address with interface name
dracut-module-setup.sh: add 'kdump-' prefix in kdump.conf for link
local ipv6
dracut-kdump.sh: support 'kdump-' prefixed interfaces for link local
ipv6
dracut-kdump.sh | 10 +++++++++-
dracut-module-setup.sh | 12 ++++++++++++
kdump-lib.sh | 12 ++++++++++++
3 files changed, 33 insertions(+), 1 deletion(-)
--
2.7.4
6 years, 8 months
[PATCH v4] mkdumprd: eliminate redundant lsinitrd calls in dracut
by Ziyue Yang
Currently in Fedora/RedHat dracut installs its fedora.conf.example
as the default config file, in which sysloglvl is set 5. This leads
to maxloglvl=5 in dracut calls, making unnecessary lsinitrd calls
during initramfs builds by kdump.
This patch makes use of
https://github.com/dracutdevs/dracut/pull/272
and disables lsinitrd logging by giving "-q" option to dracut,
eliminating unnecessary lsinitrd calls in dracut.
1) Before this patch
$ kdumpctl stop; touch /etc/kdump.conf; time kdumpctl start
kexec: unloaded kdump kernel
Stopping kdump: [OK]
Detected change(s) in the following file(s):
/etc/kdump.conf
Rebuilding /boot/initramfs-4.13.0-0.rc1.git4.1.fc27.x86_64kdump.img
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m26.824s
user 0m9.958s
sys 0m15.106s
2) After this patch
$ kdumpctl stop; touch /etc/kdump.conf; time kdumpctl start
kexec: unloaded kdump kernel
Stopping kdump: [OK]
Detected change(s) in the following file(s):
/etc/kdump.conf
Rebuilding /boot/initramfs-4.13.0-0.rc1.git4.1.fc27.x86_64kdump.img
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m20.420s
user 0m8.385s
sys 0m10.468s
Signed-off-by: Ziyue Yang <ziyang(a)redhat.com>
---
mkdumprd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkdumprd b/mkdumprd
index d3ecbd6..f0ac138 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -37,7 +37,7 @@ is_wdt_addition_needed
[[ $? -eq 0 ]] && WDTCFG="-a watchdog"
extra_modules=""
-dracut_args=("--hostonly" "--hostonly-i18n" "-o" "plymouth dash resume ifcfg" $WDTCFG)
+dracut_args=("-q" "--hostonly" "--hostonly-i18n" "-o" "plymouth dash resume ifcfg" $WDTCFG)
OVERRIDE_RESETTABLE=0
add_dracut_arg() {
--
2.9.3
6 years, 8 months
[PATCH v3 0/2] eliminate redundant lsinitrd calls in dracut
by Ziyue Yang
Currently in Fedora/RedHat dracut installs its fedora.conf.example
as the default config file, in which sysloglvl is set 5. This leads
to maxloglvl=5 in dracut calls, making unnecessary lsinitrd calls
during initramfs builds.
This patch makes use of --confdir arguments of dracut, creates temp
config directory before mkdumprd(dracut) calls. It appends sysloglvl=3
option by creating a 99-kdump.conf file in the temp config directory.
1) Before this patch
$ kdumpctl stop; touch /etc/kdump.conf; time kdumpctl start
kexec: unloaded kdump kernel
Stopping kdump: [OK]
Detected change(s) in the following file(s):
/etc/kdump.conf
Rebuilding /boot/initramfs-4.13.0-0.rc1.git4.1.fc27.x86_64kdump.img
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m26.824s
user 0m9.958s
sys 0m15.106s
2) After this patch
$ kdumpctl stop; touch /etc/kdump.conf; time kdumpctl start
kexec: unloaded kdump kernel
Stopping kdump: [OK]
Detected change(s) in the following file(s):
/etc/kdump.conf
Rebuilding /boot/initramfs-4.13.0-0.rc1.git4.1.fc27.x86_64kdump.img
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m20.420s
user 0m8.385s
sys 0m10.468s
Ziyue Yang (2):
kdumpctl: lower dracut's sysloglvl to eliminate redundant lsinitrd
calls
kdump.conf: add help text for dracut_sysloglvl config item
kdump-lib.sh | 19 +++++++++++++++++++
kdump.conf | 6 ++++++
kdump.conf.5 | 7 +++++++
kdumpctl | 5 +++--
4 files changed, 35 insertions(+), 2 deletions(-)
--
2.9.3
6 years, 8 months
[PATCH v6 0/3] support dump ssh via link local ipv6 address
by Ziyue Yang
When dumping to ssh via local ipv6 address, the ssh parameter
in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
where "%eth0" is an existing network interface supporting ipv6.
However, there are 3 problems in enabling ipv6:
1) The get_remote_host function in kdump-lib.sh currently
doesn't remove the network interface in the ipv6 address,
causing the ip command in kdump_install_net function to fail,
leading to a "Bad kdump location" message.
2) The kdump_setup_ifname function in dracut-module-setup.sh
would add 'kdump-' prefix to network interfaces with name like
'eth*', causing ssh target specified in kdump.conf invalid
while dumping process.
3) ssh target with 'kdump-' prefixed interface name is not
in known_hosts while dumping, leading to ssh connection failure.
This patch series handles the problems above.
Ziyue Yang (3):
kdump-lib.sh: support link local ipv6 address with interface name
dracut-module-setup.sh: add 'kdump-' prefix in kdump.conf for link
local ipv6
dracut-kdump.sh: support 'kdump-' prefixed interfaces for link local
ipv6
dracut-kdump.sh | 10 +++++++++-
dracut-module-setup.sh | 15 +++++++++++++++
kdump-lib.sh | 11 +++++++++++
3 files changed, 35 insertions(+), 1 deletion(-)
--
2.9.3
6 years, 8 months
[PATCH v2 0/4] eliminate redundant lsinitrd calls in dracut
by Ziyue Yang
Currently in Fedora/RedHat dracut installs its fedora.conf.example
as the default config file, in which sysloglvl is set 5. This leads
to maxloglvl=5 in dracut calls, making unnecessary lsinitrd calls
during initramfs builds.
This patch makes use of --confdir arguments of dracut, creates temp
config directory before mkdumprd(dracut) calls. It appends sysloglvl=3
option by creating a 99-kdump.conf file in the temp config directory.
1) Before this patch
$ kdumpctl stop; touch /etc/kdump.conf; time kdumpctl start
kexec: unloaded kdump kernel
Stopping kdump: [OK]
Detected change(s) in the following file(s):
/etc/kdump.conf
Rebuilding /boot/initramfs-4.13.0-0.rc1.git4.1.fc27.x86_64kdump.img
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m26.824s
user 0m9.958s
sys 0m15.106s
2) After this patch
$ kdumpctl stop; touch /etc/kdump.conf; time kdumpctl start
kexec: unloaded kdump kernel
Stopping kdump: [OK]
Detected change(s) in the following file(s):
/etc/kdump.conf
Rebuilding /boot/initramfs-4.13.0-0.rc1.git4.1.fc27.x86_64kdump.img
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m20.420s
user 0m8.385s
sys 0m10.468s
Ziyue Yang (4):
kdumpctl: specify temp config directory for dracut when calling
mkdumprd
kdump-lib.sh: create temp config directory for dracut
kdump.conf: add help text and default value for dracut_sysloglvl
kdump.conf.5: add man text for dracut_sysloglvl
kdump-lib.sh | 24 ++++++++++++++++++++++++
kdump.conf | 4 ++++
kdump.conf.5 | 6 ++++++
kdumpctl | 6 ++++--
4 files changed, 38 insertions(+), 2 deletions(-)
--
2.7.4
6 years, 8 months
[PATCH v4 0/2] support dump ssh via link local ipv6 address
by Ziyue Yang
When dumping to ssh via local ipv6 address, the ssh parameter
in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
where "%eth0" is an existing network interface supporting ipv6.
However, there are 3 problems in enabling ipv6:
1) The get_remote_host function in kdump-lib.sh currently
doesn't remove the network interface in the ipv6 address,
causing the ip command in kdump_install_net function to fail,
leading to a "Bad kdump location" message.
2) The kdump_setup_ifname function in dracut-module-setup.sh
would add 'kdump-' prefix to network interfaces with name like
'eth*', causing ssh target specified in kdump.conf invalid
while dumping process.
3) ssh target with 'kdump-' prefixed interface name is not
in known_hosts while dumping, leading to ssh connection failure.
This patch series handles the problems above.
Ziyue Yang (2):
kdump-lib.sh: support ipv6 address with interface name
dracut-kdump.sh: support 'kdump-' prefixed interfaces in dump_ssh
dracut-kdump.sh | 19 ++++++++++++++++++-
kdump-lib.sh | 4 ++++
2 files changed, 22 insertions(+), 1 deletion(-)
--
2.9.3
6 years, 8 months
[PATCH v3 0/3] support dump ssh via ipv6 address
by Ziyue Yang
When dumping to ssh via local ipv6 address, the ssh parameter
in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
where "%eth0" is an existing network interface supporting ipv6.
However, there are 3 problems in enabling ipv6:
1) The get_remote_host function in kdump-lib.sh currently
doesn't remove the network interface in the ipv6 address,
causing the ip command in kdump_install_net function to fail,
leading to a "Bad kdump location" message.
2) The kdump_setup_ifname function in dracut-module-setup.sh
would add 'kdump-' prefix to network interfaces with name like
'eth*', causing ssh target specified in kdump.conf invalid
while dumping process.
3) ssh target with 'kdump-' prefixed interface name is not
in known_hosts while dumping, leading to ssh connection failure.
This patch series handles the problems above.
Ziyue Yang (3):
kdump-lib.sh: support ipv6 address with interface name
dracut-kdump.sh: add 'kdump-' prefix to 'eth*' interfaces while
dumping
dracut-module-setup.sh: add 'kdump-' prefix to 'eth*' interfaces in
known_hosts
dracut-kdump.sh | 10 ++++++++++
dracut-module-setup.sh | 22 ++++++++++++++++++++++
kdump-lib.sh | 4 ++++
3 files changed, 36 insertions(+)
--
2.9.3
6 years, 8 months
[PATCH 0/2] support dump ssh via ipv6 address
by Ziyue Yang
When dumping to ssh via local ipv6 address, the ssh parameter
in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
where "%eth0" is an existing network interface supporting ipv6.
However, there are 2 problems in enabling ipv6:
1) The get_remote_host function in kdump-lib.sh currently
doesn't remove the network interface in the ipv6 address,
causing the ip command in kdump_install_net function to fail,
leading to a "Bad kdump location" message.
2) The kdump_setup_ifname function in dracut-module-setup.sh
would add 'kdump-' prefix to network interfaces with name like
'eth*', causing ssh target specified in kdump.conf invalid
while dumping process.
Ziyue Yang (2):
kdump-lib.sh: support ipv6 address with interface name
dracut-kdump.sh: add 'kdump-' prefix to 'eth*' interfaces while
dumping
dracut-kdump.sh | 10 ++++++++++
kdump-lib.sh | 4 ++++
2 files changed, 14 insertions(+)
--
2.9.3
6 years, 8 months
[PATCH v3] mkdumprd: use 300s as the default systemd unit timeout for kdump mount
by Xunlei Pang
Currently, systemd uses 90s as the default mount unit timeout
(see "man 5 systemd-system.conf " for "DefaultTimeoutStartSec"),
in some cases, although it works well in 1st kernel, it's not
enough under kdump and results in mount timeout, further results
in kdump dumping failure.
We've met several such issues, we decided to enlarge this default
value a little for kdump.
We know that dracut has a default initqueue timeout value of 180s
("rd.retry"), we finalized a little larger value 300s as kdump's
default timeout if there is no explicit "DefaultTimeoutStartSec=X,
specified by users.
"DefaultTimeoutStartSec=X" can be overridden by individual mount
option "x-systemd.device-timeout=X", users can specify their own
values as needed.
This patch achieves the purpose by creating a dedicated conf file
"/etc/systemd/system.conf.d/kdump.conf" which has the content of
"DefaultTimeoutStartSec=300s", this is based on the fact that all
the conf files will be parsed by systemd and the last parsed one
will be used if there are duplicate definitions.
Signed-off-by: Xunlei Pang <xlpang(a)redhat.com>
---
dracut-module-setup.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 59b4f04..8de9dbe 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -753,4 +753,13 @@ install() {
sed -i -e \
's/\(^[[:space:]]*reserved_memory[[:space:]]*=\)[[:space:]]*[[:digit:]]*/\1 1024/' \
${initdir}/etc/lvm/lvm.conf &>/dev/null
+
+ # Kdump turns out to require longer default systemd mount timeout
+ # than 1st kernel(90s by default), we use default 300s for kdump.
+ grep -r "^[[:space:]]*DefaultTimeoutStartSec=" ${initdir}/etc/systemd/system.conf* &>/dev/null
+ if [ $? -ne 0 ]; then
+ mkdir -p ${initdir}/etc/systemd/system.conf.d
+ echo "[Manager]" > ${initdir}/etc/systemd/system.conf.d/kdump.conf
+ echo "DefaultTimeoutStartSec=300s" >> ${initdir}/etc/systemd/system.conf.d/kdump.conf
+ fi
}
--
1.8.3.1
6 years, 8 months