tree-wide: remove legacy codepaths

parent f704a070
......@@ -25,7 +25,6 @@ noinst_HEADERS = \
caps.h \
conf.h \
confile.h \
confile_legacy.h \
confile_utils.h \
console.h \
error.h \
......@@ -113,7 +112,6 @@ liblxc_la_SOURCES = \
namespace.h namespace.c \
conf.c conf.h \
confile.c confile.h \
confile_legacy.c confile_legacy.h \
confile_utils.c confile_utils.h \
list.h \
state.c state.h \
......
......@@ -391,12 +391,6 @@ struct lxc_conf {
/* RLIMIT_* limits */
struct lxc_list limits;
/* REMOVE IN LXC 3.0
* Indicator whether the current config file we're using contained any
* legacy configuration keys.
*/
bool contains_legacy_key;
/* Contains generic info about the cgroup configuration for this
* container. Note that struct lxc_cgroup contains a union. It is only
* valid to access the members of the anonymous "meta" struct within
......
......@@ -53,7 +53,6 @@ typedef int (*config_clr_cb)(const char *key, struct lxc_conf *conf,
struct lxc_config_t {
char *name;
bool is_legacy_key; /* REMOVE in LXC 3.0 */
config_set_cb set;
config_get_cb get;
config_clr_cb clr;
......
/*
* lxc: linux Container library
*
* (C) Copyright IBM Corp. 2007, 2008
*
* Authors:
* Daniel Lezcano <daniel.lezcano at free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __LXC_CONFILE_LEGACY_H
#define __LXC_CONFILE_LEGACY_H
#include <stdio.h>
#include <lxc/attach_options.h>
#include <stdbool.h>
struct lxc_conf;
struct lxc_list;
extern int set_config_network_legacy_type(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_flags(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_link(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_name(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_veth_pair(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_macvlan_mode(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_hwaddr(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_vlan_id(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_mtu(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_ipv4(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_ipv4_gateway(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_script_up(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_script_down(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_ipv6(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_ipv6_gateway(const char *, const char *,
struct lxc_conf *, void *);
extern int set_config_network_legacy_nic(const char *, const char *,
struct lxc_conf *, void *);
extern int get_config_network_legacy_item(const char *, char *, int,
struct lxc_conf *, void *);
extern int clr_config_network_legacy_item(const char *, struct lxc_conf *,
void *);
extern int lxc_list_nicconfigs_legacy(struct lxc_conf *c, const char *key,
char *retv, int inlen);
extern int lxc_listconfigs(char *retv, int inlen);
extern bool network_new_hwaddrs(struct lxc_conf *conf);
#define lxc_config_legacy_define(name) \
extern int set_config_##name(const char *, const char *, \
struct lxc_conf *, void *); \
extern int get_config_##name(const char *, char *, int, \
struct lxc_conf *, void *); \
extern int clr_config_##name(const char *, struct lxc_conf *, \
void *);
lxc_config_legacy_define(network_legacy);
lxc_config_legacy_define(lsm_aa_profile);
lxc_config_legacy_define(lsm_aa_incomplete);
lxc_config_legacy_define(lsm_se_context);
lxc_config_legacy_define(limit);
#endif /* __LXC_CONFILE_LEGACY_H */
......@@ -46,7 +46,6 @@
#include "commands.h"
#include "commands_utils.h"
#include "confile.h"
#include "confile_legacy.h"
#include "confile_utils.h"
#include "console.h"
#include "criu.h"
......@@ -2380,10 +2379,8 @@ static int do_lxcapi_get_keys(struct lxc_container *c, const char *key, char *re
* This is an intelligent result to show which keys are valid given the
* type of nic it is.
*/
if (!strncmp(key, "lxc.net.", 8))
if (strncmp(key, "lxc.net.", 8) == 0)
ret = lxc_list_net(c->lxc_conf, key, retv, inlen);
else if (strncmp(key, "lxc.network.", 12) == 0)
ret = lxc_list_nicconfigs_legacy(c->lxc_conf, key, retv, inlen);
else
ret = lxc_list_subkeys(c->lxc_conf, key, retv, inlen);
......@@ -3192,11 +3189,6 @@ static int copy_fstab(struct lxc_container *oldc, struct lxc_container *c)
if (!oldpath)
return 0;
/* REMOVE IN LXC 3.0
legacy mount key
*/
clear_unexp_config_line(c->lxc_conf, "lxc.mount", false);
clear_unexp_config_line(c->lxc_conf, "lxc.mount.fstab", false);
char *p = strrchr(oldpath, '/');
......@@ -3330,11 +3322,6 @@ static int copy_storage(struct lxc_container *c0, struct lxc_container *c,
return -1;
}
/* REMOVE IN LXC 3.0
* legacy rootfs key
*/
clear_unexp_config_line(c->lxc_conf, "lxc.rootfs", false);
/* Append a new lxc.rootfs.path entry to the unexpanded config. */
clear_unexp_config_line(c->lxc_conf, "lxc.rootfs.path", false);
if (!do_append_unexp_config_line(c->lxc_conf, "lxc.rootfs.path",
......@@ -3343,11 +3330,6 @@ static int copy_storage(struct lxc_container *c0, struct lxc_container *c,
return -1;
}
/* REMOVE IN LXC 3.0
* legacy rootfs.backend key
*/
clear_unexp_config_line(c->lxc_conf, "lxc.rootfs.backend", false);
if (flags & LXC_CLONE_SNAPSHOT)
copy_rdepends(c, c0);
if (need_rdep) {
......@@ -3569,11 +3551,6 @@ static struct lxc_container *do_lxcapi_clone(struct lxc_container *c, const char
goto out;
}
/* REMOVE IN LXC 3.0
* legacy rootfs key
*/
clear_unexp_config_line(c->lxc_conf, "lxc.rootfs", false);
clear_unexp_config_line(c->lxc_conf, "lxc.rootfs.path", false);
write_config(fout, c->lxc_conf);
fclose(fout);
......
......@@ -3014,13 +3014,6 @@ int lxc_setup_network_in_child_namespaces(const struct lxc_conf *conf,
lxc_list_for_each(iterator, network) {
netdev = iterator->elem;
/* REMOVE in LXC 3.0 */
if (netdev->idx < 0) {
ERROR("WARNING: using \"lxc.network.*\" keys to define "
"networks is DEPRECATED, please switch to using "
"\"lxc.net.[i].* keys\"");
}
if (lxc_setup_netdev_in_child_namespaces(netdev)) {
ERROR("failed to setup netdev");
return -1;
......
......@@ -291,9 +291,6 @@ int main(int argc, char *argv[])
}
}
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
struct lxc_container *c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c)
exit(EXIT_FAILURE);
......
......@@ -357,9 +357,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(EXIT_FAILURE);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
count = list_defined_containers(my_args.lxcpath[0], NULL, &containers);
if (count < 0)
......
......@@ -86,9 +86,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(EXIT_FAILURE);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
state_object = my_args.argv[0];
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
......
......@@ -251,9 +251,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(EXIT_FAILURE);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
fprintf(stderr, "System error loading %s\n", my_args.name);
......
......@@ -205,8 +205,6 @@ int main(int argc, char *argv[])
usage(argv[0]);
}
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
c1 = lxc_container_new(orig, lxcpath);
if (!c1)
exit(EXIT_FAILURE);
......
......@@ -60,8 +60,6 @@ int main(int argc, char *argv[])
struct lxc_config_items *i;
const char *value;
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
if (argc < 2 || strcmp(argv[1], "-h") == 0 ||
strcmp(argv[1], "--help") == 0)
usage(argv[0]);
......
......@@ -111,9 +111,6 @@ int main(int argc, char *argv[])
if (ret)
return EXIT_FAILURE;
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
fprintf(stderr, "System error loading container\n");
......
......@@ -179,9 +179,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(ret);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
if (geteuid()) {
if (access(my_args.lxcpath[0], O_RDONLY) < 0) {
if (!my_args.quiet)
......
......@@ -241,9 +241,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(EXIT_FAILURE);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
if (!my_args.template) {
fprintf(stderr, "A template must be specified.\n");
fprintf(stderr, "Use \"none\" if you really want a container without a rootfs.\n");
......
......@@ -86,9 +86,6 @@ int main(int argc, char *argv[])
if (my_args.quiet)
quiet = true;
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
if (!quiet)
......
......@@ -123,9 +123,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
goto err;
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
fprintf(stderr, "%s doesn't exist\n", my_args.name);
......
......@@ -159,9 +159,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(EXIT_FAILURE);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
fprintf(stderr, "Failed to create lxc_container\n");
......
......@@ -73,9 +73,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(EXIT_FAILURE);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
fprintf(stderr, "No such container: %s:%s\n", my_args.lxcpath[0], my_args.name);
......
......@@ -409,9 +409,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(ret);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
if (print_info(my_args.name, my_args.lxcpath[0]) == 0)
ret = EXIT_SUCCESS;
......
......@@ -228,9 +228,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(EXIT_FAILURE);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
struct lengths max_len = {
/* default header length */
.name_length = 4, /* NAME */
......@@ -559,11 +556,6 @@ static int ls_get(struct ls **m, size_t *size, const struct lxc_arguments *args,
* problem with the ovl_mkdir() function in
* lxcoverlay.{c,h}. */
char *curr_path = ls_get_config_item(c, "lxc.rootfs.path", running);
/* REMOVE IN LXC 3.0
legacy rootfs key
*/
if (!curr_path)
curr_path = ls_get_config_item(c, "lxc.rootfs", running);
if (!curr_path)
goto put_and_next;
......
......@@ -521,9 +521,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(rc_main);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
if (quit_monitord) {
int ret = EXIT_SUCCESS;
for (i = 0; i < my_args.lxcpath_cnt; i++) {
......
......@@ -97,9 +97,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(EXIT_FAILURE);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
if (geteuid()) {
if (access(my_args.lxcpath[0], O_RDONLY) < 0) {
fprintf(stderr, "You lack access to %s\n",
......
......@@ -206,9 +206,6 @@ int main(int argc, char *argv[])
exit(err);
}
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
/*
* rcfile possibilities:
* 1. rcfile from random path specified in cli option
......
......@@ -114,9 +114,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(ret);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
/* Set default timeout */
if (my_args.timeout == -2) {
if (my_args.hardstop)
......
......@@ -74,9 +74,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(EXIT_FAILURE);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
fprintf(stderr, "No such container: %s:%s\n", my_args.lxcpath[0], my_args.name);
......
......@@ -100,9 +100,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(EXIT_FAILURE);
/* REMOVE IN LXC 3.0 */
setenv("LXC_UPDATE_CONFIG_FORMAT", "1", 0);
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c)
exit(EXIT_FAILURE);
......
......@@ -84,10 +84,8 @@ static void do_function(void *arguments)
return;
}
if (debug) {
if (debug)
c->set_config_item(c, "lxc.log.level", "DEBUG");
c->set_config_item(c, "lxc.log", name);
}
if (strcmp(args->mode, "create") == 0) {
if (!c->is_defined(c)) {
......
......@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
goto out;
}
c->set_config_item(c, "lxc.network.type", "veth");
c->set_config_item(c, "lxc.net.0.type", "veth");
len = c->get_keys(c, NULL, NULL, 0);
if (len < 0) {
......@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
}
printf("get_keys returned %d\n%s", ret, v3);
ret = c->get_keys(c, "lxc.network.0", v3, 2000);
ret = c->get_keys(c, "lxc.net.0", v3, 2000);
if (ret < 0) {
fprintf(stderr, "%d: failed to get nic 0 keys(%d)\n", __LINE__, ret);
ret = 1;
......
......@@ -498,10 +498,6 @@ void test_lxc_config_net_hwaddr(void)
if (!lxc_config_net_hwaddr("lxc.net.0.hwaddr = 00:16:3e:04:65:b8\n"))
exit(EXIT_FAILURE);
if (!lxc_config_net_hwaddr("lxc.network.hwaddr = 00:16:3e:04:65:b8\n"))
exit(EXIT_FAILURE);
if (!lxc_config_net_hwaddr("lxc.net.hwaddr = 00:16:3e:04:65:b8\n"))
exit(EXIT_FAILURE);
if (lxc_config_net_hwaddr("lxc.net"))
exit(EXIT_FAILURE);
......@@ -509,10 +505,6 @@ void test_lxc_config_net_hwaddr(void)
exit(EXIT_FAILURE);
if (lxc_config_net_hwaddr("lxc.net.0."))
exit(EXIT_FAILURE);
if (lxc_config_net_hwaddr("lxc.network"))
exit(EXIT_FAILURE);
if (lxc_config_net_hwaddr("lxc.network.0."))
exit(EXIT_FAILURE);
}
int main(int argc, char *argv[])
......
......@@ -171,11 +171,6 @@ static int set_invalid_netdev(struct lxc_container *c) {
return -1;
}
if (c->set_config_item(c, "lxc.network.0.", "veth")) {
lxc_error("%s\n", "lxc.network.0. should be invalid");
return -1;
}
c->clear_config(c);
c->lxc_conf = NULL;
......@@ -330,9 +325,9 @@ int main(int argc, char *argv[])
/* REMOVE IN LXC 3.0
legacy ps keys
*/
if (set_get_compare_clear_save_load(c, "lxc.pts", "1000", tmpf, true) <
if (set_get_compare_clear_save_load(c, "lxc.pty.max", "1000", tmpf, true) <
0) {
lxc_error("%s\n", "lxc.pts");
lxc_error("%s\n", "lxc.pty.max");
goto non_test_error;
}
......@@ -343,15 +338,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy tty.max keys
*/
if (set_get_compare_clear_save_load(c, "lxc.tty", "4", tmpf, true) <
0) {
lxc_error("%s\n", "lxc.tty");
goto non_test_error;
}
/* lxc.tty.max */
if (set_get_compare_clear_save_load(c, "lxc.tty.max", "4", tmpf, true) <
0) {
......@@ -359,15 +345,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy devttydir keys
*/
if (set_get_compare_clear_save_load(c, "lxc.devttydir", "not-dev", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.devttydir");
goto non_test_error;
}
/* lxc.tty.dir */
if (set_get_compare_clear_save_load(c, "lxc.tty.dir", "not-dev", tmpf,
true) < 0) {
......@@ -375,33 +352,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy security keys
*/
if (set_get_compare_clear_save_load(c, "lxc.aa_profile", "unconfined",
tmpf, true) < 0) {
lxc_error("%s\n", "lxc.aa_profile");
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy security keys
*/
if (set_get_compare_clear_save_load(c, "lxc.aa_allow_incomplete", "1",
tmpf, true) < 0) {
lxc_error("%s\n", "lxc.aa_allow_incomplete");
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy security keys
*/
if (set_get_compare_clear_save_load(c, "lxc.se_context", "system_u:system_r:lxc_t:s0:c22",
tmpf, true) < 0) {
lxc_error("%s\n", "lxc.se_context");
goto non_test_error;
}
/* lxc.apparmor.profile */
if (set_get_compare_clear_save_load(c, "lxc.apparmor.profile", "unconfined",
tmpf, true) < 0) {
......@@ -454,34 +404,6 @@ int main(int argc, char *argv[])
c->clear_config(c);
c->lxc_conf = NULL;
/* lxc.id_map
* We can't really save the config here since save_config() wants to
* chown the container's directory but we haven't created an on-disk
* container. So let's test set-get-clear.
*/
if (set_get_compare_clear_save_load(
c, "lxc.id_map", "u 0 100000 1000000000", NULL, false) < 0) {
lxc_error("%s\n", "lxc.id_map");
goto non_test_error;
}
if (!c->set_config_item(c, "lxc.id_map", "u 1 100000 10000000")) {
lxc_error("%s\n", "failed to set config item "
"\"lxc.id_map\" to \"u 1 100000 10000000\"");
return -1;
}
if (!c->set_config_item(c, "lxc.id_map", "g 1 100000 10000000")) {
lxc_error("%s\n", "failed to set config item "
"\"lxc.id_map\" to \"g 1 100000 10000000\"");
return -1;
}
if (!c->get_config_item(c, "lxc.id_map", retval, sizeof(retval))) {
lxc_error("%s\n", "failed to get config item \"lxc.id_map\"");
return -1;
}
/* lxc.idmap
* We can't really save the config here since save_config() wants to
* chown the container's directory but we haven't created an on-disk
......@@ -513,25 +435,6 @@ int main(int argc, char *argv[])
c->clear_config(c);
c->lxc_conf = NULL;
/* REMOVE IN LXC 3.0
legacy lxc.loglevel key
*/
if (set_get_compare_clear_save_load(c, "lxc.loglevel", "DEBUG", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.loglevel");
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.logfile key
*/
if (set_get_compare_clear_save_load(c, "lxc.logfile", "/some/path",
tmpf, true) < 0) {
lxc_error("%s\n", "lxc.logfile");
goto non_test_error;
}
/* lxc.log.level */
if (set_get_compare_clear_save_load(c, "lxc.log.level", "DEBUG", tmpf,
true) < 0) {
......@@ -546,15 +449,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.mount key
*/
if (set_get_compare_clear_save_load(c, "lxc.mount", "/some/path", NULL,
true) < 0) {
lxc_error("%s\n", "lxc.mount");
goto non_test_error;
}
/* lxc.mount.fstab */
if (set_get_compare_clear_save_load(c, "lxc.mount.fstab", "/some/path", NULL,
true) < 0) {
......@@ -585,15 +479,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.rootfs key
*/
if (set_get_compare_clear_save_load(c, "lxc.rootfs", "/some/path", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.rootfs");
goto non_test_error;
}
/* lxc.rootfs.path */
if (set_get_compare_clear_save_load(c, "lxc.rootfs.path", "/some/path", tmpf,
true) < 0) {
......@@ -615,15 +500,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.utsname key
*/
if (set_get_compare_clear_save_load(c, "lxc.utsname", "the-shire", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.utsname");
goto non_test_error;
}
/* lxc.uts.name */
if (set_get_compare_clear_save_load(c, "lxc.uts.name", "the-shire", tmpf,
true) < 0) {
......@@ -710,15 +586,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.console key
*/
if (set_get_compare_clear_save_load(c, "lxc.console", "none", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.console");
goto non_test_error;
}
/* lxc.console.path */
if (set_get_compare_clear_save_load(c, "lxc.console.path", "none", tmpf,
true) < 0) {
......@@ -733,15 +600,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy seccomp key
*/
if (set_get_compare_clear_save_load(
c, "lxc.seccomp", "/some/seccomp/file", tmpf, true) < 0) {
lxc_error("%s\n", "lxc.seccomp");
goto non_test_error;
}
/* lxc.seccomp.profile */
if (set_get_compare_clear_save_load(
c, "lxc.seccomp.profile", "/some/seccomp/file", tmpf, true) < 0) {
......@@ -756,15 +614,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.haltsignal key
*/
if (set_get_compare_clear_save_load(c, "lxc.haltsignal", "1", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.haltsignal");
goto non_test_error;
}
/* lxc.signal.halt */
if (set_get_compare_clear_save_load(c, "lxc.signal.halt", "1", tmpf,
true) < 0) {
......@@ -772,15 +621,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.rebootsignal key
*/
if (set_get_compare_clear_save_load(c, "lxc.rebootsignal", "1", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.rebootsignal");
goto non_test_error;
}
/* lxc.signal.reboot */
if (set_get_compare_clear_save_load(c, "lxc.signal.reboot", "1", tmpf,
true) < 0) {
......@@ -788,15 +628,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.stopsignal key
*/
if (set_get_compare_clear_save_load(c, "lxc.stopsignal", "1", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.stopsignal");
goto non_test_error;
}
/* lxc.signal.stop */
if (set_get_compare_clear_save_load(c, "lxc.signal.stop", "1", tmpf,
true) < 0) {
......@@ -832,13 +663,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* lxc.utsname */
if (set_get_compare_clear_save_load(c, "lxc.utsname", "get-schwifty",
tmpf, true) < 0) {
lxc_error("%s\n", "lxc.utsname");
goto non_test_error;
}
/* lxc.monitor.unshare */
if (set_get_compare_clear_save_load(c, "lxc.monitor.unshare", "1", tmpf,
true) < 0) {
......@@ -860,15 +684,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.init_cmd key
*/
if (set_get_compare_clear_save_load(c, "lxc.init_cmd", "/bin/bash",
tmpf, true) < 0) {
lxc_error("%s\n", "lxc.init_cmd");
goto non_test_error;
}
/* lxc.init.cmd */
if (set_get_compare_clear_save_load(c, "lxc.init.cmd", "/bin/bash",
tmpf, true) < 0) {
......@@ -876,15 +691,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.init_uid key
*/
if (set_get_compare_clear_save_load(c, "lxc.init_uid", "1000", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.init_uid");
goto non_test_error;
}
/* lxc.init.uid */
if (set_get_compare_clear_save_load(c, "lxc.init.uid", "1000", tmpf,
true) < 0) {
......@@ -892,15 +698,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.init_gid key
*/
if (set_get_compare_clear_save_load(c, "lxc.init_gid", "1000", tmpf,
true) < 0) {
lxc_error("%s\n", "lxc.init_gid");
goto non_test_error;
}
/* lxc.init.gid */
if (set_get_compare_clear_save_load(c, "lxc.init.gid", "1000", tmpf,
true) < 0) {
......@@ -936,15 +733,6 @@ int main(int argc, char *argv[])
goto non_test_error;
}
/* REMOVE IN LXC 3.0
legacy lxc.limit.* key
*/
if (set_get_compare_clear_save_load(c, "lxc.limit.nofile", "65536",
tmpf, true) < 0) {
lxc_error("%s\n", "lxc.limit.nofile");
goto non_test_error;
}
/* lxc.prlimit.nofile */
if (set_get_compare_clear_save_load(c, "lxc.prlimit.nofile", "65536",
tmpf, true) < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment