- keyrings have new default locations that everyone should use.
- the user key setup is vastly simplified if you use the
'ceph auth get-or-create' command.
Signed-off-by: Sage Weil <sage@inktank.com>
Fixes a bug triggered by using the ceph tool to 'mon add' with a port set
to zero. We now default to the monitor's default port (6789) instead, and
we will fail if that port is already assigned to some other monitor.
Fixes: bug #2661
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
The linger_send() method was doing this, but it is problematic because the
new Op doesn't get its pgid or acting vector set correctly. The result is
that the request goes to the right OSD, but has the wrong pgid, and makes
the OSD complain about misdirected requests and drop it on the floor. It
didn't affect the test results because we weren't testing whether the
watch was working in that case.
Instead, we'll just recalculate and get the same value the parent linger
op did. Which is fine, and goes through all the usual code paths so
nothing is missed.
Also, increment num_homeless_ops before we recalc_op_target(), so that we
don't (harmlessly, but confusingly) underflow.
Fixes: #2022
Signed-off-by: Sage Weil <sage@inktank.com>
These asserts were useful for ensuring that pool is passed
in in the correct places, but they prevent the encoder
testing from working.
Signed-off-by: Samuel Just <sam.just@inktank.com>
It is probably unlikely that someone will expand the mon cluster with a
mixed feature set, but we know the quorum features here, so we should use
them.
Signed-off-by: Sage Weil <sage@inktank.com>
If the quorum does not yet all have the MONENC feature, stick to the old
encoding.
It might be more polite to require a super-quorum before switching over,
and take note so that thereafter we can stick to the new encoding, but
that has more moving parts and I'm not sure it's worth the complexity.
Signed-off-by: Sage Weil <sage@inktank.com>
When we form a quorum, also note the intersection of the quorum members'
feature bits. This will inform decisions about what encodings we use.
This is an imperfect strategy because the quorum may change, and we may
have a mon with old code join in and not understand what is going on.
However, it does ensure that a majority of the members run new code, so in
the absence of other failures we can make progress.
Signed-off-by: Sage Weil <sage@inktank.com>
upstart doesn't let you wildcard all instances of a given job, so we
slog through initctl list output, and reload any running daemons.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Tommi Virtanen <tv@inktank.com>
For operations that are done on the service (e.g., list buckets)
we need to log the user that did the operation, and not the bucket
owner.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This spams stderr in an ugly way. Users should look at the logs.
In particular, filestore upgrades spam the console, which is unpleasant.
Signed-off-by: Sage Weil <sage@inktank.com>
07f853db39 is actually too conservative,
it suffices to find any info with a last_update of at least the least
last_update from the last period to go active. An info from a previous
interval is acceptable if the last interval never reported a commited
operation and thus still has the same last_update.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
If we are sending log updates to a client (ceph -w), and they are far
enough behind to drop behind first_committed, include a friendly message
in their stream but continue.
Drop useless return value from _create_sub_incremental(). Assert that we
can read the state file.
Signed-off-by: Sage Weil <sage@inktank.com>
We disregard incomplete infos during find_best_info, but we can't an
info with a last_epoch_started less that of the incomplete info.
This should avoid cases like #2462. In that case, it appears that
a peer with empty info/log was chosen as authoritative even though
there was a non-empty incomplete peer.
Signed-off-by: Samuel Just <sam.just@inktank.com>
On squeeze,
warning: cls_rbd.cc:534: cannot pass objects of non-POD type ‘struct snapid_t’ through ‘...’; call will abort at runtime
Signed-off-by: Sage Weil <sage@inktank.com>
Noticed because of failing i386 unit tests for long addrs; x86_64 passed
fine. Sigh. FTR, the failing address was
2001:0db8:85a3:0000:0000:8a2e:0370:7334
Sadly the full length addrs don't turn it up on x86_64, still, nor does
valgrind notice. But, this fixes it on i386.
Signed-off-by: Sage Weil <sage@inktank.com>
This will let us version this encoding later when we add new information
and features, like a per-snap parent.
Signed-off-by: Sage Weil <sage@inktank.com>
The callers report errors and pass up errors, so do not spam stderr with
this. Fixes the confusion that sparked #2595.
Signed-off-by: Sage Weil <sage@inktank.com>
Fixes#2542. The old behavior just merged src object attrs
and provided attributes. The new (and correct) behavior looks
at the x-[amz|rgw|...]-metadata-directive and either copies
the source attrs, or replaces them with the provided attrs.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This should help us track down/verify #2535. It seems to happen on several
different systems, but we haven't figured out which ones yet.
This detects the bug, but does not attempt to correct it.
Signed-off-by: Sage Weil <sage@inktank.com>