There are 6 systemd service processes running on my machine handling different components.
Snipped out the irrelevant processes.
% systemd-cgls
├─user.slice
│ └─user-1000.slice
│ └─[email protected]
│ ├─6612 /usr/lib/systemd/systemd --user
│ └─6616 (sd-pam)
└─system.slice
├─1 /sbin/init
├─systemd-udevd.service
│ └─151 /usr/lib/systemd/systemd-udevd
├─systemd-logind.service
│ └─345 /usr/lib/systemd/systemd-logind
└─systemd-journald.service
└─125 /usr/lib/systemd/systemd-journaldThis may be true of "mainstream" users' applications, but is it really true of system software? And should we really attribute the cultural shift toward monolithic systems to shifting preferences rather than leap-first "design"?
This blog post does not identify the subtle argument that upstart maintainers made against systemd at pid -1 : it also brings along with all the other services (like logind) that frameworks like Gnome depend on.
So, if Gnome wants to depend on logind and logind depends on systemd (post systemd rev-205), this means that Gnome is irrevocably coupled to systemd which must run as PID-1 [2]. This means it becomes hard for upstart to be used with Gnome.
There has been no doubt whatsover that an init system needs to run as PID-1.
[1] http://en.wikipedia.org/wiki/Process_identifier#Unix-like [2] I must add here that Gnome does include a fallback path to not depend on systemd components.
The question is how much of it, and whether or not Systemd piles too much stuff into pid 1 that could instead be farmed out to separate processes, handled by separate binaries, that could be more easily upgraded or replaced.
(I don't know; I've not looked at Systemd enough to have an opinion)
this is because all of systemd's services rely strongly on cgroups for resource control and upstream kernel wants a single reader/writer for the cgroups API (the current filesystem model is going away). systemd is just following lockstep with what kernel wants and is becoming that API.
There has been a lot of FUD around the "PID 1" disaster, but invariably every init system will have to have a single point cgroup writer. Systemd is just ahead of the curve.
Anyone has more information about this from the kernel perspective ? Will systemd be the only API ? Sounds strange.
Basically, if you use systemd as the init system, then yes - it is the only API [1] . If you dont want to use systemd then there are alternate implementations of the cgroup API (e.g. cgmanager - http://cgmanager.linuxcontainers.org/ ). IMHO, they are both incompatible with each other.
Lennart has a reasonable justification of why systemd is implementing it's own API [2]
[1] https://lwn.net/Articles/557111/ [2] https://lwn.net/Articles/557140/
We are at a point where containers are going to change what people want in a Linux distro and not sure that monolithic will win.
I haven't looked deeply into systemd, but from how the conversation around it is going, it would seem to be solving complexity with more complexity.
I'd like to see a mashup of CoreOS plus NixOS integrated with a cluster container management system.
I hope you realize "containers" are so similar (identical compared to "single image big machines") to how mainframes worked in 70's.
Just saying nothing is new, cycles are the norm and don't be so high and superior cause your new hotness is gonna be the "old, broken shit" in a couple decades.
Containerization has always been a good idea. http://en.wikipedia.org/wiki/FreeBSD_jail has been around for almost 14 years. I am aware that full system virtualization dates back to the 1960s, in no way do I think that old eq bad.
http://www.reddit.com/r/programming/comments/14ay0r/hacker_k...
How is adding a line to a run script "duplicating logic badly"?
Coupling is clearly bad, as evidenced by ... 30+ years of software design, but is a necessary evil. I don't see any reason why it's necessary in such a low level system component. "this is not rocket science" you don't impose dependencies on something you want to be reliable.
Daemontools is clearly the most mature solution, from a perspective of stability. It's probably why nobody wants to use it, there's nothing to play with or exploit for profit because it already works.
systemd-journald provides tampering-attestation features that plain-text logs do not, and cannot, provide. It's fundamentally more secure.
Reality: if I owned the user writing logs, I can do anything I want with the logs, no matter how they're stored.
Here is something you cannot do: you cannot alter the logs without anyone noticing, since log entries have a rolling hash.
This prevents an attacker from being able to modify logs without detection, and was implemented in systemd after the postmortem on the kernel.org breakin, i.e., it was developed to counter an actual threat.
I would suggest you read up on what log attestation actually does.
The only truly secure way to record messages up to the point of break-in is a one-way remote log. Any new messages after break-in is subject to falsification.
And if you have this then you don't need a fancy cryptographic syslogd to detect tampering.
Security half-measures do not mean you are secure. If it can be hacked, it will be hacked, and then what was the point of sacrificing your whole system's init system?
(Also you could just replace syslogd with a journaled syslogd, rather than replacing your entire init system... but I guess that's off-topic?)
FAIL. You just wrote outdated software. Under this dumbass idea of journaling, which by defition is there to allow editing.., the best thing you can do is built a rolling function, which basically means coping the data, which basically means increasing your attack surface.
Assuming nothing has managed to redirect those unlinks for example...
As soon as the attacker manages to extract the state of the key generator from memory at one point of time, the log entries from that and the following sealing periods can be modified and cleanly sealed.
These remote copies of the logs could actually be used to detect log-tampering and 0day exploits.
anything can have any feature, what matters is how it's built.
I have written hacks to work around this (I have a gentoo VM that uses supervise as an openRC replacement, and have several hacks to work around this issue). It's a pain in the ass, and one reason why systemd runs in pid 1.
I prefer daemontools, but it's not perfect; it made a different set of tradeoffs.
The comment you're responding to is talking about dependencies in boot services, e.g., sshd depends on having the network interface up. Systemd does a great job of handling this sort of thing, allowing services to start in parallel, but ensuring that things only start after all the pieces they rely on have started. That sort of dependency isn't "bad" -- it just is. You can't remove a dependency like this, it reflects reality.
That said, I really don't care for systemd. I think the complexity it adds more than counteracts the benefits it provides, but I'm old and didn't mind SysV or BSD init.
So many problems come from such a simple dependency.
Designing all services to handle and expect failures and just let init restart regardless of the state is the RIGHT solution.
Not in the Gentoo ecosystem where we have OpenRC: https://en.wikipedia.org/wiki/OpenRC
systemd gives me nothing that openrc doesn't already provide and it messes with a lot of things that I do care about (eg. logging, cron).
If RedHat is so intent on forcing their junk through everyone's throat it's time to move back to an OS where technical insight reigns instead of corporate money and marketingspeak.
"It's not Unix" is no longer a valid critique. The old Unix design philosophy is dead. People want systems of components that function as an integrated whole. They do NOT want pieces that are generally unaware of each other (this is touted as the virtue of "loose coupling").
Yes, pid 1 does a lot. That's by necessity. It's not your grandpap's Unix anymore. Do you want to control all the system services, including the "badly behaved" ones? That functionality needs to be in pid 1. Do you want to bring the system up safely and sanely, accounting for things like hotplugged disks in /etc/fstab? That functionality needs to be in pid 1. Systemd is the correct design for modern Linux. It also brings the advantage of better integration and greater commonality across distros.