|
|
Subscribe / Log in / New account

Systemd and Fedora 14

Systemd and Fedora 14

Posted Aug 26, 2010 10:17 UTC (Thu) by mezcalero (subscriber, #45103)
In reply to: Systemd and Fedora 14 by etienne
Parent article: Systemd and Fedora 14

That's a misconception, I actually often use CUPS as an example how things are much better covered by systemd than by upstart, because we can start it via socket, path or device activation and that race-freely, instead of having mandatory on-boot startup.

In fact, on top of that doing device-based activation is a lot nicer in systemd than in upstart, since a device can pull in a service, but the service is then properly delayed until all its dependencies are available. For example, that allows us to start CUPS when the device is plugged in (which will on coldplug happen very early during boot), but delay this until the local file systems are properly mounted. systemd is much much smarter here than Upstart ever was. As soon as you have multiple triggers and multiple requirements of a service systemd can model things much much better than Upstart for any kind of activation. And the best thing is that this kind of synchronization happens completely transparently for all normal services, the user/admin doesn't need to have any particular insight into boot ordering.


to post comments

Systemd and Fedora 14

Posted Aug 27, 2010 9:12 UTC (Fri) by Kamilion (guest, #42576) [Link] (7 responses)

And 'surprisingly', it finally makes the stupid networked LaserJet 2840 in the office usable!

None of our linux desktops have a printer directly connected, they all print via a shared network queue. And one machine is designated as that CUPS queue. Which then sends the print job back out over the network to the printer. Or faxes it. Plus everything going through the queues gets PDF'd, tagged, sorted, and logged.

Testing a F14 box with systemd standing in for the normal CUPS queue machine over the weekend: Holy crap, I didn't have to mess with any configuration past clicking "new printer" then "share printer". CUPS is only running when there's work to be done. Wonderful! Can't wait till systemd trickles down to debian and gets picked up in ubuntu. My 'clever' upstart scripts seem so... ugly and inflexible now.

Oh, and nothing's stopping you from defining a unit that runs a shellscript, if that's what you 'need' to do to get something done. It's just, now there's an easier way than copying somebody's shell template and stumbling through bash tutorials just to get something like nginx and php+fastcgi starting up with any kind of reliability. Then you find something like monit or god, get it working in 5 minutes and slap your forehead wondering why you spent four weeks on a damned init script.

systemd's like that. Forehead-slapping easy.

And hey -- I could never wrap my brain around fundamentally understanding *every* initscript in my /etc; just bouncing between scrolling up and down in /lib/lsb/init-functions and tabbing back to /etc/init.d to figure out the total codepath gives me a headache. I read all the included systemd units, and now I have a total understanding of where everything stands in a couple glances.

Now if only I had a replacement for Process Explorer... gnome-system-monitor doesn't cut it. Least htop's pretty close.

Systemd and Fedora 14

Posted Aug 27, 2010 15:02 UTC (Fri) by gidoca (subscriber, #62438) [Link] (1 responses)

I don't know about other DEs, but on KDE, you don't need to have CUPS running on your local machine to support printing on a remote machine or network printer, given that it supports IPP and Zeroconf. It will automatically detect the remote CUPS instance and show it in the print dialog, without accessing the local print server.

Systemd and Fedora 14

Posted Aug 30, 2010 15:11 UTC (Mon) by salimma (subscriber, #34460) [Link]

I believe Kamilion was describing setting up the remote CUPS instance itself.

Systemd and Fedora 14

Posted Sep 5, 2010 16:24 UTC (Sun) by AdamW (subscriber, #48457) [Link] (4 responses)

"Oh, and nothing's stopping you from defining a unit that runs a shellscript, if that's what you 'need' to do to get something done."

in fact, we're already doing this in F14. firstboot in F14 uses a 'native' systemd unit file, which actually just sets an environment variable and then runs /etc/init.d/firstboot...(don't ask me to explain why, it's sort of complicated. :>)

Systemd and Fedora 14

Posted Sep 6, 2010 6:19 UTC (Mon) by Darkmere (subscriber, #53695) [Link] (3 responses)

I've played a bit with F14 alpha but have issues running it (related to nouveau drivers and my specific hardware, really) and I wanted to interject a question:

Traditionally, we have had certain things in/out-of order due to non-strict dependency issues though still "needed", for example, starting a (deny all) firewall before network, as well as waiting with samba/ftp-servers until after network-access or filesystems are available.

Such "soft" ordering doesn't appear to be on schedule for systemd, so, how will this work in the end? Fex. I want to restart some daemons that aren't perfectly well behaved if they are to work on files residing on a network drive (has happend quite a few times), previously it's been a case of manually reordering things, in systemd, I'm not quite sure anymore.

Systemd and Fedora 14

Posted Sep 6, 2010 7:04 UTC (Mon) by rahulsundaram (subscriber, #21946) [Link] (2 responses)

man systemd.service shows Before=foo and After=boo for manual ordering. I think that would work for you but do drop your feedback to systemd developers in case, we can fix this automatically somehow.

Systemd and Fedora 14

Posted Sep 6, 2010 8:15 UTC (Mon) by Darkmere (subscriber, #53695) [Link] (1 responses)

I thought the before/after only worked for start-ordering, not completion?

I don't care if you've started the network service+network filesystem handshake, the services using files in that area may only be started after they are finished, not before.

This sort of interaction happens in reality, mostly you can pass it off like "so fix the service so it notices the new filesystem" but my reality wearing an administrator hat is... different from that.

Systemd and Fedora 14

Posted Sep 7, 2010 15:08 UTC (Tue) by foom (subscriber, #14868) [Link]

From reading some manpages:
http://0pointer.de/public/systemd-man/systemd.service.html
http://0pointer.de/public/systemd-man/systemd.unit.html

It sure sounds like they control completion ordering.

"After= ensures that the configured unit is started after the listed unit finished starting up, Before= ensures the opposite, i.e. that the configured unit is fully started up before the listed unit is started"

And, see the description of Type= on the systemd.service page.


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