From 12740336b315fdaccff8394d6e8538e951ad6764 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 29 Jul 2020 00:13:27 +0100 Subject: [PATCH] uxc: fix create operation The 'create' operation needs uxc to reload it's configuration, so after adding the container to uxc' persistent state tracking the follow-up call to create the run-time can find it. Signed-off-by: Daniel Golle --- uxc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/uxc.c b/uxc.c index d43ac3e..5d06aa1 100644 --- a/uxc.c +++ b/uxc.c @@ -637,6 +637,12 @@ errout: return ret; } +static void reload_conf(void) +{ + blob_buf_free(&conf); + conf_load(false); +} + int main(int argc, char **argv) { int ret = EINVAL; @@ -718,8 +724,9 @@ int main(int argc, char **argv) ret = uxc_set(argv[2], argv[3], autostart, true); if (ret) goto runtime_out; - } + reload_conf(); + } ret = uxc_create(argv[2], false); } else goto usage_out; -- 2.30.2