Compiling cephadm into an single binary offers the ability to split the
code from cephadm up into several files/modules. A side effect of having
a `cephadm.py` file (which, by renaming to cephadm.py has already become
a module) is that it can properly be imported and static type checking
inside `src/cephadm/tests/test_cephadm.py` is not an issue anymore.
Next steps would to split up cephadm into several modules and adapting
the test_cephadm.py import mechanism, as well as fixing the typing
issues, which are revealed by using a proper important statement.
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This is necessary as iscsi daemons expect the iscsi-gateway.cfg
which includes this list to match across the iscsi daemons
Fixes: https://tracker.ceph.com/issues/57078
Signed-off-by: Adam King <adking@redhat.com>
mgr/cephadm: don't use "sudo" in commands if user is root
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Redouane Kachach <rkachach@redhat.com>
Previously, due to the way it was just splitting the file name on
dashes to try and get the profile name, any profile name with dashes
was not getting properly matched and would therefore get marked
stray and removed. This new strategy instead tries to match the actual
expected file name.
Fixes: https://tracker.ceph.com/issues/57405
Signed-off-by: Adam King <adking@redhat.com>
mgr/cephadm: Adding --storage.tsdb.retention.size prometheus option
Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
doc/monitoring: add min vers of apps in mon stack
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
We need to requeue the check if not enough time has elapsed, or
we'll stay stuck in the wait state.
Fixes: https://tracker.ceph.com/issues/57506
Introduced: 51cabbff7b
Signed-off-by: Samuel Just <sjust@redhat.com>
This was accidentally changed to "nfs"--which breaks various
ceph orchestration assumptions.
Found by Ernesto Puerta <epuertat@redhat.com>
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Mounting files with extra container args seems to not
work with some of the more intuitive syntaxes.
See https://tracker.ceph.com/issues/57338
Signed-off-by: Adam King <adking@redhat.com>
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>
This is mostly pointless, *except* that after a key rotation it ensures
that the new key is used immediately (and the pending_key is committed by
the mon).
Signed-off-by: Sage Weil <sage@newdream.net>