wait_for_image_replay_stopped returns not when the state is stopped,
but when the state is not replaying. So a race was possible when an
asok command was running when the previos stop command was still in
progress, leading to unexpected results.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
This is enforced for compressed and non-compressed blobs alike.
We keep the separate compressoin min and max tunables since these
may be adjusted on a per-pool basis as well.
Signed-off-by: Sage Weil <sage@redhat.com>
We use this to track raw extents on disk for SharedBlob. We
also use it for the in-memory Blob with the blob namespace, but
using uint64_t intead of uint32_t doesn't hurt us there.
Signed-off-by: Sage Weil <sage@redhat.com>
This is useful for ceph-mgr because it means that
any in-mgr modules that want to use e.g. rbd
can find it when running in a vstart cluster.
Signed-off-by: John Spray <john.spray@redhat.com>
...at least, try to! This is a copy-paste of the ceph-mds
packaging with a search and replace mds to mgr.
Signed-off-by: John Spray <john.spray@redhat.com>
This is a hack to inject a key for the mgr daemon, using whatever
key already exists on the mon on this node to gain sufficient
permissions to create the mgr key. Failure is ignored at every
step (the '-' prefix) in case someone has already used some other
trick to set everything up manually.
Signed-off-by: Tim Serong <tserong@suse.com>
This change introduces the following behaviour:
- When ceph-mon starts, it will try to start ceph-mgr with the same
instance id (Wants=), but will *not* fail to start if ceph-mgr
doesn't start (i.e. the mon still works as it always did).
- ceph-mgr will start After= ceph-mon, and will stop and start when
ceph-mon stops and starts, because it's PartOf= ceph-mon.
If you don't want ceph-mgr to run on the mons, you need to mask the
service, i.e. `systemctl mask ceph-mgr@INSTANCE`. Hostnames are
typically instance names, so `systemctl mask ceph-mgr@$(hostname)`
should suffice if you wish to disable ceph-mgr on the mons.
Signed-off-by: Tim Serong <tserong@suse.com>
This adds ceph-mgr following the same pattern used for ceph-mon,
ceph-mds, ceph-osd. I've removed the boost-python BuildRequire
for SUSE distros, because we don't ship that (the relevant bits
are already included in boost-devel).
NOTE: This gives an installable ceph-mgr, but not necessarily a
runnable ceph-mgr. This is because ceph-mgr needs the following
python packages:
- CherryPy
- Django
- gevent
- python-dateutil
- djangorestframework
Not all of these are available as distro packages. For example,
on openSUSE Tumbleweed, we don't have djangorestframework available
in the base distro, and our Django version is 1.9, which seems to
be incompatible with ceph-mgr. I'm not sure of the situation on
other distros.
Signed-off-by: Tim Serong <tserong@suse.com>
...and change the "if False" django-rest-framework
conditionals to actual version checks, with a view
to genuinely supporting 2.x in future if needed.
Signed-off-by: John Spray <john.spray@redhat.com>
This broken when MgrStandby was separated out,
because it now eats the original OSDMap message
without calling maybe_request_map.
Signed-off-by: John Spray <john.spray@redhat.com>