Good point, will update the patch.

On Fri, Aug 10, 2018 at 12:02 PM Dave Young <dyoung@redhat.com> wrote:
On 08/10/18 at 11:08am, Kairui Song wrote:
> Hi Dave,
>
> That nofail used for rootflag, we don't always require root to be ready,
> like when dumping to a network a target or raw target.
> But when fstab is used, and we are dumping to an fs target, the target has
> to be ready before kdump.sh is called.
>
> nofail flag was first introduced in 7c48f71 to avoid sysroot.mount failure
> blocks kdump script, and in that commit nofail was added to fstab entries
> too. But later c7ed468 removed the nofail in fstab due to the same problem
> this patch is trying to solve, kdump.sh got called before target is ready.

When nofail root flags was added we still can not remove root
dependency, even if dumping to network dracut still mount sysroot.  But
now we only mount root when necessary, for example use root fs as a dump
target.  So in current situation if mounting root then root is a must so
I think we can drop that flag.

>
> I think we could just keep the nofail for rootflags.
>
> On Fri, Aug 10, 2018 at 10:13 AM Dave Young <dyoung@redhat.com> wrote:
>
> > Hi Kairui,
> > On 08/09/18 at 01:27pm, Kairui Song wrote:
> > > If nofail or nobootwait option is used, systemd's local-fs.target won't
> > > wait for the mounting to complete, and kdump might start before the
> > > required mount point is ready and then fail.
> > >
> > > The host might use nofail for reasons like the device may get unpluged,
> > > and if the device is not mounted and it is set as kdump target as the
> > same
> > > time then kdump service won't start, we will never enter the capture
> > > kernel. By the time we have entered the capture kernel, the target device
> > > must exist and ready to use, or else kdump would fail anyway. So force
> > > remove nofail and nobootwait option.
> > >
> > > Signed-off-by: Kairui Song <kasong@redhat.com>
> > > ---
> > >  mkdumprd | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/mkdumprd b/mkdumprd
> > > index 3d89a80..078f988 100644
> > > --- a/mkdumprd
> > > +++ b/mkdumprd
> > > @@ -104,6 +104,9 @@ to_mount() {
> > >      _options=$(echo $_options | sed 's/\bnoauto\b//')
> > >      #mount fs target as rw in 2nd kernel
> > >      _options=$(echo $_options | sed 's/\bro\b/rw/')
> > > +    # drop nofail or nobootwait
> > > +    _options=$(echo $_options | sed 's/\bnofail\b//')
> > > +    _options=$(echo $_options | sed 's/\bnobootwait\b//')
> > >
> > >      _mntopts="$_target $_fstype $_options"
> > >      #for non-nfs _dev converting to use udev persistent name
> >
> > For some reason we added "nofail" in /etc/sysconfig/kdump, see
> > kdump.sysconfig.$(uname -m) in git tree.  But maybe we do not need it
> > anymore,  can you check it, if not needed, remove from sysconfig as well
> > in this patch?
> >
> > Thanks
> > Dave
> >
>
>
> --
> Best Regards,
> Kairui Song

Thanks
Dave


--
Best Regards,
Kairui Song