From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev+bounces-53984-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 372F81381F4
	for <garchives@archives.gentoo.org>; Sun, 12 Aug 2012 13:35:32 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 29584E0602;
	Sun, 12 Aug 2012 13:35:13 +0000 (UTC)
Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53])
	by pigeon.gentoo.org (Postfix) with ESMTP id C5B08E05EB
	for <gentoo-dev@lists.gentoo.org>; Sun, 12 Aug 2012 13:34:07 +0000 (UTC)
Received: by eekc4 with SMTP id c4so728256eek.40
        for <gentoo-dev@lists.gentoo.org>; Sun, 12 Aug 2012 06:34:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=message-id:date:from:user-agent:mime-version:to:cc:subject
         :references:in-reply-to:content-type:content-transfer-encoding;
        bh=exXWytgZj1kPM7UAwcopkFOaTTYuhYgE3emuE6L1xK4=;
        b=PHs247g50aarcYduBpvjtIzWp2v8Z9c95GKKwNpmJZEodrk8cbugyP9hJtex2TMBx0
         x7215YLScsDDlkAv3PGGewYiWw2twK2VsB2CShtGS/PRAh4vT1lpti23TBDUWJvMaITl
         HbSyudVY6FjMMvMiayr8vLif/N4MkQ7iHv+ArLk7a0oN9Mz6gknjNhwhAHsBuAiaSocb
         XTp2ZZ34JI1W+RY9mofIEplBolL8mnVvFg6yP7+vWllNam7IpL8BH2cCNpdGaRhX/Iyu
         o948O0TDyCJBRs0fY8m7TKL4RZTAwrRUZlXvlpJvsVNTJ0zXwBRAsZ+AxFheGDlIUF8A
         wx/w==
Received: by 10.14.179.71 with SMTP id g47mr10287915eem.21.1344778446953;
        Sun, 12 Aug 2012 06:34:06 -0700 (PDT)
Received: from ?IPv6:2001:1418:211::2:18? ([2001:1418:211::2:18])
        by mx.google.com with ESMTPS id u8sm11311815eel.11.2012.08.12.06.34.05
        (version=SSLv3 cipher=OTHER);
        Sun, 12 Aug 2012 06:34:06 -0700 (PDT)
Message-ID: <5027B0CC.3070703@gmail.com>
Date: Sun, 12 Aug 2012 15:34:04 +0200
From: "vivo75@gmail.com" <vivo75@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120809 Thunderbird/10.0.6
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
MIME-Version: 1.0
To: gentoo-dev@lists.gentoo.org
CC: Duncan <1i5t5.duncan@cox.net>
Subject: Re: [gentoo-dev] Re: Questions about SystemD and OpenRC
References: <CACR_K2tKrkCBmsbBXen-Fqx3JYjpWq-qYGCHxEv6C4B9zh1t2Q@mail.gmail.com> <5026EAE7.4040600@gmail.com> <20120812001239.27781.qmail@stuge.se> <pan.2012.08.12.09.43.27@cox.net>
In-Reply-To: <pan.2012.08.12.09.43.27@cox.net>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Archives-Salt: e2b71a9f-9e63-46b1-ae6e-55c958e936cf
X-Archives-Hash: e54b8028ddc23fa7a707599e3a5d08d8

Il 12/08/2012 11:43, Duncan ha scritto:
> Peter Stuge posted on Sun, 12 Aug 2012 02:12:38 +0200 as excerpted:
>
>> vivo75@gmail.com wrote:
>>> First problem udev/SD has is that it can't see all the file system
>>> labels, for some reason it only see sda and sdb so it's able to partly
>>> proceed in the boot sequence, mount / (root) but can't mount anything
>>> else.
>> What software parses the filesystem labels when you boot with openrc?
>>
>> (I ask because I never use labels myself.)
> Short answer, mount and udev, and the kernel directly when fed that
> information for root= on the kernel commandline.  Openrc has basically
> nothing to do with it.  As such, I don't know what systemd's doing, but
> if it indeed is a systemd bug, it's obviously doing /something/ rather
> different... probably interacting in some unpredicted way with udev now
> that they're integrating it.

exactly my bet, since openrc with the _same_ (not recompiled) udev does work

>
> Slightly more detail, quoting the mount (8) manpage:
>
> It is possible to indicate a block special device using its volume LABEL
> or UUID (see the -L and -U options below).
>
> The recommended setup is to use LABEL=<label>  or UUID=<uuid>  tags rather
> than /dev/disk/by-{label,uuid} udev symlinks in the /etc/fstab file.
> The tags are more readable, robust and portable. The mount(8) command
> internally uses udev symlinks, so use the symlinks in /etc/fstab has no
> advantage over LABEL=/UUID=. For more details see libblkid(3).
>
> Note that mount(8) uses UUIDs as strings. The UUIDs from command line or
> fstab(5) are not converted to internal binary representation. The string
> representation of the UUID should be based on lower case characters.
>
> <<<<<
>
> The implication of the "as strings, not converted to binary" in the last
> paragraph is that mount's simply doing a dumb string match against the
> appropriate /dev/disk/by-* symlink names and dereferencing the symlink
> after which it can proceed as usual if there's a match.  It's udev (and
> thus now systemd, since they're combining) that's actually doing the
> work, exposing the /dev/disk/by-* symlinks with the correct references.
>
> As such, mount basically supports anything found in that location,
> including device hardware ID (combined with partition number where
> appropriate, listed in /dev/disk/by-id), the already mentioned filesystem
> LABEL (/dev/disk/by-label), PARTLABEL (GPT partitions have a partition
> label that's similar in function to the filesystem label, but set at gdisk
> time, not mkfs time, obviously this doesn't apply to legacy MBR
> partitioning), PARTUID, PATH (bus path, tho like traditional /dev/[hs]dX,
> this can be dynamic and the bus paths are longer and more obtuse for
> humans so there's generally little practical use for this one), and (as
> the manpage mentions, partition) UUID.
>
> It is however worth noting that PARTLABEL at least is new enough that at
> least as of a couple months ago when I looked at it for my md/raid setup,
> while udev passed thru the PARTLABEL for physical devices, it was NOT
> doing so for partitioned md/raid devices.  (That mobo died and I don't
> have md/raid on the new system so I can't verify current kernel 3.6-rc1+
> and udev-187-r3 PARTLABEL-on-md/raid behavior.)  So while people could
> setup their md/raid gpt partitions with partition-labels using gptfdisk
> (aka gdisk) or whatever, and I did so, only the ones on the physical
> disks showed up in udev, and at the time I was looking at it, I was
> running md/raid on virtually everything, so the feature was about useless
> for me.
>
> But that does mean that if mdev or whatever creates similar /dev/disk/by-
> *, that mount and friends should use it just as they would with udev,
> since all they're doing is a dumb string match and symlink deref.
>
> It'a also worth noting that the kernel's root= line can take a number of
> these (I'm not sure if it can take them all), including partlabel,
> according to information someone posted on the btrfs list (which I was
> following at the time, before I decided btrfs was too unstable still and
> that I'd wait until next year to try again).  I was going to try it, but
> lost interest when I found I couldn't use it with fstab for my mdraid-
> based gpt partitions anyway.  So all I can say is that it was reported to
> work on the btrfs list, and no one contradicted it, so...
>
>>> a) SD does not re-calculate it's deptree/services when exiting from
>>> rescue shell, it still try to start the "virtual" services as fstab
>>> would have never modified, a reboot is needed
>> systemctl --system daemon-reload ?
> I've not tried systemd yet nor have I yet researched it (I have the
> research vaguely scheduled for next year, sometime), but thanks to both
> of you for these details.  Based on past experience, I expect I'm
> collecting the pieces even tho I don't have context to assemble them in,
> but as a result, when I /do/ research it and get that context, the pieces
> I already have thanks to discussions like this, will fall into place, and
> it'll be far easier to get upto speed than it would have been had I tried
> going into it "cold turkey".
>
> So while I could guess, I'll just shutup and listen for this part.

seem possible, when bug this bug will be fixed, honestly, I've not tried 
that, also because the bigger delay was added by a timeout not a reboot 
(that take 10 seconds)
https://bugzilla.redhat.com/show_bug.cgi?id=815727
unless we discover that virtual services are too complex to manage and 
SD will always be bugged by similar stuff. Time will tell

>
>> I just work with the files on disk. The only time I use tools is if
>> systemd is running and needs to get told about updates. I don't think
>> there are any files that are not plain text, so I don't think any tools
>> are actually required.
> Useful to know. =:^)

All the virtual services don't have a corresponding file on disk, except 
for the radix say ManageDisk@.device which get multiplexed automatically 
(similar to some openrc services does with symlinks, think at net.eth0).
Having those materialized would be of great help in debugging

>
>> If there's a way to boot into a shell prompt, even if it is just bash
>> running as pid 1, then any system can be fixed. It requires knowing a
>> lot about how the system works though, so a lot about systemd if the
>> system uses systemd. Ie. knowing what files to change how in order to
>> accomplish desired results.
> FWIW, I actually have a set of grub2 menu entries with init=/bin/bash,
> for troubleshooting. =:^)
>
> But I think his point (valid or not) was that systemd's closing this
> avenue off as it's simply too monolithic to get information out of or to
> trial-start individual services even when not run as init, as is possible
> with openrc, for instance.
>
> With openrc, if you boot with init=/bin/bash, then try to start an openrc
> initscript, it'll protest that it's not init and that results may not be
> as intended due to lack of dependency tracking, etc, but it'll let you
> override and try anyway, you just have to manage the service deps
> manually or deal with the fallout if you screw it up.
>
> He appears to be saying that this doesn't work with systemd.  If it's not
> init, it refuses to do /anything/ with its unit-file initscript
> substitutes.  That /does/ sound like just the sort of complaint (of
> serveral) I've seen about systemd, but is it accurate?
>
> If it is, then yes, booting to init=/bin/bash (or from live-rescue media)
> and troubleshooting systemd problems from there *IS* going to be more
> difficult than doing the same thing from openrc, because openrc has the
> ability to override and one-off, while if this is correct, openrc doesn't.
correct, with an addition, even if things are fixable complexity _does_ 
matter, over a certain point of resources needed it really became "too 
difficult" == "unfixable".
Near enough example to this discussion was the initrd used some years 
ago from redhat (before dracut), it was simply plain unmodifiable in 
human time, and this doing something _much_ simpler than SD.
>
>> I don't understand this at all. Even if we go with what you write, then
>> I expect that some providers will start to offer an ecosystem of
>> systemd-optimized experiences for those who want it - but I do not
>> believe for a second that those would somehow be exclusive to other
>> systems.
> In all these systemd threads, someone posted a link to gregkh's take on
> gentoo as posted on google+.  In the comments that followed, Ted T'so and
> Kay S. had a rather interesting ping-pong in which one of them mentioned
> the concern that Red Hat and an init implementor for them had about all
> of this at the enterprise level.  For those interested in such things,
> it's worth going back and looking at that if you skipped it (either find
> the link here or just go back and look at gregkh's G+ from ~April).  I
> knew there were enterprise implications, but that was the first time I
> realized that RH wasn't necessarily 100% onboard with the full systemd
> thing, addressing it "upstream" since AFAIK Lennart is a RH employee as
> well.
>
>  From that, it looks like they're more or less waiting for things to
> settle down as well, and they plan on some perhaps major patches being
> necessary for the first few RH releases with systemd.  Of course, even
> assuming those patches eventually make it upstream, Red Hat's release
> cycle is long enough and their paying customers generally conservative
> enough, that it may be some time before they actually have to worry about
> supporting systemd in a deployed release.
>
> And of course, Ubuntu's continuing to stick to upstart for the time
> being, AFAIK.  And CentOS and ScientificLinux being RH offshoots, they'll
> follow RH.
>
> In practice, I think that means that remote-hosted servers shouldn't have
> to worry about systemd issues for another couple years, anyway, gentoo or
> not.  Of course if they run fedora, it might be a problem rather sooner.
> But people running fedora should be used to dealing with such leading
> edge issues, so no big deal for them either, really.
permit me to be worried anyway, systemd seem to going the "mutually 
exclusive" route, while enterprise customers benefit from backporting of 
fixes and rarely new versions added, gentoo does not.
>
> And given enterprise support terms, I guess we're looking at something
> approaching a decade before folks are actually FORCED to systemd, by
> falling off the end of the support train.
>
> Meanwhile, that gives plenty of time for other "entrprisish" parties to
> wait for redhat to decide what it's doing, then come up with their own
> solutions once a bit more about the ultimate target is known.  And until
> then, except for those choosing to run fedora or the like, the existing
> live-media-style remote rescue solutions should continue to work as they
> have.
>
> And in particular for gentoo users with remote hosts to worry about,
> since it's already clear that for at least the near term (say a year or
> two), gentoo's going to continue to default to openrc, there shouldn't be
> a problem for at least /that/ long.  And by the time any such problem
> /were/ to appear, it's very likely that solutions for it will be
> available as well... or given the day jobs of various gentoo devs,
> there'd certainly be sufficient interest in continuing systemd-
> alternative gentoo support, since they have similar issues themselves.
>
hopefully