PG: always clear_primary_state when leaving Primary

Otherwise, entries from the log collection process might leak into the next
epoch, where we might end up choosing a different authoritative log.  In this
case, it resulted in us not rolling back to log entries on one of the replicas
prior to trying to recover from an affected object due to the peer_missing not
being cleared.

Fixes: #10059
Backport: giant, firefly, dumpling
Signed-off-by: Samuel Just <sjust@redhat.com>
PG: always clear_primary_state on new interval, but only clear pg temp if not primary

Signed-off-by: Samuel Just <sjust@redhat.com>
ReplicatedPG: fail a non-blocking flush if the object is being scrubbed

Fixes: #8011
Backport: firefly, giant
Signed-off-by: Samuel Just <sjust@redhat.com>
ReplicatedPG::scan_range: an object can disappear between the list and the attr get

The first item in the range is often last_backfill, upon which writes
can be occuring.  It's trimmed off on the primary side anyway.

Fixes: 10150
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sjust@redhat.com>
PGLog: include rollback_info_trimmed_to in (read|write)_log

Fixes: #10157
Backport: firefly, giant
Signed-off-by: Samuel Just <sjust@redhat.com>
check endpoints is not empty before use it.

Signed-off-by: VRan Liu <gliuwr@gmail.com>
common: admin sock output XML elements whitespace

Replace white space with underscore in XML elements displayed from admin
socket commands. <config get>...</config get> becomes
<config_get>...</config_get>

http://tracker.ceph.com/issues/10199 Fixes: #10199

Signed-off-by: Loic Dachary <ldachary@redhat.com>
heap_profiler: support new gperftools header locations

The google/ headers location has been deprecated as of gperftools 2.0.
As of gperftools 2.2rc, the google/ headers will now give deprecation
warnings, and they will probably disappear in a future gperftools
update.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
MDSMonitor.cc: fix assertion caused by MDSMap::STATE_DNE state

Signed-off-by: Yan, Zheng <zyan@redhat.com>
rgw: run radosgw as apache with systemd

Same as sysv.

http://tracker.ceph.com/issues/10125 Fixes: #10125

Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #3059 from dachary/wip-10125-radosgw-init

rgw: run radosgw as apache with systemd

Reviewed-by: Sage Weil <sage@redhat.com>
librados: Fix rados include problem reported by "sponce"

Caused by a03f85a8e7fab296ea2df70a929a1c5e4aa0f7fb

Signed-off-by: David Zafman <dzafman@redhat.com>
Merge pull request #3084 from ceph/wip-rados-include

librados: Fix rados include problem reported by "sponce"

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #3072 from ceph/wip-10231-gperftools-location

heap_profiler: support new gperftools header locations

gitbuilders are happy

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #3076 from ceph/wip-mon-mdsdne

MDSMonitor.cc: fix assertion caused by MDSMap::STATE_DNE state

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
rados.py: fix misnamed 'wait_*' routines, add true wait/wait-with-cb

Also modify aio_read test for wait: write an object, take its active set
down, try to aio_read; verify read doesn't complete until active set is
allowed back up

Fixes: #10104
Signed-off-by: Dan Mick <dan.mick@redhat.com>
pybind/test_rados: add test for wait_for_complete_and_cb()

Also, factor out some common code between the two tests

Signed-off-by: Dan Mick <dan.mick@redhat.com>
Merge pull request #2985 from CzBiX/quick-fix

rgw: check endpoints is not empty before use it.

This fixes a regression due to commit 3c4b782bcb5460523982a04b1e5c7963e08a1687

Reported-by: Mykola Golub <to.my.trociny@gmail.com>
Merge pull request #2959 from ceph/wip-10104

rados.py: fix misnamed 'wait_*' routines, add true wait/wait-with-cb

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Merge pull request #3031 from dachary/wip-10199-config-get-xml

common: admin sock output XML elements whitespace

Reviewed-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.com>