Fix size of network protocol intergers.

This fixes the size of some integers that are visible in the network
protocol.  There should be no change for machines where sizeof(int) ==
4.

Signed-Of-By: Kevin Cox <kevincox@kevincox.ca>
mon/MDSMonitor: make legacy 'newfs' command idempotent

We need to return success if we get a dup command.  Simply check whether
the fs is already enabled with the same pools and name.

Fixes: #8857
Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/cephtool/test.sh: test osd pool get erasure_code_profile

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #2113 from ceph/wip-8857

mon/MDSMonitor: make legacy 'newfs' command idempotent

Reviewed-by: John Spray <john.spray@redhat.com>
qa/workunits/cephtool/test.sh: fix erasure_code_profile get test

I broke this in ce9f12d7a2202948532fed9da4d763ed03f6b8fa (the pool isn't
type erasure).

Signed-off-by: Sage Weil <sage@redhat.com>
doc: Add Note about European mirror in Quick Start
AUTHORS

Signed-off-by: Sage Weil <sage@inktank.com>
mon/MDSMonitor: fix msg on idempotent `fs rm`

Was outputting trailing "unrecognised command"
because we returned 0 instead of setting r=0.

Signed-off-by: John Spray <john.spray@redhat.com>
mon: carry last_failure_osd_epoch across `fs new`

So that new MDSs in a new filesystem are guaranteed
to be up to date with anything we blacklisted
from a filesystem coming before.

Signed-off-by: John Spray <john.spray@redhat.com>
qa: generalise cephtool for vstart+MDS

Previously this test assumed no pre-existing
filesystem and no MDS running.  Generalize it
to nuke any existing filesystems found before
running, so that you can use it inside a vstart
cluster that had MDS>0.

Signed-off-by: John Spray <john.spray@redhat.com>
Merge pull request #2108 from kevincox/sizeint

Fix size of network protocol intergers.

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #2119 from ceph/wip-vstart-existing-mds

Wip vstart existing mds

Reviewed-by: Sage Weil <sage@redhat.com>
test: add a missing semicolon

Broke in df8f48628.

Signed-off-by: John Spray <john.spray@redhat.com>
osdc/Journaler: validate header on load and save

Previously if the journal header contained invalid
write, expire or trimmed offsets, we would end up
hitting a hard-to-understand assertion much later.

Instead, raise the error right away if the fields
are identifiably bad at load time, and assert that
they're valid before persisting them.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: fix journal reformat failure in standbyreplay

In the 0.82 release, standbyreplay MDS daemons would try
to reformat the jouranl if they saw an older version on
disk, where this should have only been done by the active
MDS for the rank.  Depending on timing, this could cause
fatal corruption of the journal.

This change handles the following cases:
* only do reformat if not in standbyreplay (else raise EAGAIN
to keep trying til an active mds reformats it)
* if journal header goes away while in standbyreplay then raise
EAGAIN (handle rewrite happening in background)
* if journal version is greater than the max supported, suicide

Fixes: #8811

Signed-off-by: John Spray <john.spray@redhat.com>
doc: fix example s/inspect/journal inspect/

Signed-off-by: John Spray <john.spray@redhat.com>
osdc: refactor JOURNAL_FORMAT_* constants to enum

...so that the upper limit doesn't have to be updated
by hand.

Signed-off-by: John Spray <john.spray@redhat.com>