]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/cephadm: execute conf update when rotating secret
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 18 Aug 2022 11:02:41 +0000 (11:02 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 12 Sep 2022 17:03:32 +0000 (17:03 +0000)
commite9b96417a19cf95857ca9ff97b87bca30e1f30ca
treef5bc234bd4ae471b1630cf1aa0b2392e4e9b78c5
parent708e5e84076b55a2bd8b0d46e48b0d984954cc3f
mgr/cephadm: execute conf update when rotating secret

This is a fixup for: mgr/cephadm: add daemon 'rotate-key' action

The way we rotate mgr's secret require:

1) writing the new pending-key to mgr's file,
2) restarting the mgr via the `mgr fail` mon command.

Unfortunately, we might be doing the first step wrongly.
`_create_daemoan()` is a coroutine (Python's `async def`)
while we don't `wait` for it. IIUC the underlying doc
correctly, this has no effect, and thus the mgr is restarted
with old key.

  "Note that simply calling a coroutine will not schedule
  it to be executed"

See: https://docs.python.org/3/library/asyncio-task.html#id1

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/pybind/mgr/cephadm/module.py