[lxc-devel] lxc-start behavior in lxc1.0

William Dauchy wdauchy at gmail.com
Thu Apr 17 10:46:58 UTC 2014


On Mon, Apr 14, 2014 at 3:43 PM, Stéphane Graber <stgraber at ubuntu.com> wrote:
> Hmm, "lxc-start -n blah -- /bin/bash" still seems to work fine (well, as
> well as this usually does, console initialization isn't done properly,
> ... but I get a bash prompt at least).
> What do you get on screen when you do it?

Ok lxc1 did a modification in the lxc.console behaviour.
lxc.console now accept a tty and not a file.
and I need to use -L with lxc-start to get logs in file.

The problem raised is now I don't have a -L equivalent in config like
before. Correct me if I'm wrong.

lxc.console in config file:
% git grep -F console.path
lxc/conf.c:     new->console.path = NULL;
lxc/conf.c:     if (conf->console.path)
lxc/conf.c:             free(conf->console.path);
lxc/confile.c:  return config_path_item(&lxc_conf->console.path, value);
lxc/confile.c:          v = c->console.path;
lxc/confile.c:  if (c->console.path)
lxc/confile.c:          fprintf(fout, "lxc.console = %s\n", c->console.path);
lxc/lxc_start.c:        if (ensure_path(&conf->console.path,
my_args.console) < 0) {
lxc/start.c:    if (conf->console.path && setenv("LXC_CONSOLE",
conf->console.path, 1)) {

-L with lxc-start, no equivalent in config file:
% git grep -F console.log_path
lxc/conf.c:     new->console.log_path = NULL;
lxc/lxc_start.c:        if (ensure_path(&conf->console.log_path,
my_args.console_log) < 0) {
lxc/start.c:    if (conf->console.log_path &&
setenv("LXC_CONSOLE_LOGPATH", conf->console.log_path, 1)) {
-- 
William


More information about the lxc-devel mailing list