From: Yehuda Sadeh Date: Tue, 1 Apr 2014 22:43:52 +0000 (-0700) Subject: rgw: subuser creation can be idempotent X-Git-Tag: v0.80-rc1~58^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e1783a62d827ccecdc83e73590bf74bb1af8271c;p=ceph.git rgw: subuser creation can be idempotent No real reason to check for existing subuser before (re)creating it. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index 7019b383cfb..a4c56dc7647 100644 --- a/src/rgw/rgw_user.cc +++ b/src/rgw/rgw_user.cc @@ -1183,12 +1183,6 @@ int RGWSubUserPool::execute_add(RGWUserAdminOpState& op_state, subuser_pair.first = subuser_str; - // no duplicates - if (op_state.has_existing_subuser()) { - set_err_msg(err_msg, "subuser exists"); - return -EEXIST; - } - // assumes key should be created if (op_state.has_key_op()) { ret = user->keys.add(op_state, &subprocess_msg, true);