From a657ec2f3f340a6218a6ed9385b49ff0c0236a46 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 3 Dec 2019 09:31:56 -0800 Subject: [PATCH] rgw-admin: fix use of opt_storage_class Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_admin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 45240f16ef9d2..a1b44bf5665ae 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -5268,7 +5268,7 @@ int main(int argc, const char **argv) return EINVAL; } - string storage_class = rgw_placement_rule::get_canonical_storage_class(storage_class); + string storage_class = rgw_placement_rule::get_canonical_storage_class(opt_storage_class.value_or(string())); if (ptiter->second.storage_classes.find(storage_class) == ptiter->second.storage_classes.end()) { cerr << "ERROR: storage class '" << storage_class << "' is not defined in zonegroup '" << placement_id << "' placement target" << std::endl; return EINVAL; -- 2.39.5