Return the summary info in a structured for instead of just mimicing the
legacy plaintext format.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Store our latest state when we set the force_sync flag. This is important
because we will clear the store the next time we start up and may not be
able to get a useful monmap at that point.
Signed-off-by: Sage Weil <sage@inktank.com>
The old last_committed is already committed; don't reapply. This also fixes
the case where lc was 0 (i.e., we did get_cookie_recent from the beginning
of time).
Signed-off-by: Sage Weil <sage@inktank.com>
The name is always present when pools are created, but not when they are
modified. Also, a name may be present with a new_pools entry if the pool
is just renamed. Separate it out completely in the dump.
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
This avoids the need for a conditional decoding check on ceph-dencoder,
and makes it match up with what encode_message() is doing. The new(ish)
fields in the footer (the signature) is not useful for the object
corpus.
Signed-off-by: Sage Weil <sage@inktank.com>
intra region bucket creation, deletion and copy object to and from remote regions validated
Signed-off-by: Babu Shanmugam <anbu@enovance.com>
Reviewed-by:Yehuda Sadeh <yehuda@inktank.com>
Patterned after cephtool/test.sh, with some deeper validation of
output format and contents (because structured output is easier
to validate).
Signed-off-by: Dan Mick <dan.mick@inktank.com>
ceph-rest-api is a Python WSGI module for accessing the Ceph cluster.
It supports most of the commands supported by the ceph CLI,
appropriately translated to HTTP GET/PUT requests. It is not a
truly RESTful interface.
Not supported at this moment: "tell", "pg <pgid>", and "daemon"
commands.
Configuration options are specified in ceph.conf, specified with
-c/--conf or obtained from $CEPH_CONF, /etc/ceph/ceph.conf,
~/.ceph/ceph.conf, or ./ceph.conf.
-n/--name specifies the client name, used for the cluster
authentication key and for the ceph.conf section name (default
is client.restapi).
restapi keyring = <keyring file>
restapi public addr = listenIP:port (default 0.0.0.0:5000)
restapi base url = <base path> (default /api/v0.1)
restapi log level = (error, warning, info, debug)
restapi log file = (default /var/log/ceph/<clientname>.log)
Primitive human-level command discovery is supported; GET from
BASEURL (say, http://localhost:5000/api/v0.1) will show an HTML
table of all commands and arguments, method supported, and help strings.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Move 'osd pool get' handling to preprocess_command()
It's a read operation; there's no need for it to be in prepare_command().
Also, add formatted output.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Commands such as 'mon_status', 'quorum_status', 'sync_status' and
'sync_force' didn't support other formatter besides json. Regardless of
'--format=foo' being specified, they would always output in json.
This commit changes that behavior, allowing a format to be passed. These
functions do not output in plain-text however. Plain-text will default
to 'json' -- the reason: the information they provide are better outputted
in a structured fashion, and I was too lazy to come up with a plain-text
version that could be at least as good.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>