[Bug 1348386] Re: lxc template fails to stop

Tim Penhey tim.penhey at canonical.com
Thu Jul 24 23:26:33 UTC 2014


Tested on a precise lxc container I have:

it seems we could try with -L (or even better --console-log) and fall
back to -c (or --console) if that fails with exit code 1 (we could even
check the output for "invalid option".

---- 
ubuntu at clean-precise:~$ lxc-start -n foo -L omg
lxc-start: invalid option -- 'L'
Usage: lxc-start --name=NAME -- COMMAND

lxc-start start COMMAND in specified container NAME

Options :
  -n, --name=NAME      NAME for name of the container
  -d, --daemon         daemonize the container
  -f, --rcfile=FILE    Load configuration file FILE
  -c, --console=FILE   Set the file output for the container console
  -C, --close-all-fds  If any fds are inherited, close them
                       If not specified, exit with failure instead
		       Note: --daemon implies --close-all-fds
  -s, --define KEY=VAL Assign VAL to configuration variable KEY

Common options :
  -o, --logfile=FILE               Output log to FILE instead of stderr
  -l, --logpriority=LEVEL          Set log priority to LEVEL
  -q, --quiet                      Don't produce any output
  -?, --help                       Give this help list
      --usage                      Give a short usage message

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

See the lxc-start man page for further information.

ubuntu at clean-precise:~$ echo $?
1

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1348386

Title:
  lxc template fails to stop

To manage notifications about this bug go to:
https://bugs.launchpad.net/juju-core/+bug/1348386/+subscriptions



More information about the Ubuntu-server-bugs mailing list