From: guce Date: Sat, 11 Jul 2015 06:08:33 +0000 (+0800) Subject: Fixes: #12286 radosgw-admin: after subuser modify print only once user info. X-Git-Tag: v0.94.3~17^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F5286%2Fhead;p=ceph.git Fixes: #12286 radosgw-admin: after subuser modify print only once user info. remove rgw_admin.cc OPT_SUBUSER_MODIFY, show_user_info code block. switch (opt_cmd) { ... case OPT_SUBUSER_MODIFY: show_user_info(info, formatter); //show first time (remove this) break; ... } // output the result of a user operation if (output_user_info) { ... show_user_info(info, formatter); //show second time } test fix: before: after subuser modify print twice user info. after changes, do the same procedure, print only once user info. Signed-off-by: guce guce@h3c.com (cherry picked from commit c604dd97fc179e5c2f640818c0f6e7cf99701947) --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index a7a00390c02b..6a1c20d982bd 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -1706,14 +1706,6 @@ int main(int argc, char **argv) return -ret; } - ret = user.info(info, &err_msg); - if (ret < 0) { - cerr << "could not fetch user info: " << err_msg << std::endl; - return -ret; - } - - show_user_info(info, formatter); - break; case OPT_SUBUSER_RM: ret = user.subusers.remove(user_op, &err_msg);