On 09/23/13 at 02:55pm, Vivek Goyal wrote:
On Fri, Aug 16, 2013 at 11:04:10AM +0800, WANG Chao wrote:
> On 08/15/13 at 11:25am, Vivek Goyal wrote:
> > On Thu, Aug 15, 2013 at 03:42:27PM +0800, WANG Chao wrote:
> > > Now kdump.service runs "After" network.target. But
network.target
> > > doesn't mean network is setup and online[1]. We should use
> > > network-online.target instead for ssh/nfs dump.
> > >
> > > And also because nfs dump requires a mounted nfs when rebuilding kdump
> > > initrd, kdump.service should also run "After" remote-fs.target
(this
> > > means all remote fs configured in /etc/fstab is mounted).
> > >
> > > 1.
http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
> > >
> > > Signed-off-by: WANG Chao <chaowang(a)redhat.com>
> >
> > I think this dependency might create some issues. What if kdump.conf is
> > not dumping to an nfs/ssh target. What if there is a configuration issue
> > and a network interface is not coming up. Does that mean kdump service
> > will not run at all in that case?
>
> Kdump will run, because kdump don't "Wants" or "Requires"
> these service/target (ie, kdump won't pull in them if they're disabled).
>
> "After" means if kdump will try to run after these services/target, but
> if these services/target aren't enabled or pulled in by other service
> ("Requires" or "Wants"). Kdump service will simply ignore the
disabled
> ones and run after the enabled ones.
Ok, so assume on a system there are some nfs mounted targets. But we
are not dumping to those nfs targets and we are dumping to local rootfs
instead. What will happen in that case? (I am assuming that somebody
has enabled NetworkManager-wait-online.service which will in turn enable
network-online.target.
IOW, we need to run after network-online.target only if we are dumping
to a device which is behind network. Otherwise we could run earlier as
we don't depend on network in this case. And I am worried about the case
if network does not come up and network interfaces don't get ip address.
Will we hang for a long time.
What your concern in your last email is a different problem. I thought
about it months ago, but I couldn't come up with a decent solution.
I'm happy you bring it up, I file a bz:
https://bugzilla.redhat.com/show_bug.cgi?id=1011329
kdump service splits to services of local dump and network dump
One way coming to my mind is to provide two services, say
kdump-local.service and kdump-network.service. During kexec-tools
installation, we run `ln -sf kdump-local.service kdump.service` by
default first.
When we run 'systemctl restart kdump.service' after dump target is
changed to network, kdumpctl can run `ln -sf kdump-network.service
kdump.service`
I'm not a fan of this approach or similar ones which letting
/usr/bin/kdumpctl manipulate a unit file under /usr/lib/systemd/system/.
Do you have any idea?
Finally, let's go back to original issue. I think for the time being, we
could live with the fact that kdump will start after network is ok. Do
you have any other concerns?
Thanks
WANG Chao