https://bugzilla.redhat.com/show_bug.cgi?id=1033604
--- Comment #6 from Oved Ourfali oourfali@redhat.com --- (In reply to Michal Fojtik from comment #5)
Oved: I think it might be a not a bug but a wrong approach :-) See the 'system container' model Matthew described in Comment 2. In order to start postgresql service, you need to start 'systemd' itself inside the container, which will then pick up postgres unit file and start it.
I tried it, but got a lot of errors: sh-4.2# /usr/lib/systemd/systemd --system & [1] 6 sh-4.2# systemd 204 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ) Detected virtualization 'lxc'. Failed to set hostname to <38620592650b>: Operation not permitted No control group support available, not creating root group. Failed to open /dev/autofs: No such file or directory Failed to initialize automounter: No such file or directory Unit proc-sys-fs-binfmt_misc.automount entered failed state. systemd-journald.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-journald.service entered failed state. systemd-journald.service holdoff time over, scheduling restart. var-lib-nfs-rpc_pipefs.mount mount process exited, code=exited status=32 Unit var-lib-nfs-rpc_pipefs.mount entered failed state. proc-fs-nfsd.mount mount process exited, code=exited status=32 Unit proc-fs-nfsd.mount entered failed state. sys-kernel-debug.mount mount process exited, code=exited status=32 Unit sys-kernel-debug.mount entered failed state. dev-mqueue.mount mount process exited, code=exited status=32 Unit dev-mqueue.mount entered failed state. sys-kernel-config.mount mount process exited, code=exited status=32 Unit proc-fs-nfsd.mount entered failed state. sys-kernel-debug.mount mount process exited, code=exited status=32 Unit sys-kernel-debug.mount entered failed state. dev-mqueue.mount mount process exited, code=exited status=32 Unit dev-mqueue.mount entered failed state. sys-kernel-config.mount mount process exited, code=exited status=32 Unit sys-kernel-config.mount entered failed state. dev-hugepages.mount mount process exited, code=exited status=32 Unit dev-hugepages.mount entered failed state. systemd-journald.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-journald.service entered failed state. systemd-journald.service holdoff time over, scheduling restart. systemd-binfmt.service: main process exited, code=exited, status=1/FAILURE Unit systemd-binfmt.service entered failed state. systemd-journald.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-journald.service entered failed state. systemd-journald.service holdoff time over, scheduling restart. lvm2-lvmetad.service: Supervising process 33 which is not our child. We'll most likely not notice when it exits. systemd-journald.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-journald.service entered failed state. systemd-journald.service holdoff time over, scheduling restart. systemd-journald.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-journald.service entered failed state. systemd-journald.service holdoff time over, scheduling restart. ... ... ... systemd-journald.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-journald.service entered failed state. systemd-journald.service holdoff time over, scheduling restart. systemd-journald.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-journald.service entered failed state. systemd-journald.service holdoff time over, scheduling restart. systemd-journald.service start request repeated too quickly, refusing to start. Unit systemd-journald.service entered failed state. systemd-journald.service start request repeated too quickly, refusing to start. Unit systemd-journald.socket entered failed state. systemd-remount-fs.service: main process exited, code=exited, status=1/FAILURE Unit systemd-remount-fs.service entered failed state. Failed to create cgroup cpu:/: No such file or directory Failed to create cgroup cpu:/: No such file or directory iscsid.service: Supervising process 56 which is not our child. We'll most likely not notice when it exits. avahi-daemon.service: main process exited, code=exited, status=255/n/a Unit avahi-daemon.service entered failed state. postgresql.service: control process exited, code=exited status=206 Unit postgresql.service entered failed state. systemd-logind.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-logind.service entered failed state. dbus.service: main process exited, code=exited, status=206/OOM_ADJUST Unit dbus.service entered failed state. dbus.service: main process exited, code=exited, status=206/OOM_ADJUST Unit dbus.service entered failed state. systemd-logind.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-logind.service entered failed state. dbus.service: main process exited, code=exited, status=206/OOM_ADJUST Unit dbus.service entered failed state. systemd-logind.service holdoff time over, scheduling restart. dbus.service: main process exited, code=exited, status=206/OOM_ADJUST Unit dbus.service entered failed state. dbus.service start request repeated too quickly, refusing to start. Unit dbus.socket entered failed state. systemd-logind.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-logind.service entered failed state. systemd-logind.service holdoff time over, scheduling restart. systemd-logind.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-logind.service entered failed state. systemd-logind.service holdoff time over, scheduling restart. systemd-logind.service: main process exited, code=exited, status=218/CAPABILITIES Unit systemd-logind.service entered failed state. systemd-logind.service holdoff time over, scheduling restart.
Some services eventually got started, but not all of them. Also, trying to start it manually results in:
service postgresql restart Redirecting to /bin/systemctl restart postgresql.service Failed to get D-Bus connection: No connection to service manager.