This is sufficient to deploy an OSD that is based on ceph-volume lvm.
YMMV if it's not an lvm-based OSD.
Run the OSD container privileged so we can open the raw block device.
Signed-off-by: Sage Weil <sage@redhat.com>
This lets you start up a 'generic' container of a particular class,
without a data mount, but with the appropriate other mounts and privilege
levels.
Signed-off-by: Sage Weil <sage@redhat.com>
When activating a bluestore inside a container, we want to (be able to)
make the osd dir metadata persistent inside the container.
Signed-off-by: Sage Weil <sage@redhat.com>
Therefore the v1 parent spec should not attempt to populate the
namespace.
Fixes: https://tracker.ceph.com/issues/41938
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Clarify supported secret engine in the Vault documentation.
Signed-off-by: Andrea Baglioni <andrea.baglioni@workday.com>
Signed-off-by: Sergio de Carvalho <sergio.carvalho@workday.com>
The require_osd_release value will change at an arbitrary point in time,
midway through a peering interval. That can leave us in a state where
we are midway through an interval and suddenly enforcing checks on leases
we don't have.
In contrast, the upacting features change at an interval boundary, which
lets us adjust our behavior for the whole interval.
Signed-off-by: Sage Weil <sage@redhat.com>
This allows us to behave when a rank is passed to mon_command(..., target=),
which will call rados_mon_command_target() -> MonClient::start_mon_command
with a (string) target name.
We could make an integer variant of rados_mon_command_target, and do the
int vs string differentiation in python, but this is much easier.
Signed-off-by: Sage Weil <sage@redhat.com>
We can't use the feature bit for the MCommand connection to tell whether
it is a tell or CLI command because new clients may have to send CLI
commands via MCommand for old clusters, and they don't always know whether
this mgr is new or old yet.
Prior to octopus, MCommand contained a mon/mgr CLI command, and did not
have the fsid field set. Start populating the fsid field, and use this
to signal whether a client is a new MgrClient that knows MCommand vs
MMgrCommand. If we get an MCommand with the fsid set, that means it is
a tell command; otherwise, it's an old client sending a CLI command.
Signed-off-by: Sage Weil <sage@redhat.com>
We can't set the filestore setting because filestore isn't active and so
the option isn't observed, so it isn't changeable.
Signed-off-by: Sage Weil <sage@redhat.com>
The implementation can choose to either use the provided Formatter, or
put something directly into outbl. The implementation may choose to
flush the formatter to the output buffer|stream, or let the caller do it
for them (usually the latter).
Lots of fiddling/cleanup in the implementations to make this build,
including dropping the (seeminlyg unused?) ostream& output mode for
the librbd asok implementations.
Signed-off-by: Sage Weil <sage@redhat.com>
This separates the error stream from the output stream for the synchronous
hook.
This patch includes misc cleanup in the various implementations to make
use of the new stream for errors.
Add a test to unittest_context to ensure we're getting the error stream.
Signed-off-by: Sage Weil <sage@redhat.com>
This test assumed 'mon dump' (a CLI command) would work when targetted at
a specific mon (i.e., a tell command).
Signed-off-by: Sage Weil <sage@redhat.com>
This isn't ideal, but it's better than nothing.
Net behavior change here is that calling an non-existant command now
succeeds with an error message instead of exiting with an error code
and no informative output.
Signed-off-by: Sage Weil <sage@redhat.com>
This is cleaner. All users are currently standalone tests; updated.
It also means that *all* commands that have a name=pgid arg are pg tell
commands.
Signed-off-by: Sage Weil <sage@redhat.com>
Request map *and* resend. We don't have map epoch info about when the
reply was sent, and the OSD isn't ordering with respect to epochs anyway.
So, resend now, just in case we already saw a map change, or because we
were suffering from a peering vs command race on the OSD side, and then
also request a new map from the mon, in case we are missing a map update.
Signed-off-by: Sage Weil <sage@redhat.com>
- move items from _do_command to asok_command in OSD.cc
- update PG::do_command to take a std::function on_finish
- sprinkle in some osd_lock locking (_do_command implicitly locks osd_lock,
asok_command() does not; most commands don't need it)
Signed-off-by: Sage Weil <sage@redhat.com>