Hi, Pratyush
Ccing people who may be intrested in the issue..
I will read and comment about the code details after I finished reading the details, but I would like to first comment about things in my mind.
On 02/02/16 at 10:58am, Pratyush Anand wrote:
There could be some dynamic system modification, which may affect kdump kernel boot process. For example, if status of a watchdog device is changed by an user then initramfs must be rebuilt on the basis of new watchdog status.
This patch adds a path to check such dynamic system modifications. While doing that, it also adds a checker for watchdog status modification.
It still only checks when kdump service restart, one need manually restart kdump service or it will be run at next reboot. User need be aware of wdt setup influent kdump service. Maybe we should document it explictly and tell user kdump is adding wdt.
Or we should introduce a way to automatilly detect the change, not sure how to do it and if it is worth..
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 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
diff --git a/kdumpctl b/kdumpctl index 9f7e56b1a524..58d6ccf4b90d 100755 --- a/kdumpctl +++ b/kdumpctl @@ -322,6 +322,27 @@ setup_target_initrd() fi }
+is_wdt_modified() +{
- [ -f $TARGET_INITRD ] || return 0
- wdtcmdline=$(get_wdt_cmdline)
- if [ "$?" = "0" ];then
lsinitrd -f etc/cmdline.d/00-wdt.conf $TARGET_INITRD | grep $wdtcmdline &> /dev/null- else
[ "$(lsinitrd -f etc/cmdline.d/00-wdt.conf $TARGET_INITRD)" = "" ]- fi
- return $?
+}
+is_system_modified() +{
- is_wdt_modified || return 1
- return 0
+}
check_rebuild() { local extra_modules modified_files="" @@ -383,6 +404,8 @@ check_rebuild() fi done
- is_system_modified || force_rebuild="1"
- #check if target initrd has fadump support if [ "$DEFAULT_DUMP_MODE" = "fadump" ] && [ -f "$TARGET_INITRD" ]; then initramfs_has_fadump=`lsinitrd -m $TARGET_INITRD | grep ^kdumpbase$ | wc -l`
-- 2.5.0 _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org http://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org
Thanks Dave