Remove "inverse parent" image name index key from etcd during snapshot merge

qemu-send-loop
Vitaliy Filippov 2023-06-30 01:23:28 +03:00
parent 8426616d89
commit 000e4944ec
1 changed files with 8 additions and 0 deletions

View File

@ -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 },