On 2/6/2012 7:45 PM, Brian K. White wrote:
Tech problem 2: ExecStatus.
Systemd wants to watch for some sort of event and then react when it happens, but in my LXC example, there is no event to watch for*.
I forgot exactly what I was going to expand on indicated by that *. I think just that ultimately, there probably is a way to do this in systemd, but it just requires more sophistication in systemd. It's perfectly OK that version 1 didn't think of everything all at once. It's not OK that they reject things they didn't think of, as being invalid. For instance, in the lxc case, a couple of possible tacks: We could either have systemd understand that it must watch several things for one "service", not too unlike how it already watches all the httpd processes not just one. Or without needing to improve systemd, we could probably just change from having one sysv init script that reads multiple lxc config files and starts up multiple lxc instances, to having a separate systemd unit file for each lxc instance. A given systemd unit file probably can be made to manage a single lxc container by watching the same things the init script looks at. What we lose is, right now, the user does not have to write or even look at the init script, the just write the config file for each new container. If each container needs it's own systemd unit file, then they can't be supplied by the packager, the user has to write a unit file themselves for each new container. The best a packager can do is supply a template unit file, ugly. I'm not 100% sure systemd could actually manage even a single lxc instance properly right now either. The init script looks at several things together for each lxc instance. That is between one to three not clearly related processes, possibly a cgroup status file, and possibly a runlevel status file in in a containers filesystem, and ideally in the common full-system container case also a check to read the containers /etc/inittab and maybe even modify the containers /etc/inittab to ensure that it's init process will react properly to the host sending it HUP and PWR signals. (which brings up the problem of now what if the container is running systemd instead of init... soooo many problems with this proposed switch) I'm not sure a systemd unit file can express all that yet. I would be more inclined to "work on solutions" like this if it weren't for the "you're all wrong" attitudes of the people pushing systemd. -- bkw -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org