linux-vserver / util-vserver

http://linux-vserver.org/
GNU General Public License v2.0
15 stars 14 forks source link

RHEL7 fixes, systemd enhancements plus other cleanups #14

Closed ensc closed 9 years ago

ensc commented 9 years ago

beside some minor buildsystem cleanups, commits:

dhozac commented 9 years ago

Isn't remounting everything as private going to cause problems for systemd? I assume it is using shared mounts for a reason.

dhozac commented 9 years ago

So on a RHEL7 based host, which parts are working? Do you have to use the systemd generator in order to run guests, or do the regular vserver commands work?

ensc commented 9 years ago

Filesystem is remounted private in our new namespace only; it does not affect the mountpoints seen by systemd. I do not know why systemd remounts everything as shared, but this breaks vserver horribly.

I am building and running RHEL7 guests (with minit, not systemd and with external pkgmgmt) on RHEL7 hosts (kernel 3.14) now. The generator and related units replace the old sysv scripts. You can still start vservers manually (which get stopped on shutdown by the util-vserver.service). Things might be improved by adding a dedicated util-vserver-stop.service and adding preinit@mark targets, but complicated situations; e.g.:

startup:

  1. host network setup
  2. DNS vserver
  3. remotefs.service
  4. other vservers
  5. start a vserver manually

shutdown:

  1. stop other vserver
  2. stop DNS vserver
  3. stop remaining vservers
  4. stop remotefs.service
  5. stop network

are still unsolved (note the order of "DNS vserver" and remotefs.service).

To solve all ordering issues on shutdown, vserver foo start should become systemd aware (e.g. do systemctl start vserver@foo.service). But for now, I can live with shutting down unregistered vservers in util-vserver.service.

dhozac commented 9 years ago

Okay, sounds promising. I'll see if I can give this a try fairly soon.