All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rajnoha <prajnoha@redhat.com>
To: lvm-devel@redhat.com
Subject: master - systemd: depend on systemd-udev-settle unit in activation unit
Date: Wed, 12 Sep 2012 13:35:53 +0200	[thread overview]
Message-ID: <50507399.3010100@redhat.com> (raw)
In-Reply-To: <50506DDA.10703@redhat.com>

On 09/12/2012 01:11 PM, Zdenek Kabelac wrote:
>> diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c
>> index 9fcee20..786d795 100644
>> --- a/scripts/lvm2_activation_generator_systemd_red_hat.c
>> +++ b/scripts/lvm2_activation_generator_systemd_red_hat.c
>> @@ -116,12 +116,12 @@ static int generate_unit(const char *dir, int early)
>>             "DefaultDependencies=no\n", f);
>>
>>       if (early)
>> -        fputs("After=fedora-wait-storage.service\n", f);
>> +        fputs("After=systemd-udev-settle.service\n", f);
>>       else
>>           fputs("After=lvm2-activation-early.service cryptsetup.target\n", f);
>>
>>       fputs("Before=local-fs.target shutdown.target\n"
>> -          "Wants=fedora-wait-storage.service\n\n"
>> +          "Wants=systemd-udev-settle.service\n\n"
>>             "[Service]\n"
>>             "ExecStart=/usr/sbin/lvm vgchange -aay --sysinit\n"
>>             "Type=oneshot\n", f);
>>
> 
> 
> I think we need here some backward compatible cross-distro solution.
> 

The fedora-wait-storage.service itself was not quite perfect as
it was only Fedora specific (therefore it's named
lvm2_activation_generator_systemd_red_hat.c, having "red hat" in
its name).

The fedora-wait-storage just called "modprobe scsi_wait_scan" which
is not functional anymore as the module is gone now in recent kernels.

The dependency on systemd-udev-settle is far better and more
cross-distro solution as we're actually waiting on udev to be settled.

The thing with scsi_wait_scan was only added in the way as
an addendum to udev-settle functionality (as the next unit
that is executed just after udev-settle).

If scsi_wait_scan stayed, then we'd better ask systemd
upstream to include the unit with scsi_wait_scan there
as an official unit distributed with systemd (but I think
they counted with its removal so they did not bother to
include it anymore). I haven't inspected where other
distros called this scsi_wait_scan in their bootup process,
if it was called at all there.

As for Fedora, F17 still uses fedora-wait-storage unit
(having the modprobe scsi_wait_scan call), F18 and higher
still has this unit, but it's failing as the module is not
available anymore (the unit will be be removed soon I guess).

I think that for upstream solution, it's far better to depend
on systemd-udev-settle.service. If there's anything else to
wait for besides udev, it should be included in systemd upstream
as an official and extra unit (so other distros would take that
from systemd upstream when packaging).

Peter



  reply	other threads:[~2012-09-12 11:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12  9:37 master - systemd: depend on systemd-udev-settle unit in activation unit Peter Rajnoha
2012-09-12 11:11 ` Zdenek Kabelac
2012-09-12 11:35   ` Peter Rajnoha [this message]
2012-09-12 15:19     ` Bill Nottingham
2012-09-13  9:05       ` Peter Rajnoha
2012-09-13 18:12         ` Bill Nottingham
2012-09-14  7:14           ` Peter Rajnoha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50507399.3010100@redhat.com \
    --to=prajnoha@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.