* [PATCH v2 0/2] add parameter continue_on_fail
@ 2013-02-18 6:21 Baoquan He
[not found] ` <cover.1361167889.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Baoquan He @ 2013-02-18 6:21 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Cc: dyoung-H+wXaHxf7aLQT0dZR+AlfA, vgoyal-H+wXaHxf7aLQT0dZR+AlfA,
Baoquan He
v1->v2:
Discard previous implementation, take a direct and simpler
method.
By adding pamameter 'continue_on_fail=initqueue|mount_root',
user can decide if continue after these points timeout. And
can extend to other delay or loop point later if needed.
Baoquan He (2):
Add parameter continue_on_fail to make dracut continue after
initqueue timeout
Continue when mount rootfs failed by specifing
'continue_on_fail=mount_root'
dracut.cmdline.7.asc | 3 +++
modules.d/98systemd/dracut-initqueue.sh | 10 ++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] Add parameter continue_on_fail to make dracut continue after initqueue timeout
[not found] ` <cover.1361167889.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-02-18 6:21 ` Baoquan He
2013-02-18 6:21 ` [PATCH v2 2/2] Continue when mount rootfs failed by specifing 'continue_on_fail=mount_root' Baoquan He
2013-02-18 10:29 ` [PATCH v2 0/2] add parameter continue_on_fail Harald Hoyer
2 siblings, 0 replies; 7+ messages in thread
From: Baoquan He @ 2013-02-18 6:21 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Cc: dyoung-H+wXaHxf7aLQT0dZR+AlfA, vgoyal-H+wXaHxf7aLQT0dZR+AlfA,
Baoquan He
In kdump, When the dump device was removed, dracut will drop to shell
during second kernel boot. That means kdump isn't even started. But
in this case, if the target isn't presented, we should dump to a rootfs
device as a default action.
In this patch, add a new parameter continue_on_fail. After initqueue
timeout, detect whether this parameter is specified. If yes,continue.
If not, enter into emergency_shell.
For later extending, user need give timeout point. E.g, use this
parameter like below:
continue_on_fail=initqueue
dracut.cmdline.7.asc: add the relevant description
Signed-off-by: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
dracut.cmdline.7.asc | 3 +++
modules.d/98systemd/dracut-initqueue.sh | 5 ++++-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
index 62372a5..31d2d84 100644
--- a/dracut.cmdline.7.asc
+++ b/dracut.cmdline.7.asc
@@ -121,6 +121,9 @@ Misc
specify the controlling terminal for the console.
This is useful, if you have multiple "console=" arguments.
+**continue_on_fail=**_{initqueue}_::
+ continue after initqueue timeout by specify the timeout point 'initqueue'
+
[[dracutkerneldebug]]
Debug
~~~~~
diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh
index 7de89e9..f889d20 100755
--- a/modules.d/98systemd/dracut-initqueue.sh
+++ b/modules.d/98systemd/dracut-initqueue.sh
@@ -61,7 +61,10 @@ while :; do
fi
main_loop=$(($main_loop+1))
- [ $main_loop -gt $RDRETRY ] && emergency_shell "Could not boot."
+ if [ $main_loop -gt $RDRETRY ]; then
+ getarg 'continue_on_fail=initqueue' && break
+ emergency_shell "Could not boot."
+ fi
done
unset job
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] Continue when mount rootfs failed by specifing 'continue_on_fail=mount_root'
[not found] ` <cover.1361167889.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-18 6:21 ` [PATCH v2 1/2] Add parameter continue_on_fail to make dracut continue after initqueue timeout Baoquan He
@ 2013-02-18 6:21 ` Baoquan He
2013-02-18 10:29 ` [PATCH v2 0/2] add parameter continue_on_fail Harald Hoyer
2 siblings, 0 replies; 7+ messages in thread
From: Baoquan He @ 2013-02-18 6:21 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Cc: dyoung-H+wXaHxf7aLQT0dZR+AlfA, vgoyal-H+wXaHxf7aLQT0dZR+AlfA,
Baoquan He
Dracut will drop into shell in case anything wrong with rootfs mounting,
but for kdump it does not depends on rootfs for non-rootfs dump and
kdump will handle the default fail action based on user configuration
in /etc/kdump.conf.
In this patch, add support to make dracut continue after mount rootfs
timeout by specifing parameter 'continue_on_fail=mount_root'.
dracut.cmdline.7.asc: change descrption related to 'continue_on_fail'
Signed-off-by: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
dracut.cmdline.7.asc | 4 ++--
modules.d/98systemd/dracut-initqueue.sh | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
index 31d2d84..756e734 100644
--- a/dracut.cmdline.7.asc
+++ b/dracut.cmdline.7.asc
@@ -121,8 +121,8 @@ Misc
specify the controlling terminal for the console.
This is useful, if you have multiple "console=" arguments.
-**continue_on_fail=**_{initqueue}_::
- continue after initqueue timeout by specify the timeout point 'initqueue'
+**continue_on_fail=**_{initqueue|mount_root}_::
+ continue after timeout if specify the relevant timeout point
[[dracutkerneldebug]]
Debug
diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh
index f889d20..4fc72ad 100755
--- a/modules.d/98systemd/dracut-initqueue.sh
+++ b/modules.d/98systemd/dracut-initqueue.sh
@@ -99,7 +99,10 @@ while :; do
done
i=$(($i+1))
- [ $i -gt 20 ] && emergency_shell "Can't mount root filesystem"
+ if [ $i -gt 20 ]; then
+ getarg 'continue_on_fail=mount_root' && break
+ emergency_shell "Can't mount root filesystem"
+ fi
done
{
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] add parameter continue_on_fail
[not found] ` <cover.1361167889.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-18 6:21 ` [PATCH v2 1/2] Add parameter continue_on_fail to make dracut continue after initqueue timeout Baoquan He
2013-02-18 6:21 ` [PATCH v2 2/2] Continue when mount rootfs failed by specifing 'continue_on_fail=mount_root' Baoquan He
@ 2013-02-18 10:29 ` Harald Hoyer
[not found] ` <51220277.1010507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2 siblings, 1 reply; 7+ messages in thread
From: Harald Hoyer @ 2013-02-18 10:29 UTC (permalink / raw)
To: Baoquan He
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, dyoung-H+wXaHxf7aLQT0dZR+AlfA,
vgoyal-H+wXaHxf7aLQT0dZR+AlfA
Am 18.02.2013 07:21, schrieb Baoquan He:
> v1->v2:
> Discard previous implementation, take a direct and simpler
> method.
>
> By adding pamameter 'continue_on_fail=initqueue|mount_root',
> user can decide if continue after these points timeout. And
> can extend to other delay or loop point later if needed.
>
> Baoquan He (2):
> Add parameter continue_on_fail to make dracut continue after
> initqueue timeout
> Continue when mount rootfs failed by specifing
> 'continue_on_fail=mount_root'
>
> dracut.cmdline.7.asc | 3 +++
> modules.d/98systemd/dracut-initqueue.sh | 10 ++++++++--
> 2 files changed, 11 insertions(+), 2 deletions(-)
>
> --
> To unsubscribe from this list: send the line "unsubscribe initramfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Why don't you just remove all "finished" scripts and install your own "finished"
checking scripts, when your kdump device is ready?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] add parameter continue_on_fail
[not found] ` <51220277.1010507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-02-19 5:03 ` Baoquan
[not found] ` <51230787.7090706-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-28 3:38 ` Dave Young
1 sibling, 1 reply; 7+ messages in thread
From: Baoquan @ 2013-02-19 5:03 UTC (permalink / raw)
To: Harald Hoyer
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, dyoung-H+wXaHxf7aLQT0dZR+AlfA,
vgoyal-H+wXaHxf7aLQT0dZR+AlfA
On 02/18/2013 06:29 PM, Harald Hoyer wrote:
> Am 18.02.2013 07:21, schrieb Baoquan He:
>> v1->v2:
>> Discard previous implementation, take a direct and simpler
>> method.
>>
>> By adding pamameter 'continue_on_fail=initqueue|mount_root',
>> user can decide if continue after these points timeout. And
>> can extend to other delay or loop point later if needed.
>>
>> Baoquan He (2):
>> Add parameter continue_on_fail to make dracut continue after
>> initqueue timeout
>> Continue when mount rootfs failed by specifing
>> 'continue_on_fail=mount_root'
>>
>> dracut.cmdline.7.asc | 3 +++
>> modules.d/98systemd/dracut-initqueue.sh | 10 ++++++++--
>> 2 files changed, 11 insertions(+), 2 deletions(-)
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe initramfs" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
> Why don't you just remove all "finished" scripts and install your own "finished"
> checking scripts, when your kdump device is ready?
Hi Harald,
Thanks for your comment.
Even though use "finished" scripts method, a parameter as switch to user
is necessary. There are various kdump targets, sometime maybe it's
unnecessary to continue on fail, because kdump target may not be started
in initqueue.
In initqueue, adding parameter and change are because when a specific
device failed to setup, later rootfs can be tried.
E.g For kdump, there can be 2 dump target, one is remote target through
network with higher priority, the other is local rootfs with lower
priority. So in initqueue, even though the network device failed to
setup, we need go ahead to try local rootfs dumping, but not entering
into emergency shell.
Baoquan
Thanks a lot!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] add parameter continue_on_fail
[not found] ` <51230787.7090706-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-02-19 8:02 ` Dave Young
0 siblings, 0 replies; 7+ messages in thread
From: Dave Young @ 2013-02-19 8:02 UTC (permalink / raw)
To: Baoquan
Cc: Harald Hoyer, initramfs-u79uwXL29TY76Z2rM5mHXA,
vgoyal-H+wXaHxf7aLQT0dZR+AlfA
On 02/19/2013 01:03 PM, Baoquan wrote:
> On 02/18/2013 06:29 PM, Harald Hoyer wrote:
>
>> Am 18.02.2013 07:21, schrieb Baoquan He:
>>> v1->v2:
>>> Discard previous implementation, take a direct and simpler
>>> method.
>>>
>>> By adding pamameter 'continue_on_fail=initqueue|mount_root',
>>> user can decide if continue after these points timeout. And
>>> can extend to other delay or loop point later if needed.
>>>
>>> Baoquan He (2):
>>> Add parameter continue_on_fail to make dracut continue after
>>> initqueue timeout
>>> Continue when mount rootfs failed by specifing
>>> 'continue_on_fail=mount_root'
>>>
>>> dracut.cmdline.7.asc | 3 +++
>>> modules.d/98systemd/dracut-initqueue.sh | 10 ++++++++--
>>> 2 files changed, 11 insertions(+), 2 deletions(-)
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe initramfs" in
>>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>>
>> Why don't you just remove all "finished" scripts and install your own "finished"
>> checking scripts, when your kdump device is ready?
Even if none of kdump devices are ready, kdump still need ignore
previous failure of dracut, so kdump can handle it according to kdump
config options user specified. ie. some customized scripts..
>
> Hi Harald,
>
> Thanks for your comment.
>
> Even though use "finished" scripts method, a parameter as switch to user
> is necessary. There are various kdump targets, sometime maybe it's
> unnecessary to continue on fail, because kdump target may not be started
> in initqueue.
>
> In initqueue, adding parameter and change are because when a specific
> device failed to setup, later rootfs can be tried.
>
> E.g For kdump, there can be 2 dump target, one is remote target through
> network with higher priority, the other is local rootfs with lower
> priority. So in initqueue, even though the network device failed to
> setup, we need go ahead to try local rootfs dumping, but not entering
> into emergency shell.
>
> Baoquan
> Thanks a lot!
>
--
Thanks
Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] add parameter continue_on_fail
[not found] ` <51220277.1010507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-19 5:03 ` Baoquan
@ 2013-02-28 3:38 ` Dave Young
1 sibling, 0 replies; 7+ messages in thread
From: Dave Young @ 2013-02-28 3:38 UTC (permalink / raw)
To: Harald Hoyer
Cc: Baoquan He, initramfs-u79uwXL29TY76Z2rM5mHXA,
vgoyal-H+wXaHxf7aLQT0dZR+AlfA
On 02/18/2013 06:29 PM, Harald Hoyer wrote:
> Am 18.02.2013 07:21, schrieb Baoquan He:
>> v1->v2:
>> Discard previous implementation, take a direct and simpler
>> method.
>>
>> By adding pamameter 'continue_on_fail=initqueue|mount_root',
>> user can decide if continue after these points timeout. And
>> can extend to other delay or loop point later if needed.
>>
>> Baoquan He (2):
>> Add parameter continue_on_fail to make dracut continue after
>> initqueue timeout
>> Continue when mount rootfs failed by specifing
>> 'continue_on_fail=mount_root'
>>
>> dracut.cmdline.7.asc | 3 +++
>> modules.d/98systemd/dracut-initqueue.sh | 10 ++++++++--
>> 2 files changed, 11 insertions(+), 2 deletions(-)
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe initramfs" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
> Why don't you just remove all "finished" scripts and install your own "finished"
> checking scripts, when your kdump device is ready?
Grep emergency_shell usages, I find there's other points which will
break out, like fsck, selinux policy loading etc. It's not only limited
to initqueue...
Baoquan, looks like you only handled initqueue in the patches.
I thought to add a wrapper function like below, then replace all
emergency_shell caller to call failaction instead:
failaction()
{
if rd.failaction=continue;
return
fi
emergency_shell ...
}
I think no need to add "continue_on_fail=initqueue|mount_root", one
global switch is enough, nobody will want this except kdump..
Harald, do you have better solution? If I'm wrong here please correct me.
> --
> To unsubscribe from this list: send the line "unsubscribe initramfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Thanks
Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-02-28 3:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-18 6:21 [PATCH v2 0/2] add parameter continue_on_fail Baoquan He
[not found] ` <cover.1361167889.git.bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-18 6:21 ` [PATCH v2 1/2] Add parameter continue_on_fail to make dracut continue after initqueue timeout Baoquan He
2013-02-18 6:21 ` [PATCH v2 2/2] Continue when mount rootfs failed by specifing 'continue_on_fail=mount_root' Baoquan He
2013-02-18 10:29 ` [PATCH v2 0/2] add parameter continue_on_fail Harald Hoyer
[not found] ` <51220277.1010507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-19 5:03 ` Baoquan
[not found] ` <51230787.7090706-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-19 8:02 ` Dave Young
2013-02-28 3:38 ` Dave Young
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.