]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: fix new_key for swift users.
authorShilpa Jagannath <smanjara@redhat.com>
Thu, 23 Oct 2025 22:13:44 +0000 (18:13 -0400)
committerShilpa Jagannath <smanjara@redhat.com>
Fri, 24 Oct 2025 17:21:36 +0000 (13:21 -0400)
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
(cherry picked from commit 34907631f25f8e7c56be30aa73afb4978056c759)
resolves rhbz#2403487

src/rgw/driver/rados/rgw_user.cc

index dba2276623a516ead5ad41d75ed3805ffcbefdad..7329fd9f83c9b7f482446b077abaca6ee62ba87b 100644 (file)
@@ -627,6 +627,8 @@ int RGWAccessKeyPool::generate_key(const DoutPrefixProvider *dpp, RGWUserAdminOp
   }
 
   // finally create the new key
+  new_key.id = id;
+  new_key.key = key;
 
   if (op_state.create_date) {
     new_key.create_date = *op_state.create_date;
@@ -640,8 +642,6 @@ int RGWAccessKeyPool::generate_key(const DoutPrefixProvider *dpp, RGWUserAdminOp
       new_key = op_state.op_master_key;
       access_keys->emplace(new_key.id, new_key);
     } else {
-      new_key.id = id;
-      new_key.key = key;
       access_keys->emplace(id, new_key);
       op_state.op_master_key = new_key;
     }