[lxc-devel] Starting lxc via systemd on openSUSE: "action: command not found"
Dwight Engen
dwight.engen at oracle.com
Wed Aug 13 23:03:42 UTC 2014
On Wed, 13 Aug 2014 17:48:59 -0400
"Michael H. Warfield" <mhw at WittsEnd.com> wrote:
> On Wed, 2014-08-13 at 17:14 -0400, Dwight Engen wrote:
> > On Wed, 13 Aug 2014 15:38:10 -0400
> > "Michael H. Warfield" <mhw at WittsEnd.com> wrote:
> >
> > > On Wed, 2014-08-13 at 21:22 +0200, Johannes Kastl wrote:
> > > > Hi everyone,
> > > >
> > > > I tried to get some lxc containers to start on openSUSE, but
> > > > could not get the systemd-service to start:
> > > >
> > > > > sudo systemctl status lxc.service lxc.service - LXC Container
> > > > > Initialization and Autoboot Code Loaded: loaded
> > > > > (/usr/lib/systemd/system/lxc.service; disabled) Active: failed
> > > > > (Result: exit-code) since Di 2014-08-12 10:41:47 CEST; 5s ago
> > > > > Process: 2792 ExecStart=/usr/lib/lxc/lxc-autostart-helper
> > > > > start (code=exited, status=1/FAILURE) Process: 2790
> > > > > ExecStartPre=/usr/lib/lxc/lxc-devsetup (code=exited,
> > > > > status=0/SUCCESS) Main PID: 2792 (code=exited,
> > > > > status=1/FAILURE)
> > > > >
> > > > > Aug 12 10:41:47 XXX lxc-autostart-helper[2792]:
> > > > > /usr/lib/lxc/lxc-autostart-helper: line 101: action: command
> > > > > not found Aug 12 10:41:47 XXX lxc-autostart-helper[2792]:
> > > > > [73B blob data] Aug 12 10:41:47 XXX systemd[1]: lxc.service:
> > > > > main process exited, code=exited, status=1/FAILURE Aug 12
> > > > > 10:41:47 XXX systemd[1]: Failed to start LXC Container
> > > > > Initialization and Autoboot Code. Aug 12 10:41:47 XXX
> > > > > systemd[1]: Unit lxc.service entered failed state.
> > > >
> > > > The reason seem to be lines containing 'action' in
> > > > /usr/lib/lxc-autostart-helper:
> > > >
> > > > > $ grep -C 2 action /usr/lib/lxc/lxc-autostart-helper
> > > > > wait_for_bridge # Start autoboot containers first then the
> > > > > NULL group "onboot,". action $"Starting LXC autoboot
> > > > > containers: " /usr/bin/lxc-autostart $OPTIONS $BOOTGROUPS
> > > > > touch "$localstatedir"/lock/subsys/lxc ;; -- # delaying the
> > > > > system shutdown / reboot as much as we can since it's not #
> > > > > parallelized... Even 5 second timout may be too long. action
> > > > > $"Stopping LXC containers: " "$bindir"/lxc-autostart $STOPOPTS
> > > > > $SHUTDOWNDELAY rm -f "$localstatedir"/lock/subsys/lxc ;;
> > > >
> > > > I have never seen a shell command action before, so maybe this
> > > > is some systemd/sysvinit-related thing? Why does this not work
> > > > on openSUSE? Maybe the rc-file is not sourced (I remember there
> > > > is a file being sourced, I just do not have the
> > > > autostart-helper script right here...)?
> > >
> > > The "action" command is a sysvinit'ism. It's actually a function
> > > that's picked up out of "$sysconfdir"/rc.d/init.d/functions which
> > > I'm guessing you're missing. That "helper" is actually the
> > > sysvinit script run when running under Sysvinit. This could be a
> > > problem that'll fall in Dwight's or my lap. I'll see what can be
> > > done to eliminate that dependency as I'm already up to my
> > > eyeballs in the
>
> > Martin Pitt's recent patch titled "[lxc-devel] [PATCH 4/6] systemd:
> > Ensure action() is defined" should fix this.
>
> Nice... I'll run that down.
>
> Now I just gotta do something about the lock dir. I think I'll just
> fall back and drop the subsys part.
Just a word of warning that that won't work on Fedora derived distros.
It has to be there or the shutdown K symlinks won't work. See the loop
in /etc/rc.d/rc that has /var/lock/subsys/$subsys hardcoded.
> > > init scripts as it is right now. If all we need is "action" we
> > > may be able to replace it with a more neutral expression.
> > >
> > > > Any openSUSE-users out there?
> > >
> > > > Regards,
> > > > Johannes
>
> Regards,
> Mike
More information about the lxc-devel
mailing list