[lxc-devel] -L option with lxc-start
Serge Hallyn
serge.hallyn at ubuntu.com
Sat May 24 22:15:03 UTC 2014
Quoting William Dauchy (wdauchy at gmail.com):
> Hello,
>
> lxc1 did a modification in the lxc.console behaviour (compared to the
> previous version)
> Indeed, in the config file lxc.console now accept a tty and not a file.
> I now need to use -L with lxc-start to get logs in a 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)) {
Indeed, it looks like we need a patch to confile.c to add a
config_console_logfile() helper to set that. Would you be
interested in writing that patch?
More information about the lxc-devel
mailing list