From 000e4944ecf8d58d1ae11e5455a1d248877b015b Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Fri, 30 Jun 2023 01:23:28 +0300 Subject: [PATCH] Remove "inverse parent" image name index key from etcd during snapshot merge --- src/cli_rm.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cli_rm.cpp b/src/cli_rm.cpp index ca5f7b04..c3ae90de 100644 --- a/src/cli_rm.cpp +++ b/src/cli_rm.cpp @@ -437,6 +437,9 @@ resume_100: "/config/inode/"+std::to_string(INODE_POOL(inverse_parent))+ "/"+std::to_string(INODE_NO_POOL(inverse_parent)) ); + std::string target_idx_key = base64_encode( + parent->cli->st_cli.etcd_prefix+"/index/image/"+target_name + ); // Fill new configuration inode_config_t new_cfg = *child_cfg; new_cfg.num = target_cfg->num; @@ -461,6 +464,11 @@ resume_100: { "key", child_cfg_key }, } }, }, + json11::Json::object { + { "request_delete_range", json11::Json::object { + { "key", target_idx_key }, + } }, + }, json11::Json::object { { "request_put", json11::Json::object { { "key", target_cfg_key },