]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/confile.c
confile: make update warning opt-in
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 10 Oct 2017 12:35:40 +0000 (14:35 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 10 Oct 2017 12:35:40 +0000 (14:35 +0200)
commit70952c01b89c8faecb9e811428aacaffd2c9d4ab
tree07e924f4f86845d561e34d191d26c2ad7440c4be
parent7c8f5d1d0149e08c71738f4a040ce65f8abbfbca
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