|
|
Subscribe / Log in / New account

Jaeger: systemd - and #osc2010

Andreas Jaeger looks at systemd, and the availability of packages in openSUSE Factory. "#osc2010 is the official hash tag for the openSUSE Conference 2010 on twitter - and #osc201 will have also a birds of a feather session on systemd, I invite you to discuss with Lennart [Poettering] and Kay [Sievers] systemd and how to get it running on your system/distribution." Systemd could be a default in openSUSE 11.4, depending on the feedback from testers.

to post comments

How did this guy test systemd exactly?

Posted Oct 9, 2010 7:50 UTC (Sat) by rvfh (guest, #31018) [Link] (35 responses)

It feels like this guy did not read Lennart's blog on systemd.

First, a lot of ideas are borrowed from other projects, and are not novel, such as creating sockets and starting services on connect(). This, as Lennart himself explains, was already present in (at least) inetd, a long time ago.

Second, systemd will really shine if you use systemd config files, not if you drop it in an already-optimised-to-death-for-systemV system.

I really think systemd is neat, and will replace most init systems on Linux (let's see Scott's progress on upstart too). Just give it the right environment to shine!

How did this guy test systemd exactly?

Posted Oct 9, 2010 8:26 UTC (Sat) by paulj (subscriber, #341) [Link] (33 responses)

And once everyone's converted to systemd, then people will realise just how many dependencies are NOT expressed by opening/connecting sockets. And we'll *still* have to continue with the work to update big bits of user-space to generate and pass events to each other (e.g. via DBus), which will obsolete all the work done to make services work nicely with systemd.

Event driven activation is great, but you need to be able to deal in sufficiently expressive events....

How did this guy test systemd exactly?

Posted Oct 9, 2010 13:55 UTC (Sat) by rvfh (guest, #31018) [Link] (1 responses)

I really recommend you read this.

How did this guy test systemd exactly?

Posted Oct 9, 2010 14:46 UTC (Sat) by paulj (subscriber, #341) [Link]

Paul's postulate: Every discussion of systemd will include posts consisting of essentially nothing but a link to Lennart's blog article on systemd.

How did this guy test systemd exactly?

Posted Oct 9, 2010 16:28 UTC (Sat) by drag (guest, #31333) [Link] (15 responses)

In what ways do services in Linux connect to one another other then through Unix sockets?

I mean this is the standard Unix IPC which most others are based off of.

I hope that we do not have a lot of things doing share memory or whatnot. This isn't Windows we are talking about....

How did this guy test systemd exactly?

Posted Oct 9, 2010 17:04 UTC (Sat) by tzafrir (subscriber, #11501) [Link] (2 responses)

How did this guy test systemd exactly?

Posted Oct 9, 2010 17:07 UTC (Sat) by tzafrir (subscriber, #11501) [Link] (1 responses)

And for those lazy folks here who don't want to see yet another confirmation of Paul's postulate:

Systemd does not rely solely on sockets for dependency. It also uses "file system" (service A only starts once directorory /foo/bar is available).

How did this guy test systemd exactly?

Posted Oct 9, 2010 17:18 UTC (Sat) by drag (guest, #31333) [Link]

You could at least put some of the text in your reply besides the link that mentions something that's being talked about.

That way at least it's useful. The blog post is very unstructured.

Are you talking about the autofs support or something?

How did this guy test systemd exactly?

Posted Oct 10, 2010 17:53 UTC (Sun) by paulj (subscriber, #341) [Link] (11 responses)

@drag: Yes, services connect via sockets. But then again, you've missed my point: clients opening a socket is not a very expressive dependency system. There are many kinds of dependencies which simply are not expressible in such a system, except perhaps in quite forced ways.

A trivial one is depending on time having being set. No doubt someone will reply with a link to Lennart's blog, presumably as a way to say "Systemd also has explicit inter-service dependencies", but that's still a pretty limited way of doing things, and quite manual - as the blog entry says. That systemd had to quickly add support for manually configured dependencies rings warning bells to me that the claims about the wide applicability of its socket proxying function and how it makes dependencies "redundant" are suspect.

A more difficult example is depending on location. E.g. if I plug into my home network, I might want to start sharing my files on the network. If I plug in elsewhere, I don't. There are no doubt a plethora of other use-cases like that which all depend on things *OTHER* than sockets - i.e. they depend on *state* (be it the state of the kernel or another application).

I.e. where systemd captures dependencies in applications connecting to each other, it should be clear there are also dependencies that can only really be expressed through *data* being passed (between apps, or kernel and apps). For many years the Linux community has been converging on using a user-space service/subscription bus to allow userspace apps to behave in a more dynamic way wrt discovering and being able to react to changes in state of other applications, by adding support for DBus. DBus can even auto-start processes when applications connect to certain other applications.

In a world where system services were DBus based, as is the trend, you have no need for for anything but a dumb init that starts up the few remaining things that need to be launched in order (as systemd must) and then kicks off DBus. DBus can launch whatever services on-demand as is feasible. DBus can also launch the other services in parallel - being DBus based any need for ordering requirement between such services is by definition a bug in the service (systemd can't say the same - hence why it had to add explicit ordering and completion dependencies). DBus services also make much richer dependencies expressible - ones that are simply impossible with systemd, in any sane way.

So my question, how does systemd fit in, in a world where services have been converging on behaving more dynamically by keeping informed of changes in system state and reacting appropriately? If we're going to accept that we need to put up with some code churn in system services (which implies inevitable regressions) in order to improve how services are started, then why focus it a level in which you *CANT* fix all the problems? Why not focus it on the level where you *can* make it all work?

I just have this disquieting feeling that we're going to have to suffer lots of churn to add support for (yet another new) init system which deliberately ignores portability, only to find out that it leaves many problems unaddressed. Those remaining problems then requiring more churn to make such services dynamic at a higher level - thus rendering the systemd work (and churn) obsolete...

Anyway, not that my opinions or fears count. So I guess I'll just have to strap myself down and hope the ride over next few years isn't as bumpy as I fear.

How did this guy test systemd exactly?

Posted Oct 10, 2010 19:02 UTC (Sun) by oak (guest, #2786) [Link]

> clients opening a socket is not a very expressive dependency system.

It solves a very real issue that Upstart and init scripts have. With those one needs either to have some other program that waits until e.g. X server socket or D-BUS socket is available, or modify X & D-BUS daemon to notify Upstart when they're ready, or use racy timeouts before continuing startup of processes depending on those daemons.

It's much nicer that the init program itself supports that kind of dep handling directly in a race-free manner.

After this you argument that there are many startup issues where socket based dependencies aren't enough and then you state that D-BUS can be used for them. So, what would be the point of starting those things directly from Systemd?

> So my question, how does systemd fit in, in a world where services have been converging on behaving more dynamically by keeping informed of changes in system state and reacting appropriately?

D-BUS cannot / isn't designed to act as system init, something needs to start that and those other things needed at bootup (X etc) which don't support D-BUS.

(Using D-BUS has also it's own downsides if it's used for everything. There are quite a lot of things in its implementation that need to be fixed, like its byzantine memory allocation code. All you need is one client that doesn't read its messages and eventually D-BUS daemon message buffer will take all the memory available in the system...)

How did this guy test systemd exactly?

Posted Oct 10, 2010 19:15 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link]

Autoactivated DBUS services suck. DBUS should use system's startup daemon to start them.

Systemd fits in quite nicely there. Imagine that when DBUS service is activated, systemd captures this and starts a daemon, in its own process group (so it can be killed). Besides, it can track _who_ started the service and kill it when it's required.

How did this guy test systemd exactly?

Posted Oct 10, 2010 21:23 UTC (Sun) by mezcalero (subscriber, #45103) [Link] (8 responses)

Systemd's socket-based activation is a very exciting part of systemd's design, but it's actually just one part, and there's a lot more in it.

As mentioned many times already, systemd's base is actually a dependency based system, on top of which we built the magic socket and bus activation logic. Criticising systemd for the "unexpressiveness" of socket activation goes in the completely wrong direction. In systemd the dependency logic was actually available first, and then we added the socket activation as an important building block on top, to reduce the complexities a strict dependency systemd passes to the admin. And sentences such as "That systemd had to quickly add support for manually configured dependencies..." are completely backwards and are completely misunderstanding what is going on with systemd.

Profile-based activation as you are asking for your location use case is actually trivially doable with systemd: simply create a target unit for each of your locations and hook the services you want to start into them. Then, you can easily switch between the different targets. (And if you wonder what a "target" is in this context, please refer to the docs).

Regarding your comments regarding D-Bus: note that D-Bus tightly integrates with systemd since version 1.3.1 so that we can do bus-based activation. (Oh, and as a matter of fact I am actually something like the maintainer of D-Bus these days -- at least I rolled the two most recent releases; I hope this makes clear that the work on d-bus and systemd is cooperative, not competitive) Solely focussing on bus-based activation is not sufficient to comprehensively cover what is needed for a modern OS. This is why systemd combines socket, bus, device, timer, path and boot based activation (and if you count the base of it all, the explicit dependencies in this context too also dependency-based activation), and then can handle them all in a unified fashion and without races. The latter is actually a much understated problem, since the big majority of our services actually have more than just one trigger, and you hence need to unify the activation queue to avoid duplicate services running.

D-Bus is not a very capable process babysitter. systemd however is. D-Bus only can do bus-based activation. systemd has many more triggers. Which is why we unified process management in systemd, and tightly integrated D-bus with it, and not the other way round.

"DBus services also make much richer dependencies expressible - ones that are simply impossible with systemd, in any sane way." -- this comment is just wrong, as one core feature of systemd is bus-based activation -- what you can do with D-Bus activation is a subset of what you can do with systemd.

So, to answer your question "how does systemd fit in?" -- it fits in perfectly, as it covers the various kinds of activation you asked for just fine, and at its very core.

I am pretty sure we leave some problems unaddressed with systemd, after all we are just human and cannot make everybody happy. But I do believe we actually cover the greatest part of what we need in an init system for Linux. But we are all ears to add whatever is needed, if it makes sense for the general case.

Lennart

How did this guy test systemd exactly?

Posted Oct 10, 2010 22:29 UTC (Sun) by paulj (subscriber, #341) [Link] (4 responses)

Yes, I noticed DBus now can leave activation to systemd. I agree very much with your observations that many applications which try do this get process management wrong, but couldn't this also be fixed with a good library?

Let me finish writing up my other comment...

Thanks for this reply btw, v informative.

How did this guy test systemd exactly?

Posted Oct 11, 2010 7:19 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link] (3 responses)

"Yes, I noticed DBus now can leave activation to systemd. I agree very much with your observations that many applications which try do this get process management wrong, but couldn't this also be fixed with a good library?"

Yes, and it's called systemd.

I was initially skeptical about systemd, but it's really easy and powerful.

How did this guy test systemd exactly?

Posted Oct 11, 2010 7:22 UTC (Mon) by paulj (subscriber, #341) [Link] (2 responses)

A privileged process is not a library.

How did this guy test systemd exactly?

Posted Oct 11, 2010 13:50 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

You aren't going to get away only with a library.

How did this guy test systemd exactly?

Posted Oct 12, 2010 14:58 UTC (Tue) by paulj (subscriber, #341) [Link]

A privileged process is not a library, however a library can be used both by that process and any others (whether they also are adapted to systemd or not).

How did this guy test systemd exactly?

Posted Oct 11, 2010 5:42 UTC (Mon) by paulj (subscriber, #341) [Link] (2 responses)

I don't think targets cover the point I was trying to make. It's not sufficient to simply have different 'profiles' of enabled services. Some running processes might need to change their internal state. To use the file-sharing example, I may have 1 folder I always want shared, another I only share at work, another I only share at home.

Finally, you still need something to change the target. In which case, why not just have the processes involved use a publish/subscribe model? (I.e. DBus services and consumers).

How did this guy test systemd exactly?

Posted Oct 11, 2010 13:27 UTC (Mon) by mezcalero (subscriber, #45103) [Link] (1 responses)

Quite frankly, I am not sure your use case of different profiles is really desirable in the general case. Configuration of such a thing would become very complex without a doubt. I am not sure how the UI for this would look like.

I think systemd's job here is to offer the right building blocks to build what you want, but not necessarily implement it in itself. If you want to add location-based reconfiguration then you can easily build this on top of systemd, there's really no need to do it inside of systemd.

How did this guy test systemd exactly?

Posted Oct 11, 2010 13:33 UTC (Mon) by paulj (subscriber, #341) [Link]

I wasn't asking for this to be supported by systemd. ;)

How did this guy test systemd exactly?

Posted Oct 10, 2010 21:02 UTC (Sun) by mezcalero (subscriber, #45103) [Link] (14 responses)

I don't think you have understood very well what systemd is about. At its base systemd provides a very elaborate dependency system. On top of that we have then added a couple of technologies that create the majority of all dependencies automatically (to the level that normal services will need about zero manually configured dependencies in the end) and hence greatly simplify the complexities a dependency system normally exposes.

Note that "event driven activation" sounds more like a term from Upstart, and doesn't really apply that well to systemd.

Systemd is mostly about parallelized activation, and focusses not only on socket-based activation, but also on bus-based activation, device-based activation, path-based activation and timer-based activation (and of course, activating triggered by booting). Also, it is extensible and additional external triggers can be added.

Summarizing this: I am pretty sure we are pretty good at managing the balancing act of supporting complex dependency systems for the more complex parts of boot-up (such as early initialization and late shutdown), as well as simple services configuration for most normal services.

I know that actually reading documentation before trumpeting out opinions is a lot to ask, but I can only recommend having a look on our quite complete documentation, in this case for example the part about the various forms of activation we offer on top of our dependency system: http://0pointer.de/public/systemd-man/daemon.html (the part about "Activation").

Lennart

How did this guy test systemd exactly?

Posted Oct 10, 2010 22:59 UTC (Sun) by paulj (subscriber, #341) [Link] (13 responses)

FWIW, I don't think it helps to foster the notion that anyone who has any opinion about systemd which doesn't praise it to high heaven must of course have not read the documentation. I have read the blog article several times, good chunks of the comments and some of the documentation posted since (the part you pointed me at is pretty much direct from your blog article). I don't think this helps encourage productive discussions.

I don't think I'm completely ignorant about what systemd is about:

1. Centralise the code for daemon creation and process management, and try get rid of things that do this themselves - often badly.

2. Have systemd to act as a socket proxy, auto-activating the services as required (ala ye olde Unix inetd, or Java rmid, etc). This allows many dependencies to be automatically worked out (static dependencies are made "redundant" is the claim), and so allow parallel launching. Activation is event-driven (see below).

I just noticed that the very latest DBus 1.4.0 now has support for handing off any spawning of services down to systemd - which is nice and addresses some of my concerns about the overlap between the two.

Your objection to events in upstart is that dependencies are propagated as a number of different "events", and it doesn't work. Systemd doesn't use this model for dependencies, however I presume you would still agree activation in systemd is event-driven (i.e. on the event of activity on the proxied fd). Reading service state and subscribing to events for changes in that state is also you wouldn't disagree with (provided you can read the current state and subscribe to new events in a race free manner). The latter is generally what I mean by event-driven, including the possibility where there is no state.

My concerns:

On 1: It's great to factor out and centralise code, but I'm not sure systemd will always be able to handle *all* process management directly. There's all kinds of weird cases people will want to handle, there are all manner of userspace service management thingies out there, from the more obvious ones (*inetd, rmid) to all kinds of custom ones. You can try generalise and handle most of them, but likely at some cost in simplicity (internally and admin visible - e.g. already, the docs for systemd service files contain an abundance of options), but it seems infeasible for systemd to be able to anticipate all possible demands of systems that want to spawn processes. Perhaps it'd be nice to have this stuff in a system *library*, useful to both systemd and other processes? E.g. systemd now supports DBus, but what about, say, Java rmid, which needs to be runnable as, and to configure new RMI services (for which it forks a separate JVM), as a non-privileged process; what about end-user DBus buses spawning services?

On 2: I'm not sure this is right. While there may be a number of services where it happens to work out, in the general case many dependencies are not visible*. That systemd has acquired various ways to manually specify ordering and activation is proof of this. Obviously there are lots of events that require richer systems to deal with, e.g. by modifying applications to publish state and reacting intelligently to changes in other applications' state (with some suitable IPC like DBus in there to glue it together). Essentially, I think even with systemd, you're going to still have a mass of files that have to describe properties of and relationships between services. That's info that's easy to get wrong, and otherwise can drift and get out of sync.

To summarise:

- I'm not sure it's healthy to centralise service management in 1 process. I suspect there'll always be need for additional specialised, sub-system centric process managers. (One may disagree on "need", but others will perceive such needs, and hence such will exist). So why not centralise the code in a library, so it can be used by /all/ process managers on the system?

- I can see how socket proxying is attractive, as it's a relatively easy change, but how much encoding of client properties can it really avoid? The only way to truly get dependency free bootup surely requires updating the applications to behave better?

How did this guy test systemd exactly?

Posted Oct 11, 2010 14:48 UTC (Mon) by mezcalero (subscriber, #45103) [Link] (12 responses)

Yes, we try to centralizing process babysitting a bit. We want to cover all important system-level triggers and a few others. However, we see little need in porting everything that exists on this planet to use systemd for process babysitting. Different systems have different needs. We focus only on system and session services and their needs.

The word "socket proxy" is misleading, as it suggests that systemd was actually proxying every single byte from the network to the actual applications. This is not what happens. systemd hands off the real socket fd to the spawned applications and thus during runtime the performance is identical to services that called socket() themselves.

My comments regarding "events" in systemd and upstart refer to the fact that in upstart an "event" is a first-level object that is at the core on what it does and which is what the admin works with. While in systemd we internally use an event-based API such as epoll(), this is hidden to the outside and our first level objects are our "Units" and the dependencies between them.

I think there's little point in creating a library for spawning processes as you need a (system-wide) runtime component for a lot of the stuff that a good baby-sitter does, such as collecting info about crashes and suchlike. Also, it is essential that services are detached from the code that actually spawned them. That makes it important to fork them off some central process, so that they inherit a clean execution environment. Due to that you absolutely *want* this to be forked off PID 1.

And sure, it is impossible to foresee all ways people might want to use their computers in. But that's not a problem. We cover what makes sense for the base system. If people run complex application servers such as Java on top of them they can do that, there's no need in centralizing their process management too. We do not want to lose focus.

systemd is a very dynamic in itself, however it is not a vehicle to make other daemons more dynamic. It is also not a humongous abstraction effort to encode the entire system state in a single place. Instead, we focus on mount, device, process management and a few things around it. But that's it. We don't do lose focus and we want to have a very clearly defined set of goals what we want to do and what not. Or to put this in different words: if applications want to follow power states or track location then they should not talk to systemd about this, they should go directly to upower, to geoclue or whatever other service might be a good candidate.

How did this guy test systemd exactly?

Posted Oct 11, 2010 22:52 UTC (Mon) by nix (subscriber, #2304) [Link]

We don't do lose focus and we want to have a very clearly defined set of goals what we want to do and what not.
The phrase you're looking for I think is 'do one thing and do it well', which is of course very much the Unix way.

How did this guy test systemd exactly?

Posted Oct 12, 2010 7:16 UTC (Tue) by paulj (subscriber, #341) [Link] (10 responses)

By socket proxy I meant as proxy until the child could be spawned, of course - as the mentioned inetd and rmid do (well, iirc, rmid can also fully proxy).

It's good to hear there is a clear focus for systemd, and that it's not intended to displace higher layers. That, along with the DBus integration, makes me feel a lot better.

Still though, I don't understand the part of your post where you insist process creation belongs in PID 1, given you acknowledge lots of stuff wont be ported. :) Spawned processes can (and must, to properly daemonise, as you've written) reparent themselves to PID 1. Why can't systemd provide much of its baby sitting services (crashes) for those too? Also, clean environment, and the other steps detailed in the systemd daemon man page surely can be definitely be done in a library and would have the widest reach, so why not? Further, cgroups could also be setup by other processes (I'm slightly unclear on whether cgroups can be created or spawned into by unprivileged processes though).

Again, I am glad to hear systemd will stay focussed. I think it's important not to fall into the trap of trying to support everything, and fall victim to an ever growing amount of options, dizzying and intractable for the admin to comprehend (and no doubt for the maintainer too, to an extent). I think systemd maybe already has a toe in that hole, given all the funny socket-option options already there.

It might be an idea to push socket creation back to the services, so that systemd doesn't need all these options. E.g. have systemd run a binary that does whatever and hands back the fd to it over a pipe. This binary can be supplied by / packaged with the application. This would allow systemd to support more services without it itself having to be updated, where services need funny kinds of sockets or options that systemd doesnt do, and so make systemd more flexible still.

Anyway, thanks for taking the time to respond.

How did this guy test systemd exactly?

Posted Oct 12, 2010 14:50 UTC (Tue) by mjthayer (guest, #39183) [Link] (8 responses)

> It might be an idea to push socket creation back to the services, so that systemd doesn't need all these options. E.g. have systemd run a binary that does whatever and hands back the fd to it over a pipe. This binary can be supplied by / packaged with the application. This would allow systemd to support more services without it itself having to be updated, where services need funny kinds of sockets or options that systemd doesnt do, and so make systemd more flexible still.
Wasn't the whole point to load as few processes as possible in the early boot stages? If you load one babysitter process per daemon surely you are back to where you started - and for that matter, since many of the daemons do need to do exactly the same thing, having one application to handle that for all of them seems like a good thing to me. I suppose that systemd could have a mechanism for adding helpers for daemons that needed to do things slightly differently and that could really not be adjusted to work with it, although even there it would be nicer if such a helper could be shared by many daemons instead of each having their own one.

How did this guy test systemd exactly?

Posted Oct 12, 2010 15:05 UTC (Tue) by paulj (subscriber, #341) [Link] (7 responses)

Well, the common-case stuff can stay in systemd, and be fast. The odd-ball stuff can be handled by the binary. That avoids having to update systemd with options for every possible socket and socket option, before apps can use them. The alternative is that the application *cant* use systemd at all, which seems worse surely.

E.g. I maintain some daemons that could make use of demand launching, but systemd doesn't support the sockets and/or the options I need.. Hence why I suggested it.

How did this guy test systemd exactly?

Posted Oct 12, 2010 15:17 UTC (Tue) by mjthayer (guest, #39183) [Link] (1 responses)

> E.g. I maintain some daemons that could make use of demand launching, but systemd doesn't support the sockets and/or the options I need.. Hence why I suggested it.
Might that not have been a good place to start the discussion? I'm sure that if you got in touch with Lennart and discussed those specific issues then the two of you would come up with a good solution that might well be useful for other people too.

How did this guy test systemd exactly?

Posted Oct 12, 2010 16:51 UTC (Tue) by paulj (subscriber, #341) [Link]

The suggestion was made in a reply to Lennart, fwiw. ;)

How did this guy test systemd exactly?

Posted Oct 12, 2010 18:35 UTC (Tue) by mezcalero (subscriber, #45103) [Link] (4 responses)

Well, thankfully new sockopts are only added every now and then to the kernel. I don't think we'll have a hard time keeping up with that.

Can you elaborate on which socket types and options you are missing in systemd right now?

How did this guy test systemd exactly?

Posted Oct 13, 2010 13:04 UTC (Wed) by paulj (subscriber, #341) [Link]

Raw sockets. + there are various socket options I need to have set on connectionless sockets (e.g. multicast memberships; various meta-data retrieval options which might need to be set before packet is put into the socket). Routing stuff tends to use a variety of far-out options (and new ones come along not too infrequently - e.g. GTSM). ;)

Further, if I can specify these things in code, rather than in a config file, then I can share that code between the "setup socket(s) for systemd" binary and the main body of code. Which would help reduce redundancy and hence mistakes.

I'd like to say "I'll send you a patch", but my TODO list is several kms long at this stage. :(

How did this guy test systemd exactly?

Posted Oct 13, 2010 13:12 UTC (Wed) by paulj (subscriber, #341) [Link] (2 responses)

Oh, some specific, potential candidates:

- raw sockets
- meta-stuff like IP_PKTINFO, SO_BINDTODEVICE
- multicast stuff, IP_MULTICAST_LOOP, IP_ADD_MEMBERSHIP, IP_MULTICAST_TTL

To be clear, I think it'd probably be ungood for systemd to try explicitly support every possible socket type and option that services might want to use. ;) I'd prefer a coded offload mechanism.

How did this guy test systemd exactly?

Posted Oct 13, 2010 15:06 UTC (Wed) by mezcalero (subscriber, #45103) [Link] (1 responses)

SO_BINDTODEVICE we actually support (and actually in a pretty nice way, so that implicit deps on the network device are created, so that this actually works race-freely).

By "raw" sockets you mean raw IP sockets? Raw IP sockets usually also mean installation of a BSD socket filter, and I am not sure I want to include something like that in systemd.

AFAIK IP_PKTINFO is something that can be set when the app first takes possession of the socket. There's no need to set it before listening.

Apple's launchd has multicast support. I'd be willing to add that to systemd too, but I wanted to wait for a real-life usecase. Avahi (which I maintain) is probably the heaviest user of mcast on default Linux installations right now, and I don't think for Avahi it would make sense to have this.

How did this guy test systemd exactly?

Posted Oct 13, 2010 16:02 UTC (Wed) by paulj (subscriber, #341) [Link]

You can bind raw sockets to a specific IP protocol, and/or multicast groups. So you don't need a BPF filter per se. I'd have to read the kernel code for PKTINFO, but it wouldn't surprise me if the kernel marshalled the ancillary meta-data for the packet at the point of copying it into the socket buffer - and that it might not be available if you set PKTINFO later. I don't know though, havn't checked. ;)

Anyway, the point is, we shouldn't need this conversation - it'd be nice if apps could take care of the weirder stuff themselves by supplying their own binary to do the setup. ;)

Use cases: certain link-info and routing protocols. E.g. imagine you plug into a network that sends default route info via some routing protocol. Rare case, but imagine if systemd could auto-launch the right daemon.. Link-info protocols can clues about location and the like.

How did this guy test systemd exactly?

Posted Oct 12, 2010 18:32 UTC (Tue) by mezcalero (subscriber, #45103) [Link]

If other packages want their software supervised by systemd they can just drop static service files into /lib/systemd/system and/or dynamic service files into /etc/systemd/system. And then they can tell systemd to start/stop/whatever the service as they wish via simple D-Bus calls.

I'd rather wait for those "oddball" services to show up and become a problem before I'd think of shifting socket creation into any external binaries.

So far we didn't have any problems with the current listening code, and Apple built an entire OS on this idea, so I think unless somebody shows me a real-life problem with this i rather not spend too much time thinking about non-existing problems.

How did this guy test systemd exactly?

Posted Oct 10, 2010 7:15 UTC (Sun) by aj (subscriber, #39001) [Link]

I tested the package that Kay provided for openSUSE Factory. It contains those systemd converted services that are part of systemd and other packages in openSUSE also have started to get systemd enabled services.

Btw. I read Lennart's article and I did not want to repeat it - and therefore only gave a quick overview instead of writing a full length article.

--
This Guy ;)

Jaeger: systemd - and #osc2010

Posted Oct 9, 2010 14:39 UTC (Sat) by tzafrir (subscriber, #11501) [Link] (14 responses)

Quoting the article:

"Finally, I welcome the work of developers of different distributions to work together on a common system. In the past – and even with LSB init scripts – every distribution needed to fix the supplied init scripts of packages or add ones. With systemd I see a convergence on init scripts so that they can be used by every distribution that runs systemd."

How much is that the case?

Jaeger: systemd - and #osc2010

Posted Oct 9, 2010 16:07 UTC (Sat) by MrWim (subscriber, #47432) [Link] (13 responses)

SystemD manages its dependencies by the config files describing the services a program provides rather than listing the other programs it depends on. This means that in theory these config files are less dependant on the environment in which they are installed so should be more portable between distributions.

That's the theory, but I can't answer how much it is the case in practice.

Jaeger: systemd - and #osc2010

Posted Oct 9, 2010 16:38 UTC (Sat) by drag (guest, #31333) [Link] (12 responses)

Yeah. The Systemd opens the Unix sockets on behalf of the services it supports and when something attaches to the socket then Systemd launches the service. A bit like the super internet daemon, but with Unix sockets instead of network ones.

It's not just the configuration files, though. The developer has to take systemd into account and provide support for it in their daemon.

Unfortunately portability probably won't be realized either because distros cannot work together to agree to direction/file locations and naming conventions which will require every developer that is attempting to work with multiple distros be forced to do the distro's work for them and take into account the little useless variations in each system they want to support. Every developer; every application.

Portability

Posted Oct 9, 2010 22:16 UTC (Sat) by dwheeler (guest, #1216) [Link] (11 responses)

In the short term there will definitely be portability issues. In the long term there might be, but they need not be significant. The Filesystem Hierarchy Standard helps, and implementations that currently implement PREFIX and DESTDIR with a "make install" script can make such differences a non-problem.

Portability

Posted Oct 10, 2010 0:58 UTC (Sun) by nix (subscriber, #2304) [Link] (10 responses)

Yes, but 'prefix' is lowercase.

(claiming one pedant point, since I'm certain you already knew this!)

Standards for releasing software

Posted Oct 10, 2010 1:57 UTC (Sun) by dwheeler (guest, #1216) [Link] (9 responses)

Yes, it's "prefix" not "PREFIX". You get one point :-). In my defense, I've just been trying to package a program which doesn't follow the usual conventions (making it a pain), and it uses PREFIX instead of "prefix".

Which gives me a reason to pitch my short essay, "Releasing Free/Libre/Open Source Software (FLOSS) for Source Installation". This tries to convince people to follow the usual conventions, and points to stuff like GNU coding standards (especially the release process), the Software Release Practice HOWTO, and the Filesystem Hierarchy Standard (FHS).

If people would just follow the usual standards and conventions, many portability problems would go away.

Standards for releasing software

Posted Oct 10, 2010 2:00 UTC (Sun) by drag (guest, #31333) [Link]

Very cool.

Standards for releasing software

Posted Oct 10, 2010 5:27 UTC (Sun) by pabs (subscriber, #43278) [Link]

Very nice article, thanks.

I added a link to your article from Debian's UpstreamGuide wiki page. I note you link to the old name (GettingPackaged) in the article, could you amend that please?

Standards for releasing software

Posted Oct 10, 2010 15:36 UTC (Sun) by aleXXX (subscriber, #2742) [Link] (2 responses)

A bit autotools-centric for my taste, e.g. cmake is only barely mentioned.

Alex

Not autotools-centric

Posted Oct 11, 2010 1:35 UTC (Mon) by dwheeler (guest, #1216) [Link] (1 responses)

I don't understand why you say, "autotools-centric for my taste, e.g. cmake is only barely mentioned." Autotools is only mentioned once, and only after cmake. This article isn't about either autotools or cmake, and isn't really focused on either. Instead, it's about the interface you should provide to end-users. Autotools and cmake (or other tools) can be used to implement that interface, but they are just ways to get there.

Not autotools-centric

Posted Oct 11, 2010 10:16 UTC (Mon) by stumbles (guest, #8796) [Link]

I don't care if it does lean towards autotools at the cost of cmake. Its still an excellent overview of how to properly package code. There is nothing (well there is) more annoying than encountering a half-baked configure or Makefile script.

Standards for releasing software

Posted Oct 11, 2010 22:26 UTC (Mon) by man_ls (guest, #15091) [Link] (3 responses)

Very nice, thanks. I miss a similar standard for Python -- library management is a mess, setup.py sucks a bit, and internationalization has to be done manually.

Standards for releasing software

Posted Oct 12, 2010 14:09 UTC (Tue) by mpr22 (subscriber, #60784) [Link] (2 responses)

If you didn't think about i18n from day one when writing your program, it's always going to involve a lot of unpleasant drudgework to add it. Only static (or tersely technical, such that it doesn't matter if it looks like "computerspeak") communication to the user can reasonably be localized via the likes of gettext(); for everything else, you need code.

Standards for releasing software

Posted Oct 12, 2010 14:57 UTC (Tue) by man_ls (guest, #15091) [Link] (1 responses)

Sorry, I didn't explain myself. The actual process was more or less painless; using gettext is not so hard. But installing the translation files was a real pain -- there is no actual mechanism in Python. You have to find the target directory using gettext.bindtextdomain('yourpackage') and then copy the .mo files manually, keeping the right directory structure. Not pretty.

Standards for releasing software

Posted Oct 14, 2010 9:40 UTC (Thu) by mpr22 (subscriber, #60784) [Link]

OK, that makes sense. (Eww.)


Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds