Implement safety check for OSD removal, translate all '-' to '_' in cli options

'-' to '_' translation fixes a bug with create --image_meta
This commit is contained in:
Vitaliy Filippov
2022-12-26 02:48:48 +03:00
parent 4ebdd02b0f
commit 2f3c2c5140
14 changed files with 214 additions and 34 deletions
+1 -1
View File
@@ -639,7 +639,7 @@ std::function<bool(cli_result_t &)> cli_tool_t::start_rm(json11::Json cfg)
snap_remover->parent = this;
snap_remover->from_name = cfg["from"].string_value();
snap_remover->to_name = cfg["to"].string_value();
snap_remover->fsync_interval = cfg["fsync-interval"].uint64_value();
snap_remover->fsync_interval = cfg["fsync_interval"].uint64_value();
if (!snap_remover->fsync_interval)
snap_remover->fsync_interval = 128;
if (!cfg["cas"].is_null())