]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/AuthMonitor: generate bootstrap-mgr key on upgrade 16395/head
authorJoao Eduardo Luis <joao@suse.de>
Tue, 18 Jul 2017 14:38:15 +0000 (15:38 +0100)
committerJoao Eduardo Luis <joao@suse.de>
Tue, 18 Jul 2017 15:34:23 +0000 (16:34 +0100)
We were adding the entity, but no key. By generating a key, we avoid
making things really weird.

Fixes: http://tracker.ceph.com/issues/20666
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
src/mon/AuthMonitor.cc

index e6473c5e41769b57fe4ca2c5d0748bbad1c1bcd3..3f82f4e33fe37da4299d4df958c3624a84326f62 100644 (file)
@@ -1463,6 +1463,8 @@ void AuthMonitor::upgrade_format()
       assert(r);
       ::encode("allow profile bootstrap-mgr", auth_inc.auth.caps["mon"]);
       auth_inc.op = KeyServerData::AUTH_INC_ADD;
+      // generate key
+      auth_inc.auth.key.create(g_ceph_context, CEPH_CRYPTO_AES);
       push_cephx_inc(auth_inc);
     }
     changed = true;