Fedora dracut-044-75 release has all the component needed to support initrd rebuild in case of watchdog state change. Therefore sending these patches for inclusion in kexec-tools.
Please note that these patches should only be added in those fedora versions which has dracut version dracut-044-75 or latter. Anyway, we already have dependency specified in spec file as well.
Pratyush Anand (5): kdumpctl: force rebuild in case of watchdog state change watchdog: Add nowdt argument in kdump.conf watchdog: do not add watchdog module in rd.driver.pre now Watchdog: Add notes for kdumpctl man page spec: Update to add dependency on dracut version >= 044-75
dracut-module-setup.sh | 9 --------- kdump.conf | 4 ++++ kdump.conf.5 | 5 +++++ kdumpctl | 34 +++++++++++++++++++++++++++++++++- kdumpctl.8 | 9 +++++++++ kexec-tools.spec | 3 ++- mkdumprd | 8 +++++++- 7 files changed, 60 insertions(+), 12 deletions(-)
If state of a watchdog device is changed by an user after kdumpctl restart then initramfs must be rebuilt on the basis of new watchdog status.
Testing: ------------------------------------------------------- Initramfs wdt state Prev Current Result ------------------------------------------------------- Not Exist NA X Rebuild Exist Inact Inact No Rebuild Exist Inact Act Force Rebuild Exist Act Inact Force Rebuild Exist Act Act(Same wdt) No Rebuild Exist Act Act(Diff wdt) Force Rebuild
Signed-off-by: Pratyush Anand panand@redhat.com --- kdumpctl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
diff --git a/kdumpctl b/kdumpctl index c8fc54fc7677..12e7aa005c5d 100755 --- a/kdumpctl +++ b/kdumpctl @@ -427,6 +427,32 @@ check_dump_fs_modified() return 1 }
+check_wdt_modified() +{ + NOWDT=$(grep ^nowdt $KDUMP_CONFIG_FILE | cut -d' ' -f2) + [[ -z $NOWDT ]] || return 0 + [[ -d /sys/class/watchdog/ ]] || return 0 + + for dir in /sys/class/watchdog/*; do + [[ -d "$dir" ]] || continue + [[ -f "$dir/state" ]] || continue + wdtdrv=$(< "$dir/device/modalias") + wdtdrv=$(modinfo $wdtdrv | grep filename | awk -F"kernel/" '{print $2}') + active=$(< "$dir/state") + # rebuild when: + # module for this watchdog is not found and watchdog is active + # module for this watchdog is found and watchdog is inactive + lsinitrd $TARGET_INITRD | grep $wdtdrv &> /dev/null + if [ $? -ne 0 ]; then + [[ "$active" = "active" ]] && return 1 + else + [[ "$active" = "inactive" ]] && return 1 + fi + done + + return 0 +} + # returns 0 if system is not modified # returns 1 if system is modified # returns 2 if system modification is invalid @@ -448,6 +474,12 @@ check_system_modified() return $ret fi
+ check_wdt_modified + if [ $? -ne 0 ]; then + echo "Detected change in watchdog state" + return 1 + fi + return 0 }
Hi, Pratyush
On 07/05/16 at 11:41am, Pratyush Anand wrote:
If state of a watchdog device is changed by an user after kdumpctl restart then initramfs must be rebuilt on the basis of new watchdog status.
Testing:
Initramfs wdt state Prev Current Result
Not Exist NA X Rebuild Exist Inact Inact No Rebuild Exist Inact Act Force Rebuild Exist Act Inact Force Rebuild Exist Act Act(Same wdt) No Rebuild Exist Act Act(Diff wdt) Force Rebuild
Signed-off-by: Pratyush Anand panand@redhat.com
kdumpctl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
diff --git a/kdumpctl b/kdumpctl index c8fc54fc7677..12e7aa005c5d 100755 --- a/kdumpctl +++ b/kdumpctl @@ -427,6 +427,32 @@ check_dump_fs_modified() return 1 }
+check_wdt_modified() +{
- NOWDT=$(grep ^nowdt $KDUMP_CONFIG_FILE | cut -d' ' -f2)
- [[ -z $NOWDT ]] || return 0
- [[ -d /sys/class/watchdog/ ]] || return 0
- for dir in /sys/class/watchdog/*; do
[[ -d "$dir" ]] || continue
[[ -f "$dir/state" ]] || continue
wdtdrv=$(< "$dir/device/modalias")
wdtdrv=$(modinfo $wdtdrv | grep filename | awk -F"kernel/" '{print $2}')
active=$(< "$dir/state")
# rebuild when:
# module for this watchdog is not found and watchdog is active
# module for this watchdog is found and watchdog is inactive
lsinitrd $TARGET_INITRD | grep $wdtdrv &> /dev/null
if [ $? -ne 0 ]; then
[[ "$active" = "active" ]] && return 1
else
[[ "$active" = "inactive" ]] && return 1
fi
- done
- return 0
+}
# returns 0 if system is not modified # returns 1 if system is modified # returns 2 if system modification is invalid @@ -448,6 +474,12 @@ check_system_modified() return $ret fi
- check_wdt_modified
- if [ $? -ne 0 ]; then
echo "Detected change in watchdog state"
return 1
- fi
- return 0
}
-- 2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
I feel it is too smart, but I can not give a reason to object it :) Just a little worry about in the future check_rebuild will become even more complex..
Acked-by: Dave Young dyoung@redhat.com
Thanks Dave
On 07/05/16 at 11:41am, Pratyush Anand wrote:
If state of a watchdog device is changed by an user after kdumpctl restart then initramfs must be rebuilt on the basis of new watchdog status.
Testing:
Initramfs wdt state Prev Current Result
Not Exist NA X Rebuild Exist Inact Inact No Rebuild Exist Inact Act Force Rebuild Exist Act Inact Force Rebuild Exist Act Act(Same wdt) No Rebuild Exist Act Act(Diff wdt) Force Rebuild
Signed-off-by: Pratyush Anand panand@redhat.com
kdumpctl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
diff --git a/kdumpctl b/kdumpctl index c8fc54fc7677..12e7aa005c5d 100755 --- a/kdumpctl +++ b/kdumpctl @@ -427,6 +427,32 @@ check_dump_fs_modified() return 1 }
+check_wdt_modified() +{
- NOWDT=$(grep ^nowdt $KDUMP_CONFIG_FILE | cut -d' ' -f2)
- [[ -z $NOWDT ]] || return 0
- [[ -d /sys/class/watchdog/ ]] || return 0
- for dir in /sys/class/watchdog/*; do
[[ -d "$dir" ]] || continue
[[ -f "$dir/state" ]] || continue
wdtdrv=$(< "$dir/device/modalias")
wdtdrv=$(modinfo $wdtdrv | grep filename | awk -F"kernel/" '{print $2}')
active=$(< "$dir/state")
# rebuild when:
# module for this watchdog is not found and watchdog is active
# module for this watchdog is found and watchdog is inactive
lsinitrd $TARGET_INITRD | grep $wdtdrv &> /dev/null
if [ $? -ne 0 ]; then
[[ "$active" = "active" ]] && return 1
else
[[ "$active" = "inactive" ]] && return 1
fi
- done
- return 0
+}
# returns 0 if system is not modified # returns 1 if system is modified # returns 2 if system modification is invalid @@ -448,6 +474,12 @@ check_system_modified() return $ret fi
- check_wdt_modified
- if [ $? -ne 0 ]; then
echo "Detected change in watchdog state"
return 1
- fi
- return 0
}
-- 2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
An user can pass "nowdt 1" in kdump.conf if watchdog driver for active watchdog is not needed in kdump initramfs.
Signed-off-by: Pratyush Anand panand@redhat.com --- kdump.conf | 4 ++++ kdump.conf.5 | 5 +++++ kdumpctl | 2 +- mkdumprd | 8 +++++++- 4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/kdump.conf b/kdump.conf index 54b581daf93b..a2ade3097fac 100644 --- a/kdump.conf +++ b/kdump.conf @@ -141,6 +141,9 @@ # - List of cluster node(s) separated by space to send fence_kdump # notification to (this option is mandatory to enable fence_kdump). # +# nowdt <0 | 1> +# - By default, nowdt is false and kdump initrd will contain modules +# for active watchdog
#raw /dev/vg/lv_kdump #ext4 /dev/vg/lv_kdump @@ -158,6 +161,7 @@ core_collector makedumpfile -l --message-level 1 -d 31 #extra_modules gfs2 #default shell #force_rebuild 1 +#nowdt 1 #dracut_args --omit-drivers "cfg80211 snd" --add-drivers "ext2 ext3" #fence_kdump_args -p 7410 -f auto -c 0 -i 10 #fence_kdump_nodes node1 node2 diff --git a/kdump.conf.5 b/kdump.conf.5 index f1c2a2c1d24e..2f9c23e1e232 100644 --- a/kdump.conf.5 +++ b/kdump.conf.5 @@ -199,6 +199,11 @@ List of cluster node(s) separated by space to send fence_kdump notification to (this option is mandatory to enable fence_kdump). .RE
+.B nowdt <0 | 1> +.RS +By default, nowdt is false and kdump initrd will contain modules for active +watchdog. +.RE
.SH DEPRECATED OPTIONS
diff --git a/kdumpctl b/kdumpctl index 12e7aa005c5d..06eb8d6af798 100755 --- a/kdumpctl +++ b/kdumpctl @@ -248,7 +248,7 @@ check_config() case "$config_opt" in #* | "") ;; - raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes) + raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes|nowdt) [ -z "$config_val" ] && { echo "Invalid kdump config value for option $config_opt." return 1; diff --git a/mkdumprd b/mkdumprd index eb0d5e06fac9..f79733c3fd7e 100644 --- a/mkdumprd +++ b/mkdumprd @@ -15,9 +15,15 @@ SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2) [ -z "$SAVE_PATH" ] && SAVE_PATH=$DEFAULT_PATH # strip the duplicated "/" SAVE_PATH=$(echo $SAVE_PATH | tr -s /) +NOWDT=$(grep ^nowdt $conf_file| cut -d' ' -f2) +if [ -z $NOWDT ];then + NOWDT="-a watchdog" +else + NOWDT="-o watchdog" +fi
extra_modules="" -dracut_args=("--hostonly" "-o" "plymouth dash resume ifcfg") +dracut_args=("--hostonly" "-o" "plymouth dash resume ifcfg" $NOWDT) OVERRIDE_RESETTABLE=0
add_dracut_arg() {
On 07/05/16 at 11:41am, Pratyush Anand wrote:
An user can pass "nowdt 1" in kdump.conf if watchdog driver for active watchdog is not needed in kdump initramfs.
Signed-off-by: Pratyush Anand panand@redhat.com
kdump.conf | 4 ++++ kdump.conf.5 | 5 +++++ kdumpctl | 2 +- mkdumprd | 8 +++++++- 4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/kdump.conf b/kdump.conf index 54b581daf93b..a2ade3097fac 100644 --- a/kdump.conf +++ b/kdump.conf @@ -141,6 +141,9 @@ # - List of cluster node(s) separated by space to send fence_kdump # notification to (this option is mandatory to enable fence_kdump). # +# nowdt <0 | 1> +# - By default, nowdt is false and kdump initrd will contain modules +# for active watchdog
#raw /dev/vg/lv_kdump #ext4 /dev/vg/lv_kdump @@ -158,6 +161,7 @@ core_collector makedumpfile -l --message-level 1 -d 31 #extra_modules gfs2 #default shell #force_rebuild 1 +#nowdt 1 #dracut_args --omit-drivers "cfg80211 snd" --add-drivers "ext2 ext3" #fence_kdump_args -p 7410 -f auto -c 0 -i 10 #fence_kdump_nodes node1 node2 diff --git a/kdump.conf.5 b/kdump.conf.5 index f1c2a2c1d24e..2f9c23e1e232 100644 --- a/kdump.conf.5 +++ b/kdump.conf.5 @@ -199,6 +199,11 @@ List of cluster node(s) separated by space to send fence_kdump notification to (this option is mandatory to enable fence_kdump). .RE
+.B nowdt <0 | 1> +.RS +By default, nowdt is false and kdump initrd will contain modules for active +watchdog.
It seems worth more words to explain what is the effect of adding those wdt modules. And this option only covers normal wdt drivers (not special drivers like hp_wdt etc.) In 2nd kernel usually wdt driver will stop the wdt like iTCO_wdt. We only support systemd wdt interface to kick them, etc.
+.RE
.SH DEPRECATED OPTIONS
diff --git a/kdumpctl b/kdumpctl index 12e7aa005c5d..06eb8d6af798 100755 --- a/kdumpctl +++ b/kdumpctl @@ -248,7 +248,7 @@ check_config() case "$config_opt" in #* | "") ;;
raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes)
raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes|nowdt) [ -z "$config_val" ] && { echo "Invalid kdump config value for option $config_opt." return 1;
diff --git a/mkdumprd b/mkdumprd index eb0d5e06fac9..f79733c3fd7e 100644 --- a/mkdumprd +++ b/mkdumprd @@ -15,9 +15,15 @@ SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2) [ -z "$SAVE_PATH" ] && SAVE_PATH=$DEFAULT_PATH # strip the duplicated "/" SAVE_PATH=$(echo $SAVE_PATH | tr -s /) +NOWDT=$(grep ^nowdt $conf_file| cut -d' ' -f2) +if [ -z $NOWDT ];then
- NOWDT="-a watchdog"
+else
- NOWDT="-o watchdog"
+fi
extra_modules="" -dracut_args=("--hostonly" "-o" "plymouth dash resume ifcfg") +dracut_args=("--hostonly" "-o" "plymouth dash resume ifcfg" $NOWDT) OVERRIDE_RESETTABLE=0
add_dracut_arg() {
2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
On Wed, Jul 6, 2016 at 7:27 AM, Dave Young dyoung@redhat.com wrote:
On 07/05/16 at 11:41am, Pratyush Anand wrote:
An user can pass "nowdt 1" in kdump.conf if watchdog driver for active watchdog is not needed in kdump initramfs.
Signed-off-by: Pratyush Anand panand@redhat.com
kdump.conf | 4 ++++ kdump.conf.5 | 5 +++++ kdumpctl | 2 +- mkdumprd | 8 +++++++- 4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/kdump.conf b/kdump.conf index 54b581daf93b..a2ade3097fac 100644 --- a/kdump.conf +++ b/kdump.conf @@ -141,6 +141,9 @@ # - List of cluster node(s) separated by space to send fence_kdump # notification to (this option is mandatory to enable fence_kdump). # +# nowdt <0 | 1> +# - By default, nowdt is false and kdump initrd will contain modules +# for active watchdog
#raw /dev/vg/lv_kdump #ext4 /dev/vg/lv_kdump @@ -158,6 +161,7 @@ core_collector makedumpfile -l --message-level 1 -d 31 #extra_modules gfs2 #default shell #force_rebuild 1 +#nowdt 1 #dracut_args --omit-drivers "cfg80211 snd" --add-drivers "ext2 ext3" #fence_kdump_args -p 7410 -f auto -c 0 -i 10 #fence_kdump_nodes node1 node2 diff --git a/kdump.conf.5 b/kdump.conf.5 index f1c2a2c1d24e..2f9c23e1e232 100644 --- a/kdump.conf.5 +++ b/kdump.conf.5 @@ -199,6 +199,11 @@ List of cluster node(s) separated by space to send fence_kdump notification to (this option is mandatory to enable fence_kdump). .RE
+.B nowdt <0 | 1> +.RS +By default, nowdt is false and kdump initrd will contain modules for active +watchdog.
It seems worth more words to explain what is the effect of adding those wdt modules. And this option only covers normal wdt drivers (not special drivers like hp_wdt etc.) In 2nd kernel usually wdt driver will stop the wdt like iTCO_wdt. We only support systemd wdt interface to kick them, etc.
Thanks for your review comment. Will update with more explanation in V2.
+.RE
.SH DEPRECATED OPTIONS
diff --git a/kdumpctl b/kdumpctl index 12e7aa005c5d..06eb8d6af798 100755 --- a/kdumpctl +++ b/kdumpctl @@ -248,7 +248,7 @@ check_config() case "$config_opt" in #* | "") ;;
raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes)
raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes|nowdt) [ -z "$config_val" ] && { echo "Invalid kdump config value for option $config_opt." return 1;
diff --git a/mkdumprd b/mkdumprd index eb0d5e06fac9..f79733c3fd7e 100644 --- a/mkdumprd +++ b/mkdumprd @@ -15,9 +15,15 @@ SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2) [ -z "$SAVE_PATH" ] && SAVE_PATH=$DEFAULT_PATH # strip the duplicated "/" SAVE_PATH=$(echo $SAVE_PATH | tr -s /) +NOWDT=$(grep ^nowdt $conf_file| cut -d' ' -f2) +if [ -z $NOWDT ];then
NOWDT="-a watchdog"
+else
NOWDT="-o watchdog"
+fi
extra_modules="" -dracut_args=("--hostonly" "-o" "plymouth dash resume ifcfg") +dracut_args=("--hostonly" "-o" "plymouth dash resume ifcfg" $NOWDT) OVERRIDE_RESETTABLE=0
add_dracut_arg() {
2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
~Pratyush
On 07/05/16 at 11:41am, Pratyush Anand wrote:
An user can pass "nowdt 1" in kdump.conf if watchdog driver for active watchdog is not needed in kdump initramfs.
Signed-off-by: Pratyush Anand panand@redhat.com
kdump.conf | 4 ++++ kdump.conf.5 | 5 +++++ kdumpctl | 2 +- mkdumprd | 8 +++++++- 4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/kdump.conf b/kdump.conf index 54b581daf93b..a2ade3097fac 100644 --- a/kdump.conf +++ b/kdump.conf @@ -141,6 +141,9 @@ # - List of cluster node(s) separated by space to send fence_kdump # notification to (this option is mandatory to enable fence_kdump). # +# nowdt <0 | 1> +# - By default, nowdt is false and kdump initrd will contain modules +# for active watchdog
#raw /dev/vg/lv_kdump #ext4 /dev/vg/lv_kdump @@ -158,6 +161,7 @@ core_collector makedumpfile -l --message-level 1 -d 31 #extra_modules gfs2 #default shell #force_rebuild 1 +#nowdt 1 #dracut_args --omit-drivers "cfg80211 snd" --add-drivers "ext2 ext3" #fence_kdump_args -p 7410 -f auto -c 0 -i 10 #fence_kdump_nodes node1 node2 diff --git a/kdump.conf.5 b/kdump.conf.5 index f1c2a2c1d24e..2f9c23e1e232 100644 --- a/kdump.conf.5 +++ b/kdump.conf.5 @@ -199,6 +199,11 @@ List of cluster node(s) separated by space to send fence_kdump notification to (this option is mandatory to enable fence_kdump). .RE
+.B nowdt <0 | 1> +.RS +By default, nowdt is false and kdump initrd will contain modules for active +watchdog. +.RE
.SH DEPRECATED OPTIONS
diff --git a/kdumpctl b/kdumpctl index 12e7aa005c5d..06eb8d6af798 100755 --- a/kdumpctl +++ b/kdumpctl @@ -248,7 +248,7 @@ check_config() case "$config_opt" in #* | "") ;;
raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes)
raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes|nowdt) [ -z "$config_val" ] && { echo "Invalid kdump config value for option $config_opt." return 1;
diff --git a/mkdumprd b/mkdumprd index eb0d5e06fac9..f79733c3fd7e 100644 --- a/mkdumprd +++ b/mkdumprd @@ -15,9 +15,15 @@ SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2) [ -z "$SAVE_PATH" ] && SAVE_PATH=$DEFAULT_PATH # strip the duplicated "/" SAVE_PATH=$(echo $SAVE_PATH | tr -s /) +NOWDT=$(grep ^nowdt $conf_file| cut -d' ' -f2) +if [ -z $NOWDT ];then
- NOWDT="-a watchdog"
+else
- NOWDT="-o watchdog"
+fi
extra_modules="" -dracut_args=("--hostonly" "-o" "plymouth dash resume ifcfg") +dracut_args=("--hostonly" "-o" "plymouth dash resume ifcfg" $NOWDT) OVERRIDE_RESETTABLE=0
add_dracut_arg() {
2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
Now dracut takes care to add module for active watchdog. Therefore we do not need to pass iTCO_wdt and lpc_ich module in rd.driver.pre specifically here.
Signed-off-by: Pratyush Anand panand@redhat.com --- dracut-module-setup.sh | 9 --------- 1 file changed, 9 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index ecf7d3faeb66..7854af060dca 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -721,12 +721,3 @@ install() { # at some point of time. kdump_check_iscsi_targets } - -installkernel() { - wdt=$(lsmod|cut -f1 -d' '|grep "wdt$") - if [ -n "$wdt" ]; then - [ "$wdt" = "iTCO_wdt" ] && instmods lpc_ich && - echo "rd.driver.pre=lpc_ich,iTCO_wdt " >> ${initdir}/etc/cmdline.d/00-wdt.conf - instmods $wdt - fi -}
On 07/05/16 at 11:41am, Pratyush Anand wrote:
Now dracut takes care to add module for active watchdog. Therefore we do not need to pass iTCO_wdt and lpc_ich module in rd.driver.pre specifically here.
Signed-off-by: Pratyush Anand panand@redhat.com
dracut-module-setup.sh | 9 --------- 1 file changed, 9 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index ecf7d3faeb66..7854af060dca 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -721,12 +721,3 @@ install() { # at some point of time. kdump_check_iscsi_targets }
-installkernel() {
- wdt=$(lsmod|cut -f1 -d' '|grep "wdt$")
- if [ -n "$wdt" ]; then
[ "$wdt" = "iTCO_wdt" ] && instmods lpc_ich &&
echo "rd.driver.pre=lpc_ich,iTCO_wdt " >> ${initdir}/etc/cmdline.d/00-wdt.conf
instmods $wdt
- fi
-}
2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
Acked-by: Dave Young dyoung@redhat.com
Thanks Dave
Add notes in kdumpctl man page with limitations of kdump when used in conjunction with watchdog.
Signed-off-by: Pratyush Anand panand@redhat.com --- kdumpctl.8 | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/kdumpctl.8 b/kdumpctl.8 index b446b81bc37a..713342700b17 100644 --- a/kdumpctl.8 +++ b/kdumpctl.8 @@ -16,6 +16,15 @@ to start / stop / enable kdump service instead. However, .B kdumpctl provides more details for debug and a helper to setup ssh key authentication.
+.SH NOTES +If a watchdog has been activated manually or by any daemon after kdump +service start, then user must restart kdump service in order to rebuild +kdump initrd with active watchdog module. +If a custom application and not systemd daemon is used to activate and kick +watchdog then, it is user's responsibility to pass name of the application +in /etc/kdump.conf:extra_bins and the watchdog kick command in +/etc/kdump.conf:kdump_pre. + .SH COMMANDS .TP .I start
On 07/05/16 at 11:41am, Pratyush Anand wrote:
Add notes in kdumpctl man page with limitations of kdump when used in conjunction with watchdog.
Signed-off-by: Pratyush Anand panand@redhat.com
kdumpctl.8 | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/kdumpctl.8 b/kdumpctl.8 index b446b81bc37a..713342700b17 100644 --- a/kdumpctl.8 +++ b/kdumpctl.8 @@ -16,6 +16,15 @@ to start / stop / enable kdump service instead. However, .B kdumpctl provides more details for debug and a helper to setup ssh key authentication.
+.SH NOTES +If a watchdog has been activated manually or by any daemon after kdump +service start, then user must restart kdump service in order to rebuild +kdump initrd with active watchdog module. +If a custom application and not systemd daemon is used to activate and kick +watchdog then, it is user's responsibility to pass name of the application +in /etc/kdump.conf:extra_bins and the watchdog kick command in +/etc/kdump.conf:kdump_pre.
Maybe this is not necessary to be covered in kdumpctl manpage. Declare that we only support systemd wdt interface somewhere should be enough.
Systemd wdt will always run before kdump service?
.SH COMMANDS .TP .I start -- 2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
Thanks Dave
On 07/05/16 at 11:41am, Pratyush Anand wrote:
Add notes in kdumpctl man page with limitations of kdump when used in conjunction with watchdog.
Signed-off-by: Pratyush Anand panand@redhat.com
kdumpctl.8 | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/kdumpctl.8 b/kdumpctl.8 index b446b81bc37a..713342700b17 100644 --- a/kdumpctl.8 +++ b/kdumpctl.8 @@ -16,6 +16,15 @@ to start / stop / enable kdump service instead. However, .B kdumpctl provides more details for debug and a helper to setup ssh key authentication.
+.SH NOTES +If a watchdog has been activated manually or by any daemon after kdump +service start, then user must restart kdump service in order to rebuild +kdump initrd with active watchdog module. +If a custom application and not systemd daemon is used to activate and kick +watchdog then, it is user's responsibility to pass name of the application +in /etc/kdump.conf:extra_bins and the watchdog kick command in +/etc/kdump.conf:kdump_pre.
.SH COMMANDS .TP .I start -- 2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
Fedora dracut version >= 044-75 must be installed to work with this set of kexec-tools patches. Therefore adding dependency for them.
Signed-off-by: Pratyush Anand panand@redhat.com --- kexec-tools.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kexec-tools.spec b/kexec-tools.spec index c74e489b2032..63d9bc9aad19 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -45,7 +45,8 @@ Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units Requires(pre): coreutils sed zlib -Requires: dracut, dracut-network, ethtool +Requires: dracut >= 044-75 +Requires: dracut-network, ethtool BuildRequires: zlib-devel zlib zlib-static elfutils-devel-static glib2-devel bzip2-devel ncurses-devel bison flex lzo-devel snappy-devel BuildRequires: pkgconfig intltool gettext BuildRequires: systemd-units
Hi, Pratyush
On 07/05/16 at 11:41am, Pratyush Anand wrote:
Fedora dracut-044-75 release has all the component needed to support initrd rebuild in case of watchdog state change. Therefore sending these patches for inclusion in kexec-tools.
Please note that these patches should only be added in those fedora versions which has dracut version dracut-044-75 or latter. Anyway, we already have dependency specified in spec file as well.
What if one use these patches for ealier version of dracut? kdumpctl start will fail? Or just wdt does not work.
Pratyush Anand (5): kdumpctl: force rebuild in case of watchdog state change watchdog: Add nowdt argument in kdump.conf watchdog: do not add watchdog module in rd.driver.pre now Watchdog: Add notes for kdumpctl man page spec: Update to add dependency on dracut version >= 044-75
dracut-module-setup.sh | 9 --------- kdump.conf | 4 ++++ kdump.conf.5 | 5 +++++ kdumpctl | 34 +++++++++++++++++++++++++++++++++- kdumpctl.8 | 9 +++++++++ kexec-tools.spec | 3 ++- mkdumprd | 8 +++++++- 7 files changed, 60 insertions(+), 12 deletions(-)
-- 2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
On Wed, Jul 6, 2016 at 6:15 AM, Dave Young dyoung@redhat.com wrote:
Hi, Pratyush
On 07/05/16 at 11:41am, Pratyush Anand wrote:
Fedora dracut-044-75 release has all the component needed to support initrd rebuild in case of watchdog state change. Therefore sending these patches for inclusion in kexec-tools.
Please note that these patches should only be added in those fedora versions which has dracut version dracut-044-75 or latter. Anyway, we already have dependency specified in spec file as well.
What if one use these patches for ealier version of dracut? kdumpctl start will fail? Or just wdt does not work.
kdumpctl start will still work. Old dracut has no install_kernel() function in watchdog module. So it will just not add driver for active watchdog in kdump kernel.
Pratyush Anand (5): kdumpctl: force rebuild in case of watchdog state change watchdog: Add nowdt argument in kdump.conf watchdog: do not add watchdog module in rd.driver.pre now Watchdog: Add notes for kdumpctl man page spec: Update to add dependency on dracut version >= 044-75
dracut-module-setup.sh | 9 --------- kdump.conf | 4 ++++ kdump.conf.5 | 5 +++++ kdumpctl | 34 +++++++++++++++++++++++++++++++++- kdumpctl.8 | 9 +++++++++ kexec-tools.spec | 3 ++- mkdumprd | 8 +++++++- 7 files changed, 60 insertions(+), 12 deletions(-)
-- 2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
~Pratyush
Ccing Don see if he has any comments about these wdt enablement patches.
On 07/05/16 at 11:41am, Pratyush Anand wrote:
Fedora dracut-044-75 release has all the component needed to support initrd rebuild in case of watchdog state change. Therefore sending these patches for inclusion in kexec-tools.
Please note that these patches should only be added in those fedora versions which has dracut version dracut-044-75 or latter. Anyway, we already have dependency specified in spec file as well.
Pratyush Anand (5): kdumpctl: force rebuild in case of watchdog state change watchdog: Add nowdt argument in kdump.conf watchdog: do not add watchdog module in rd.driver.pre now Watchdog: Add notes for kdumpctl man page spec: Update to add dependency on dracut version >= 044-75
dracut-module-setup.sh | 9 --------- kdump.conf | 4 ++++ kdump.conf.5 | 5 +++++ kdumpctl | 34 +++++++++++++++++++++++++++++++++- kdumpctl.8 | 9 +++++++++ kexec-tools.spec | 3 ++- mkdumprd | 8 +++++++- 7 files changed, 60 insertions(+), 12 deletions(-)
-- 2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
On Wed, Jul 06, 2016 at 09:28:15AM +0800, Dave Young wrote:
Ccing Don see if he has any comments about these wdt enablement patches.
Unfortunately, I am not on this mailing list. Pointer to the archive?
Cheers, Don
On 07/05/16 at 11:41am, Pratyush Anand wrote:
Fedora dracut-044-75 release has all the component needed to support initrd rebuild in case of watchdog state change. Therefore sending these patches for inclusion in kexec-tools.
Please note that these patches should only be added in those fedora versions which has dracut version dracut-044-75 or latter. Anyway, we already have dependency specified in spec file as well.
Pratyush Anand (5): kdumpctl: force rebuild in case of watchdog state change watchdog: Add nowdt argument in kdump.conf watchdog: do not add watchdog module in rd.driver.pre now Watchdog: Add notes for kdumpctl man page spec: Update to add dependency on dracut version >= 044-75
dracut-module-setup.sh | 9 --------- kdump.conf | 4 ++++ kdump.conf.5 | 5 +++++ kdumpctl | 34 +++++++++++++++++++++++++++++++++- kdumpctl.8 | 9 +++++++++ kexec-tools.spec | 3 ++- mkdumprd | 8 +++++++- 7 files changed, 60 insertions(+), 12 deletions(-)
-- 2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
On 07/06/16 at 10:26am, Don Zickus wrote:
On Wed, Jul 06, 2016 at 09:28:15AM +0800, Dave Young wrote:
Ccing Don see if he has any comments about these wdt enablement patches.
Unfortunately, I am not on this mailing list. Pointer to the archive?
Don, it is not sorted correctly in a thread, I'm not sure how to get the right threaded link for the archive, anyway will cc you the several patches: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/
If you would like to subscribe, here is a link, but seems Fedora mail list need login with an Fedora account first to subscribe now: https://lists.fedoraproject.org/admin/lists/kexec.lists.fedoraproject.org/
Thanks Dave
Cheers, Don
On 07/05/16 at 11:41am, Pratyush Anand wrote:
Fedora dracut-044-75 release has all the component needed to support initrd rebuild in case of watchdog state change. Therefore sending these patches for inclusion in kexec-tools.
Please note that these patches should only be added in those fedora versions which has dracut version dracut-044-75 or latter. Anyway, we already have dependency specified in spec file as well.
Pratyush Anand (5): kdumpctl: force rebuild in case of watchdog state change watchdog: Add nowdt argument in kdump.conf watchdog: do not add watchdog module in rd.driver.pre now Watchdog: Add notes for kdumpctl man page spec: Update to add dependency on dracut version >= 044-75
dracut-module-setup.sh | 9 --------- kdump.conf | 4 ++++ kdump.conf.5 | 5 +++++ kdumpctl | 34 +++++++++++++++++++++++++++++++++- kdumpctl.8 | 9 +++++++++ kexec-tools.spec | 3 ++- mkdumprd | 8 +++++++- 7 files changed, 60 insertions(+), 12 deletions(-)
-- 2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
On Thu, Jul 07, 2016 at 08:24:00AM +0800, Dave Young wrote:
On 07/06/16 at 10:26am, Don Zickus wrote:
On Wed, Jul 06, 2016 at 09:28:15AM +0800, Dave Young wrote:
Ccing Don see if he has any comments about these wdt enablement patches.
Unfortunately, I am not on this mailing list. Pointer to the archive?
Don, it is not sorted correctly in a thread, I'm not sure how to get the right threaded link for the archive, anyway will cc you the several patches: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/
If you would like to subscribe, here is a link, but seems Fedora mail list need login with an Fedora account first to subscribe now: https://lists.fedoraproject.org/admin/lists/kexec.lists.fedoraproject.org/
Thanks for the patches. I don't see any issues. Everything makes sense. The first patch is the bulk of the work. I haven't convinced myself all the cases are covered, but you can find/fix the corner cases later. For example, I was wondering what happens if a wd module is already accidentally added to dracut, then it doesn't get rebuilt (but maybe it doesn't matter??).
I will assume that a new kexec-tools update will force a rebuild to properly pick up the new dracut -a/o watchdog option (this gets rid of the silly initial conversion corner cases)?
Nice work! Good to finally see this. :-)
Cheers, Don
Thanks Dave
Cheers, Don
On 07/05/16 at 11:41am, Pratyush Anand wrote:
Fedora dracut-044-75 release has all the component needed to support initrd rebuild in case of watchdog state change. Therefore sending these patches for inclusion in kexec-tools.
Please note that these patches should only be added in those fedora versions which has dracut version dracut-044-75 or latter. Anyway, we already have dependency specified in spec file as well.
Pratyush Anand (5): kdumpctl: force rebuild in case of watchdog state change watchdog: Add nowdt argument in kdump.conf watchdog: do not add watchdog module in rd.driver.pre now Watchdog: Add notes for kdumpctl man page spec: Update to add dependency on dracut version >= 044-75
dracut-module-setup.sh | 9 --------- kdump.conf | 4 ++++ kdump.conf.5 | 5 +++++ kdumpctl | 34 +++++++++++++++++++++++++++++++++- kdumpctl.8 | 9 +++++++++ kexec-tools.spec | 3 ++- mkdumprd | 8 +++++++- 7 files changed, 60 insertions(+), 12 deletions(-)
-- 2.5.5 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org