New RESTMgr* classes to handle a specific uri entry
point. Actions are handled by RGWHandler*.
Changing init order, newly instantiated RGWHandler
for every op.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Don't translate RESTful operations into a more meaningful
callback name. The handlers themselves should do that
translation. This way we can later register different
handlers with different meanings for the operations.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
The mds gets an open session request and immediately sets the session
stale timer. If logging the session and sending the reply takes longer
than the timer, the client sees a stale session message before getting
the open session reply. This fix resets the session stale timer on
completion of the mds logging operation to reduce the likelihood of
the session getting marked stale before the client can receive the
open session reply and start sending renewcaps messages.
We reset the session timer for renewcaps and force_open_sessions right
before returning the SESSION_OPEN reply to the client. This avoids stale
sessions in the cases where the mds is highly loaded and the session_open
reply back to the client is delayed.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
This lets a $osd_data/journal symlink point to
/dev/disk/by-partuuid/UUID and the osd will not attempt to start until
that disk is available.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
This way, it won't need -i ID and it won't access the osd_data_dir.
That makes it useful for locating the right osd to use with an
external journal partition.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
Ext4 as a default is a bad choice, as we don't perform enough QA with
it. To use XFS as the default for ceph-disk-prepare, we need to depend
on xfsprogs.
btrfs-tools is already recommended, so no change there. If you set
osd_fs_type=btrfs, and don't have the package installed, you'll just
get an error message.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
Earlier testing never saw this, but now a mount of a disk triggers a
udev blockdev-added event, causing ceph-disk-activate to run even
before ceph-disk-prepare has had a chance to write the files and
unmount the disk.
Avoid this by using a temporary partition type uuid ("ceph 2 be"), and
only setting it to the permanent ("ceph osd"). The hotplug event won't
match the type uuid, and thus won't trigger ceph-disk-activate.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
This cleans up the error handling to not leave disks mounted
in /var/lib/ceph/tmp/mnt.* when something fails, e.g. when
the ceph command line tool can't talk to mons.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
Tested with meaningless but easy-to-verify values:
[global]
osd_fs_type = xfs
osd_fs_mkfs_arguments_xfs = -i size=512
osd_fs_mount_options_xfs = noikeep
ceph-disk-activate does not respect the mount options yet.
Closes: #2549
Signed-off-by: Tommi Virtanen <tv@inktank.com>
Either use ceph.conf variable osd_fs_type or command line option
--fs-type=
Default is still ext4, as currently nothing guarantees xfsprogs
or btrfs-tools are installed.
Currently both btrfs and xfs seems to trigger a disk hotplug event at
mount time, thus triggering a useless and unwanted ceph-disk-activate
run. This will be worked around in a later commit.
Currently mkfs and mount options cannot be configured.
Bug: #2549
Signed-off-by: Tommi Virtanen <tv@inktank.com>
Add PROT and LOCK columns, for protection status and presence of any
locks of type "excl" or "shr" (lock list for the gory details)
Shrink FORMAT to FMT
Remove TYPE column; one can infer type from presence of @ in name (snap)
or presence of parent (clone)
Dump prettybyte_t in favor of new si_t for compactness
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
1) comment set_conf_param and the loop that uses it
2) put back error checking for "called with full param list" in macro
3) make all the loop calls consistent
4) add a third arg placeholder to handle lock remove
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
The client sends an open session request to the mds, which may not
get a chance to reply before the mds timer times out the session and
sends the client a stale message. This fix avoids the assertion by
checking that a pending open session request is in progress.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
This avoids an error if the daemon was running already, and is
already being done with the other services.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
This fixes a bug where the client keeps resending session open requests
to the target mds because the waiting_for_session.count check was
incorrectly using the passed in mds number instead of the target.
Also output the mds the message is coming from for debugging.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Insufficient understanding of fragile algorithm. This needs more
thought and I don't want the parsing broken as it is now.
This reverts commit 0d48879320.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
This properly accounts for multi-op requests. Use MOSDOp->rmw_flags for
internal caps requirements, leaving MOSDOp->flags for client specified
options. Use accessors so the flags don't need to be known by the callers.
Also separate capability checks (need_*_cap) from the nature of the MOSDOp
(may_{read,write}). This preserves the semantics of may_{read,write},
which are used in several places outside of capability checks.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Instead of looping across all args, with increments inside the loop,
which can run off the end of the vector, demand that the final
argument parsing have exactly the right number of args, or complain
about the extras and die.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
I revved this message and forgot to set the compat version correctly,
preventing post-change (e.g., bobtail) OSDs from talking to pre-change
(e.g., argonaut) monitors. This was in b64641c.
Signed-off-by: Sage Weil <sage@inktank.com>
This test still verifies that the race is handled correctly if it
occurs, but will no longer clutter test results with spurious failures
when the race is not reproduced.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This is to handle TextTable output, which doesn't use tabs
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Bending over backwards hasn't made coverity happy. We'll just ignore it
there.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit c517fde269)
Return ENOENT if no parent.
Return error if pool reverse lookup fails.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
It's meth for referring to Python class methods:
http://sphinx.pocoo.org/domains.html#python-roles
The links to format() and features() are currently
dead because those methods don't have docstrings.
They'll start working once docstrings are added.
Signed-off-by: Tommi Virtanen <tv@inktank.com>