rgw: fix reading bucket policy in RGWBucket::get_policy()

Fixes: 6940
Backport: dumpling, emperor

We changed the way we keep the bucket policy, and we shouldn't try to
access the bucket object directly. This had changed when we added the
bucket instance object around dumpling.

Reported-by: Gao, Wei M <wei.m.gao@intel.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
osd: include peer_info in pg query

This can be very useful when diagnosing peering problems.

Signed-off-by: Sage Weil <sage@inktank.com>
osd/PG: move some pg stat update into a helper

When we publish PG stats to the monitor, we fill in a bunch of fields
with information about degraded objects, scrub timestamps, and other
sundry.

Move this into a helper that we will re-use shortly.

Note that we do *not* move anything that is semantically related to
the stats being published (like the 'reported' field).

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: update pg stat fields when they are queried

When we query a PG, fill in (most of) the same fields that get
populated when the stats are reported to the mon.

Fixes: #6988
Signed-off-by: Sage Weil <sage@inktank.com>
rgw: abstract RGWProcess

RGWProcess is a generic request handler that sends request to the
workqueue for processing.
Add RGWFCGXProcess specialization. Later we'll add a new frontend that
will leverage that.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: add some debug output

Dump request environment when starting processing request. We used to do
it before, but it was recently dropped as part of a cleanup.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Merge pull request #908 from ceph/wip-6940

rgw: fix reading bucket policy in RGWBucket::get_policy()

Reviewed-by: Sage Weil <sage@inktank.com>
autoconf: trim duplicated headers

And sort the header list to help maintain uniqueness.

Signed-off-by: Loic Dachary <loic@dachary.org>
v0.74
Fix typos in erasure code documents

Signed-off-by: Kun Huang <academicgareth@gmail.com>
mon: set CINIT_FLAG_NO_DAEMON_ACTIONS when appropriate

--mkfs, --inject_monmap and --extract-monmap are no daemon actions.

Signed-off-by: Loic Dachary <loic@dachary.org>
mon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS

Signed-off-by: Loic Dachary <loic@dachary.org>
mon: fix indentation

Signed-off-by: Loic Dachary <loic@dachary.org>
mon: add flags argument to common_init_finish

It is the same flag that is given to common_preinit. The service thread
is not initialized if CINIT_FLAG_NO_DAEMON_ACTIONS is set.

Signed-off-by: Loic Dachary <loic@dachary.org>
librbd: better error when unprotect fails on unprotected snap

This will show up on the command line and logs, making it more
clear than EINVAL.

Fixes #6851 and #4045
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
rbd: return 0 and an empty list when pool is entirely empty

rbd_list will return -ENOENT when no rbd_directory object
exists. Handle this in the cli tool and interpret it as success with
an empty list.

Add this to the release notes since it changes command line behavior.

Fixes: #6693
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #1011 from dachary/wip-mon-daemonize

do not daemonize ceph-mon when not necessary

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
osd/ReplicatedPG: improve debug output from check_local

This will help with #6685

Signed-off-by: Sage Weil <sage@inktank.com>
mds: always store backtrace xattr in the default pool

when creating file in non-default pool, we need to store a backtrace
in the default pool in addition to the specified pool. Otherwise the
'lookup-by-ino' function will consider backtrace for file is missing.

Fixes: #6914
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: don't allow changing layout for non-regular file

layout is meaningless for non-regular file. using non-default layout
may make backtrace less efficiency.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>