tools: Fix ceph_filestore_dump usage again

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Add assert() on collection_getattr() failure instead of later decode crash

Signed-off-by: David Zafman <david.zafman@inktank.com>
common: Fix get_namespace() definition in hobject_t

Signed-off-by: David Zafman <david.zafman@inktank.com>
os: Fix typo in comment

Signed-off-by: David Zafman <david.zafman@inktank.com>
os: Code conformance of os/LFNIndex.cc

Signed-off-by: David Zafman <david.zafman@inktank.com>
os: Prior version bump should have updated this

Version available as argument, so use instead of constant

Caused by dab238b0fb76b76a8843f4e59319b0f0e4f966a2

Signed-off-by: David Zafman <david.zafman@inktank.com>
os, ceph_osd: Rename on_disk_version to target_version

Signed-off-by: David Zafman <david.zafman@inktank.com>
qa/workunits/mon/crush_ops.sh: fix test

Fix root.

Fixes: #6392
Signed-off-by: Sage Weil <sage@inktank.com>
mds/Server: fix LOOKUPSNAP

The current LOOKUPSNAP code path was dereferencing mdr->dn[0] and getting
SEGV.  Instead, set the do_lookup arg to false for getattr so that we do
not try to dereference this; for snaps it will always be NULL as we are
constructing a fake namespace for the .snap directory.  (This happens in
the path_traverse, the result of which is to set snapid--without any real
dentry).

With this fix, snaptest-0.sh passes.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Context: add GenContext templated on the callback argument

Signed-off-by: Samuel Just <sam.just@inktank.com>
common/crc32c_intel_fast: fix compile-time #ifdef

This wasn't getting built in!

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 3233336cc3b6c2c1e89fe6c6d21d42e0f2cce142)
mds: properly return log replay error

The only context that should see this is
C_MDS_BootStart, and it is prepared for failures,
so there's no reason to always return 0.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
MDS: lock out snapshots until after a flag has been set in the MDSMap

This way users can't put snapshots on their clusters unless they explicitly
ask for them and have seen a warning message. We take a bit of the MDSMap
flags in order to do so. The only thing a little weird here is that anybody
who upgrades to this patch who already has snapshots will hit the EPERM
and have to go through the warning, but it doesn't impact existing snapshots
at all so they should be good.

To go along with this, we add "ever_allowed_snaps" and "explicitly_allowed_snaps"
members to the MDSMap, which are default to false and are set to true
when allow_new_snaps is set. Old maps decoded with new code default to true
and false, respectively, so we can tell.

Fixes: #6332

Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
qa: update snaps workunits for allow_new_snaps flag

Test that it works in snaptest-0.sh, and set the flag in
all the snap workunits so they continue to function.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
reverse the order of the mons in the init script when stopping

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
msg/msg_types: use proper NI_MAXSERV when formatting an IP address

May as well be pedantic about it, even though we are leaving the port
in numeric form.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
do not quote the variable to loop over

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
Merge remote-tracking branch 'gh/next'
mon: don't list "--yes-i-really-mean-it" options as required

By default options are required, and that leads to the Ceph CLI making
users add this to their commands before even submitting it to the monitor. We
want them to see and think about the messages generated by the monitor!

Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #606 from ceph/wip-6332

Reviewed-by: Sage Weil <sage@inktank.com>