diff -Nru ceph-15.2.8/debian/changelog ceph-15.2.8/debian/changelog --- ceph-15.2.8/debian/changelog 2021-02-04 11:18:13.000000000 +0000 +++ ceph-15.2.8/debian/changelog 2021-04-09 13:39:25.000000000 +0000 @@ -1,3 +1,10 @@ +ceph (15.2.8-0ubuntu0.20.10.2) UNRELEASED; urgency=medium + + * d/p/bug1914584.patch: Improve rgw diagnostic when reusing email + (LP: #1914584) + + -- Ponnuvel Palaniyappan Fri, 09 Apr 2021 14:39:25 +0100 + ceph (15.2.8-0ubuntu0.20.10.1) groovy; urgency=medium [ Chris MacNaughton ] diff -Nru ceph-15.2.8/debian/patches/bug1914584.patch ceph-15.2.8/debian/patches/bug1914584.patch --- ceph-15.2.8/debian/patches/bug1914584.patch 1970-01-01 00:00:00.000000000 +0000 +++ ceph-15.2.8/debian/patches/bug1914584.patch 2021-04-09 13:39:20.000000000 +0000 @@ -0,0 +1,30 @@ +Description: Improve diagnostic when reusing email + The error message if you try and create an S3 user with + an email address that is already associated with another + S3 account is very confusing. +Author: Ponnuvel Palaniyappan, pponnuvel@gmail.com +Origin: upstream, https://github.com/ceph/ceph/pull/39293 +Bug: https://tracker.ceph.com/issues/49137 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1914584 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: ceph-15.2.8/src/rgw/rgw_user.cc +=================================================================== +--- ceph-15.2.8.orig/src/rgw/rgw_user.cc ++++ ceph-15.2.8/src/rgw/rgw_user.cc +@@ -2096,7 +2096,14 @@ int RGWUser::modify(RGWUserAdminOpState& + + ret = check_op(op_state, &subprocess_msg); + if (ret < 0) { +- set_err_msg(err_msg, "unable to parse parameters, " + subprocess_msg); ++ if (is_populated() && (user_id.compare(op_state.get_user_id()) != 0)) { ++ set_err_msg(err_msg, "unable to create user " + user_id.to_str() ++ + " because user id " + op_state.get_user_id().to_str() ++ + " already exists with email " ++ + op_state.get_user_email()); ++ } else { ++ set_err_msg(err_msg, "unable to parse parameters, " + subprocess_msg); ++ } + return ret; + } + diff -Nru ceph-15.2.8/debian/patches/series ceph-15.2.8/debian/patches/series --- ceph-15.2.8/debian/patches/series 2021-02-04 11:18:13.000000000 +0000 +++ ceph-15.2.8/debian/patches/series 2021-04-09 13:37:59.000000000 +0000 @@ -12,3 +12,4 @@ riscv64-link-pthread.patch bug1911900-fix-scrub-blocking-balancer.patch disable-log-slow-requests.patch +bug1914584.patch diff -Nru ceph-15.2.8/src/test/debian-jessie/debian/changelog ceph-15.2.8/src/test/debian-jessie/debian/changelog --- ceph-15.2.8/src/test/debian-jessie/debian/changelog 2021-02-04 11:18:13.000000000 +0000 +++ ceph-15.2.8/src/test/debian-jessie/debian/changelog 2021-04-09 13:39:25.000000000 +0000 @@ -1,3 +1,10 @@ +ceph (15.2.8-0ubuntu0.20.10.2) UNRELEASED; urgency=medium + + * d/p/bug1914584.patch: Improve rgw diagnostic when reusing email + (LP: #1914584) + + -- Ponnuvel Palaniyappan Fri, 09 Apr 2021 14:39:25 +0100 + ceph (15.2.8-0ubuntu0.20.10.1) groovy; urgency=medium [ Chris MacNaughton ] diff -Nru ceph-15.2.8/src/test/debian-jessie/debian/patches/bug1914584.patch ceph-15.2.8/src/test/debian-jessie/debian/patches/bug1914584.patch --- ceph-15.2.8/src/test/debian-jessie/debian/patches/bug1914584.patch 1970-01-01 00:00:00.000000000 +0000 +++ ceph-15.2.8/src/test/debian-jessie/debian/patches/bug1914584.patch 2021-04-09 13:39:20.000000000 +0000 @@ -0,0 +1,30 @@ +Description: Improve diagnostic when reusing email + The error message if you try and create an S3 user with + an email address that is already associated with another + S3 account is very confusing. +Author: Ponnuvel Palaniyappan, pponnuvel@gmail.com +Origin: upstream, https://github.com/ceph/ceph/pull/39293 +Bug: https://tracker.ceph.com/issues/49137 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1914584 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: ceph-15.2.8/src/rgw/rgw_user.cc +=================================================================== +--- ceph-15.2.8.orig/src/rgw/rgw_user.cc ++++ ceph-15.2.8/src/rgw/rgw_user.cc +@@ -2096,7 +2096,14 @@ int RGWUser::modify(RGWUserAdminOpState& + + ret = check_op(op_state, &subprocess_msg); + if (ret < 0) { +- set_err_msg(err_msg, "unable to parse parameters, " + subprocess_msg); ++ if (is_populated() && (user_id.compare(op_state.get_user_id()) != 0)) { ++ set_err_msg(err_msg, "unable to create user " + user_id.to_str() ++ + " because user id " + op_state.get_user_id().to_str() ++ + " already exists with email " ++ + op_state.get_user_email()); ++ } else { ++ set_err_msg(err_msg, "unable to parse parameters, " + subprocess_msg); ++ } + return ret; + } + diff -Nru ceph-15.2.8/src/test/debian-jessie/debian/patches/series ceph-15.2.8/src/test/debian-jessie/debian/patches/series --- ceph-15.2.8/src/test/debian-jessie/debian/patches/series 2021-02-04 11:18:13.000000000 +0000 +++ ceph-15.2.8/src/test/debian-jessie/debian/patches/series 2021-04-09 13:37:59.000000000 +0000 @@ -12,3 +12,4 @@ riscv64-link-pthread.patch bug1911900-fix-scrub-blocking-balancer.patch disable-log-slow-requests.patch +bug1914584.patch diff -Nru ceph-15.2.8/src/test/ubuntu-16.04/debian/changelog ceph-15.2.8/src/test/ubuntu-16.04/debian/changelog --- ceph-15.2.8/src/test/ubuntu-16.04/debian/changelog 2021-02-04 11:18:13.000000000 +0000 +++ ceph-15.2.8/src/test/ubuntu-16.04/debian/changelog 2021-04-09 13:39:25.000000000 +0000 @@ -1,3 +1,10 @@ +ceph (15.2.8-0ubuntu0.20.10.2) UNRELEASED; urgency=medium + + * d/p/bug1914584.patch: Improve rgw diagnostic when reusing email + (LP: #1914584) + + -- Ponnuvel Palaniyappan Fri, 09 Apr 2021 14:39:25 +0100 + ceph (15.2.8-0ubuntu0.20.10.1) groovy; urgency=medium [ Chris MacNaughton ] diff -Nru ceph-15.2.8/src/test/ubuntu-16.04/debian/patches/bug1914584.patch ceph-15.2.8/src/test/ubuntu-16.04/debian/patches/bug1914584.patch --- ceph-15.2.8/src/test/ubuntu-16.04/debian/patches/bug1914584.patch 1970-01-01 00:00:00.000000000 +0000 +++ ceph-15.2.8/src/test/ubuntu-16.04/debian/patches/bug1914584.patch 2021-04-09 13:39:20.000000000 +0000 @@ -0,0 +1,30 @@ +Description: Improve diagnostic when reusing email + The error message if you try and create an S3 user with + an email address that is already associated with another + S3 account is very confusing. +Author: Ponnuvel Palaniyappan, pponnuvel@gmail.com +Origin: upstream, https://github.com/ceph/ceph/pull/39293 +Bug: https://tracker.ceph.com/issues/49137 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1914584 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: ceph-15.2.8/src/rgw/rgw_user.cc +=================================================================== +--- ceph-15.2.8.orig/src/rgw/rgw_user.cc ++++ ceph-15.2.8/src/rgw/rgw_user.cc +@@ -2096,7 +2096,14 @@ int RGWUser::modify(RGWUserAdminOpState& + + ret = check_op(op_state, &subprocess_msg); + if (ret < 0) { +- set_err_msg(err_msg, "unable to parse parameters, " + subprocess_msg); ++ if (is_populated() && (user_id.compare(op_state.get_user_id()) != 0)) { ++ set_err_msg(err_msg, "unable to create user " + user_id.to_str() ++ + " because user id " + op_state.get_user_id().to_str() ++ + " already exists with email " ++ + op_state.get_user_email()); ++ } else { ++ set_err_msg(err_msg, "unable to parse parameters, " + subprocess_msg); ++ } + return ret; + } + diff -Nru ceph-15.2.8/src/test/ubuntu-16.04/debian/patches/series ceph-15.2.8/src/test/ubuntu-16.04/debian/patches/series --- ceph-15.2.8/src/test/ubuntu-16.04/debian/patches/series 2021-02-04 11:18:13.000000000 +0000 +++ ceph-15.2.8/src/test/ubuntu-16.04/debian/patches/series 2021-04-09 13:37:59.000000000 +0000 @@ -12,3 +12,4 @@ riscv64-link-pthread.patch bug1911900-fix-scrub-blocking-balancer.patch disable-log-slow-requests.patch +bug1914584.patch diff -Nru ceph-15.2.8/src/test/ubuntu-18.04/debian/changelog ceph-15.2.8/src/test/ubuntu-18.04/debian/changelog --- ceph-15.2.8/src/test/ubuntu-18.04/debian/changelog 2021-02-04 11:18:13.000000000 +0000 +++ ceph-15.2.8/src/test/ubuntu-18.04/debian/changelog 2021-04-09 13:39:25.000000000 +0000 @@ -1,3 +1,10 @@ +ceph (15.2.8-0ubuntu0.20.10.2) UNRELEASED; urgency=medium + + * d/p/bug1914584.patch: Improve rgw diagnostic when reusing email + (LP: #1914584) + + -- Ponnuvel Palaniyappan Fri, 09 Apr 2021 14:39:25 +0100 + ceph (15.2.8-0ubuntu0.20.10.1) groovy; urgency=medium [ Chris MacNaughton ] diff -Nru ceph-15.2.8/src/test/ubuntu-18.04/debian/patches/bug1914584.patch ceph-15.2.8/src/test/ubuntu-18.04/debian/patches/bug1914584.patch --- ceph-15.2.8/src/test/ubuntu-18.04/debian/patches/bug1914584.patch 1970-01-01 00:00:00.000000000 +0000 +++ ceph-15.2.8/src/test/ubuntu-18.04/debian/patches/bug1914584.patch 2021-04-09 13:39:20.000000000 +0000 @@ -0,0 +1,30 @@ +Description: Improve diagnostic when reusing email + The error message if you try and create an S3 user with + an email address that is already associated with another + S3 account is very confusing. +Author: Ponnuvel Palaniyappan, pponnuvel@gmail.com +Origin: upstream, https://github.com/ceph/ceph/pull/39293 +Bug: https://tracker.ceph.com/issues/49137 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1914584 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: ceph-15.2.8/src/rgw/rgw_user.cc +=================================================================== +--- ceph-15.2.8.orig/src/rgw/rgw_user.cc ++++ ceph-15.2.8/src/rgw/rgw_user.cc +@@ -2096,7 +2096,14 @@ int RGWUser::modify(RGWUserAdminOpState& + + ret = check_op(op_state, &subprocess_msg); + if (ret < 0) { +- set_err_msg(err_msg, "unable to parse parameters, " + subprocess_msg); ++ if (is_populated() && (user_id.compare(op_state.get_user_id()) != 0)) { ++ set_err_msg(err_msg, "unable to create user " + user_id.to_str() ++ + " because user id " + op_state.get_user_id().to_str() ++ + " already exists with email " ++ + op_state.get_user_email()); ++ } else { ++ set_err_msg(err_msg, "unable to parse parameters, " + subprocess_msg); ++ } + return ret; + } + diff -Nru ceph-15.2.8/src/test/ubuntu-18.04/debian/patches/series ceph-15.2.8/src/test/ubuntu-18.04/debian/patches/series --- ceph-15.2.8/src/test/ubuntu-18.04/debian/patches/series 2021-02-04 11:18:13.000000000 +0000 +++ ceph-15.2.8/src/test/ubuntu-18.04/debian/patches/series 2021-04-09 13:37:59.000000000 +0000 @@ -12,3 +12,4 @@ riscv64-link-pthread.patch bug1911900-fix-scrub-blocking-balancer.patch disable-log-slow-requests.patch +bug1914584.patch