On 14.07.2016 12:15, Pratyush Anand wrote:
Hi Dave,
On 14/07/2016:04:56:20 PM, Dave Young wrote:
Hi, Pratyush
On 07/14/16 at 02:05pm, Pratyush Anand wrote:
If dracut watchdog module is enabled then, it includes kernel watchdog module of active watchdog device in initramfs.
kdump.conf has an option to modify dracut_args. So, if an user passes "-a watchdog" in dracut_args then dracut will add kernel watchdog module of active watchdog device in initramfs.
Since, kexec-tools always requires to add kernel watchdog module of active watchdog device in initramfs, therefore even when an user does not pass any watchdog option then also kexec-tools adds "-a watchdog" in dracut args.
Therefore, if an user does not want to add kernel watchdog module in initramfs then he/she must pass "-o watchdog" in dracut_args.
Signed-off-by: Pratyush Anand panand@redhat.com
kdump-lib.sh | 24 ++++++++++++++++++++++++ mkdumprd | 5 ++++- 2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 141a5614f1d5..4567a05edbbe 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -382,3 +382,27 @@ get_ifcfg_filename() {
echo -n "${ifcfg_file}"}
+# returns 0 when omission of watchdog module is desired in dracut_args +# returns 1 otherwise +is_wdt_mod_omitted() {
- local dracut_args
- local ret=1
- dracut_args=$(grep "^dracut_args" /etc/kdump.conf)
- [[ -z $dracut_args ]] && return $ret
- eval set -- $dracut_args
- while :; do
[[ -z $1 ]] && breakcase $1 in-o|--omit)echo $2 | grep -qw "watchdog"[[ $? == 0 ]] && ret=0breakesacshift- done
- return $ret
+} diff --git a/mkdumprd b/mkdumprd index eb0d5e06fac9..77b52b744653 100644 --- a/mkdumprd +++ b/mkdumprd @@ -16,8 +16,11 @@ SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2) # strip the duplicated "/" SAVE_PATH=$(echo $SAVE_PATH | tr -s /)
+is_wdt_mod_omitted +[[ $? -eq 1 ]] && WDTCFG="-a watchdog"
extra_modules="" -dracut_args=("--hostonly" "-o" "plymouth dash resume ifcfg") +dracut_args=("--hostonly" "-o" "plymouth dash resume ifcfg" $WDTCFG)
The new version overall looks good, but before ack the series I still would like to know something about the dracut module:
In the install() function:
if ! dracut_module_included "systemd"; then[snip..] fi inst_hook emergency 02 "$moddir/watchdog-stop.sh" inst_multiple -o wdctl
All the hooks are installed only for !systemd case, but why leave the emergency hook and the wdctl tool out of the if ... fi?
Do we have some special concern?
I'm asking this because watchdog is added as long as there's no omiting in dracut_args without checking if wdt is active or not, so we will always add the wdctl and watchdog-stop.sh.
Yep, they should not be. It was not in my patch which got merged, see:
http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=89da227de991ef3...
But, then Harald changed it in his rewrite patch and I could not notice this change. http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=74e2d1e69f5527a...
@Harald, Is there any special concern for having wdctl and watchdog-stop.sh even when we have systemd. My understanding is that systemd watchdog daemon and wdctl are mutually exclusive. Please correct if I am wrong.
~Pratyush
In the emergency case, we want the watchdog to be stopped. wdctl might want to be used here and there, so I didn't exclude it.
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
Thanks Dave