[lxc-devel] Starting lxc via systemd on openSUSE: "action: command not found"

Michael H. Warfield mhw at WittsEnd.com
Wed Aug 13 19:38:10 UTC 2014


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 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
-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 465 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140813/c00ee5e4/attachment.sig>


More information about the lxc-devel mailing list