]> git.proxmox.com Git - mirror_lxc.git/commit
confile: make update warning opt-in
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 10 Oct 2017 12:35:40 +0000 (14:35 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 11 Oct 2017 16:25:12 +0000 (12:25 -0400)
commit25af2ac7f3aa524092258c0da128a6223f98cfed
treee1a702bad5fa772f6fc06d51d62bce9e18186715
parent085efe8f23a9dd4f066b98ca83dfce8dc8ae8af8
confile: make update warning opt-in

With the release LXC 2.1 we started warning users who use LXC through the API
and users who use LXC through the tools equally about updating their config.
This quickly got confusing and annoying to API users who e.g. generate configs
on the fly (e.g. LXD). So instead of unconditionally warning users we make this
opt-in. If LXC detects that the env variable LXC_UPDATE_CONFIG_FORMAT is set
then it will warn the user if any legacy configuration keys are present. If it
is not set however, it will not warn the user. This is ok, since the log will
still log WARN()s for all legacy configuration keys.
The tools will all set LXC_UPDATE_CONFIG_FORMAT since it is very much required
that users update to the new configuration format pre-LXC 3.0.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
22 files changed:
src/lxc/confile.c
src/lxc/tools/lxc_attach.c
src/lxc/tools/lxc_autostart.c
src/lxc/tools/lxc_cgroup.c
src/lxc/tools/lxc_checkpoint.c
src/lxc/tools/lxc_clone.c
src/lxc/tools/lxc_config.c
src/lxc/tools/lxc_console.c
src/lxc/tools/lxc_copy.c
src/lxc/tools/lxc_create.c
src/lxc/tools/lxc_destroy.c
src/lxc/tools/lxc_device.c
src/lxc/tools/lxc_execute.c
src/lxc/tools/lxc_freeze.c
src/lxc/tools/lxc_info.c
src/lxc/tools/lxc_ls.c
src/lxc/tools/lxc_monitor.c
src/lxc/tools/lxc_snapshot.c
src/lxc/tools/lxc_start.c
src/lxc/tools/lxc_stop.c
src/lxc/tools/lxc_unfreeze.c
src/lxc/tools/lxc_wait.c