]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoUse mon_host instead of mon_addr in ceph_conf 429/head
Jordi Llonch [Sun, 14 Jul 2013 21:28:02 +0000 (07:28 +1000)]
Use mon_host instead of mon_addr in ceph_conf

Signed-off-by: Jordi Llonch <llonchj@gmail.com>
12 years agohypertable recent version prototyping includes bool verify in length and read functions
Jordi Llonch [Sun, 14 Jul 2013 21:26:58 +0000 (07:26 +1000)]
hypertable recent version prototyping includes bool verify in length and read functions

Signed-off-by: Jordi Llonch <llonchj@gmail.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Fri, 12 Jul 2013 17:16:27 +0000 (10:16 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agoMerge pull request #426 from dalgaaf/wip-da-SCA-cppcheck-5
Sage Weil [Fri, 12 Jul 2013 15:52:56 +0000 (08:52 -0700)]
Merge pull request #426 from dalgaaf/wip-da-SCA-cppcheck-5

Fix some typical SCA issues from cppcheck

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agotest_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator 426/head
Danny Al-Gaaf [Fri, 12 Jul 2013 12:40:39 +0000 (14:40 +0200)]
test_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocls/rgw/cls_rgw.cc: use empty() instead of checking for size() == 0
Danny Al-Gaaf [Fri, 12 Jul 2013 12:39:33 +0000 (14:39 +0200)]
cls/rgw/cls_rgw.cc: use empty() instead of checking for size() == 0

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_rgw_admin_log.cc: prefer prefix ++operator for non-trivial iterator
Danny Al-Gaaf [Fri, 12 Jul 2013 12:21:59 +0000 (14:21 +0200)]
test_rgw_admin_log.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_rgw_admin_opstate.cc: prefer prefix ++operator for non-trivial iterator
Danny Al-Gaaf [Fri, 12 Jul 2013 12:18:46 +0000 (14:18 +0200)]
test_rgw_admin_opstate.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator
Danny Al-Gaaf [Fri, 12 Jul 2013 12:15:55 +0000 (14:15 +0200)]
test_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rest_opstate.cc: prefer prefix ++operator for non-trivial iterator
Danny Al-Gaaf [Fri, 12 Jul 2013 10:10:24 +0000 (12:10 +0200)]
rgw/rgw_rest_opstate.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rados.cc: use empty() instead of checking for size() > 0
Danny Al-Gaaf [Fri, 12 Jul 2013 10:08:52 +0000 (12:08 +0200)]
rgw/rgw_rados.cc: use empty() instead of checking for size() > 0

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocmdparse.cc: catch exception by reference
Danny Al-Gaaf [Fri, 5 Jul 2013 09:32:13 +0000 (11:32 +0200)]
cmdparse.cc: catch exception by reference

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph-rest-api: Missing packaging (binary in .spec, manpage in both)
Dan Mick [Thu, 11 Jul 2013 23:21:55 +0000 (16:21 -0700)]
ceph-rest-api: Missing packaging (binary in .spec, manpage in both)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph.in: output even a blank status line in compat mode
Dan Mick [Thu, 11 Jul 2013 05:56:42 +0000 (22:56 -0700)]
ceph.in: output even a blank status line in compat mode

Fixes: #5594
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorgw: handle bucket removal by system user on master region
Babu Shanmugam [Tue, 9 Jul 2013 03:11:18 +0000 (08:41 +0530)]
rgw: handle bucket removal by system user on master region

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>

12 years agoceph-rest-api: connect to cluster with configured client name
Dan Mick [Thu, 11 Jul 2013 04:55:38 +0000 (21:55 -0700)]
ceph-rest-api: connect to cluster with configured client name

Spotted by Noah Watkins

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph-rest-api manpage
Dan Mick [Thu, 11 Jul 2013 03:52:00 +0000 (20:52 -0700)]
ceph-rest-api manpage

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agocephtool/test.sh: sync status no longer supported
Dan Mick [Thu, 11 Jul 2013 01:17:04 +0000 (18:17 -0700)]
cephtool/test.sh: sync status no longer supported

da0aff28ab478bcc3136715f92bc1af8d4b403c1 removed 'ceph sync status';
test script needs to stop trying it

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agocephtool/test.sh cleanup
Dan Mick [Wed, 10 Jul 2013 21:14:01 +0000 (14:14 -0700)]
cephtool/test.sh cleanup

1) don't pass subshell to expect_false
2) osd pause/unpause don't take arguments (apply to all OSDs)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph-rest-api tests
Dan Mick [Thu, 11 Jul 2013 00:42:33 +0000 (17:42 -0700)]
ceph-rest-api tests

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>
12 years agoAdd 'ceph-rest-api'
Dan Mick [Thu, 11 Jul 2013 00:39:47 +0000 (17:39 -0700)]
Add 'ceph-rest-api'

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>
12 years agoOSDMonitor: return failure for 'osd lost' without safety switch
Dan Mick [Thu, 11 Jul 2013 00:25:32 +0000 (17:25 -0700)]
OSDMonitor: return failure for 'osd lost' without safety switch

If user doesn't supply --yes-i-really-mean-it, fail the operation

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoCompatSet, MDSMap: formatted dumps must avoid numeric tags
Dan Mick [Thu, 11 Jul 2013 00:24:40 +0000 (17:24 -0700)]
CompatSet, MDSMap: formatted dumps must avoid numeric tags

Tags made of numbers only confuse XML parsers.  Avoid them.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agomon: OSDMonitor: formatter output on 'osd map'
Dan Mick [Thu, 11 Jul 2013 00:26:34 +0000 (17:26 -0700)]
mon: OSDMonitor: formatter output on 'osd map'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: OSDMonitor: osd pool get: move to preproc, add formatted output
Dan Mick [Thu, 11 Jul 2013 00:22:51 +0000 (17:22 -0700)]
mon: OSDMonitor: osd pool get: move to preproc, add formatted output

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>
12 years agomon: formatted output for 'fsid'
Dan Mick [Thu, 11 Jul 2013 00:18:05 +0000 (17:18 -0700)]
mon: formatted output for 'fsid'

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agomon: Monitor: 'health detail --format=json' should only output JSON
Dan Mick [Thu, 11 Jul 2013 00:17:43 +0000 (17:17 -0700)]
mon: Monitor: 'health detail --format=json' should only output JSON

Fixes: #5526
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: Monitor: support multiple formatters on some status functions
Dan Mick [Thu, 11 Jul 2013 00:15:35 +0000 (17:15 -0700)]
mon: Monitor: support multiple formatters on some status functions

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>
12 years agomon: add formatted output for several commands:
Dan Mick [Wed, 10 Jul 2013 23:59:22 +0000 (16:59 -0700)]
mon: add formatted output for several commands:

    pg stat
    pg map
    osd stat
    osd lspools
    osd blacklist ls
    osd create
    osd getmaxosd
    mds compat show

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoauth: cephx: KeyServer: list secrets to formatter or plaintext
Dan Mick [Wed, 10 Jul 2013 23:45:53 +0000 (16:45 -0700)]
auth: cephx: KeyServer: list secrets to formatter or plaintext

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: AuthMonitor: improve error reporting for import
Dan Mick [Wed, 10 Jul 2013 23:48:09 +0000 (16:48 -0700)]
mon: AuthMonitor: improve error reporting for import

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agomon: AuthMonitor: formatted output to 'auth get-or-create[-key]'
Dan Mick [Wed, 10 Jul 2013 23:47:15 +0000 (16:47 -0700)]
mon: AuthMonitor: formatted output to 'auth get-or-create[-key]'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: AuthMonitor: dump formatted and plaintext key on 'get-key'
Dan Mick [Wed, 10 Jul 2013 23:44:56 +0000 (16:44 -0700)]
mon: AuthMonitor: dump formatted and plaintext key on 'get-key'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: AuthMonitor: early out on bad entity name
Dan Mick [Wed, 10 Jul 2013 23:41:53 +0000 (16:41 -0700)]
mon: AuthMonitor: early out on bad entity name

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon,auth: AuthMonitor, KeyRing: add Formatter-dumps of auth info
Dan Mick [Wed, 10 Jul 2013 23:41:24 +0000 (16:41 -0700)]
mon,auth: AuthMonitor, KeyRing: add Formatter-dumps of auth info

Signed-off-by: Dan Mick <dan.mick@inktank.com>
auth: KeyRing: encode_formatted() receives a label as first argument

Also, this allows us to standardize formatted output on the AuthMonitor,
so that all output starts with a section 'auth'.  Other subsystems using
the KeyRing class, can specify whatever section they prefer.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoauth: Crypto: add encode_formatted/plaintext() functions
Dan Mick [Wed, 10 Jul 2013 23:31:19 +0000 (16:31 -0700)]
auth: Crypto: add encode_formatted/plaintext() functions

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoceph_argparse.py cleanup: simplify some code, error on unused args
Dan Mick [Wed, 10 Jul 2013 23:27:43 +0000 (16:27 -0700)]
ceph_argparse.py cleanup: simplify some code, error on unused args

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph CLI: valid() no longer returns bool, but just exception
Dan Mick [Wed, 10 Jul 2013 23:24:45 +0000 (16:24 -0700)]
ceph CLI: valid() no longer returns bool, but just exception

The type validation's valid() method was using a combination of
return code and exception to really indicate the same thing;
simplify by only raising on validation error, and change callers
to cope.  validate_one() follows suit.

Also, allow validate() to be called with args that are dicts
(for REST support) rather than bare words.  Rules: 'name':'value'
must both match descriptor's name and validate (through valid() for
the value.  If value is '', it's assumed to be the same as name,
(one can pass, for example, "detail" as one parameter to
REST, but it will still show up as {'detail':''} here).

Tweak validate()'s algorithm a bit in the process, and make
validate_command() exit the bestcmds loop immediately on first
full validation.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph.in, ceph_argparse.py: move descsort() to ceph_argparse
Dan Mick [Wed, 10 Jul 2013 23:15:10 +0000 (16:15 -0700)]
ceph.in, ceph_argparse.py: move descsort() to ceph_argparse

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoMonCommands: add new fields: modulename, perms, availability
Dan Mick [Wed, 10 Jul 2013 23:12:56 +0000 (16:12 -0700)]
MonCommands: add new fields: modulename, perms, availability

To help optimize the REST API, we need to know whether the commands
are read (GET) or write (PUT/POST).  However, we also could use that
same info for permission/caps checking.  Add modulename/perms as
the required caps for each command to drive both needs.

The availability field is to control whether a command is displayed/
advertised through the CLI or REST interfaces; some commands aren't
really useful for REST, and we may want to invent REST-only commands;
also, this gives us a way to deprecate commands quickly and leave the
code, should that be desirable.  Make the CLI display only commands
marked with the 'CLI' marker.

Also stop renaming 'help' to 'helptext' in the client.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agocommon: Formatter: add flush to bufferlist
Dan Mick [Wed, 10 Jul 2013 21:19:56 +0000 (14:19 -0700)]
common: Formatter: add flush to bufferlist

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agorados.py: allow long-form names of 'warn' and 'err' as watch levels
Dan Mick [Wed, 10 Jul 2013 21:11:08 +0000 (14:11 -0700)]
rados.py: allow long-form names of 'warn' and 'err' as watch levels

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge pull request #420 from gregsfortytwo/master
Yehuda Sadeh [Thu, 11 Jul 2013 01:42:18 +0000 (18:42 -0700)]
Merge pull request #420 from gregsfortytwo/master

radosgw-admin help command naming and text improvements

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoPGMonitor: fix stat comparison in prepare_pg_stats
Samuel Just [Thu, 11 Jul 2013 01:29:54 +0000 (18:29 -0700)]
PGMonitor: fix stat comparison in prepare_pg_stats

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoGet device-by-path by looking for it instead of assuming 3rd entry.
Sandon Van Ness [Wed, 10 Jul 2013 21:55:52 +0000 (14:55 -0700)]
Get device-by-path by looking for it instead of assuming 3rd entry.

On some systems (virtual machines so far) the device-by-path entry
from udevadm is not always in the same spot so instead actually
look for the right output instead of blindy assuming that its a
specific field in the output.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoGet device-by-path by looking for it instead of assuming 3rd entry.
Sandon Van Ness [Wed, 10 Jul 2013 21:55:52 +0000 (14:55 -0700)]
Get device-by-path by looking for it instead of assuming 3rd entry.

On some systems (virtual machines so far) the device-by-path entry
from udevadm is not always in the same spot so instead actually
look for the right output instead of blindy assuming that its a
specific field in the output.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoMerge branch 'wip-5492-gl' into next
Gary Lowell [Wed, 10 Jul 2013 21:28:35 +0000 (14:28 -0700)]
Merge branch 'wip-5492-gl' into next

Re-instate fix for #5492 with corrections.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoMakefile.am: fix ceph_sbindir
Gary Lowell [Mon, 8 Jul 2013 19:20:45 +0000 (12:20 -0700)]
Makefile.am:  fix ceph_sbindir

This reinstates the fix for the ceph_sbindir from commit
352f362567bf270d0896fb7573df4ae5139a56fb, with corrections
from Danny's review commits pull request #389.
Fixes: #5492
Reported-by: Denis Kaganovich <mahatma@eu.by>
Reviewed-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoMerge branch 'next'
Josh Durgin [Wed, 10 Jul 2013 20:27:58 +0000 (13:27 -0700)]
Merge branch 'next'

12 years agotest_rados: don't use assert_greater
Josh Durgin [Wed, 10 Jul 2013 20:13:25 +0000 (13:13 -0700)]
test_rados: don't use assert_greater

It's only present in very recent versions of nose, and doesn't provide
much beyond a simple assert.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoPython Ioctx.get_xattrs does not take xattr_name
Johannes Erdfelt [Tue, 9 Jul 2013 15:15:33 +0000 (08:15 -0700)]
Python Ioctx.get_xattrs does not take xattr_name

Fixes bug 5528

Since it returns all xattrs, it does not take an xattr_name. Also,
add unit tests for the Object xattrs methods.

Signed-off-by: Johannes Erdfelt <johannes@erdfelt.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoosd: fix warning
Sage Weil [Wed, 10 Jul 2013 18:32:34 +0000 (11:32 -0700)]
osd: fix warning

From 653e04a79430317e275dd77a46c2b17c788b860b

Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: limit number of inc osdmaps send to peers, clients
Sage Weil [Wed, 10 Jul 2013 18:02:08 +0000 (11:02 -0700)]
osd: limit number of inc osdmaps send to peers, clients

We should not send an unbounded number of inc maps to our peers or clients.
In particular, if a peer is not contacted for a while, we may think they
have a very old map (say, 10000 epochs ago) and send thousands of inc maps
when the distribution shifts and we need to peer.

Note that if we do not send enough maps, the peers will make do by
requesting the map from somewhere else (currently the mon).  Regardless
of the source, however, we must limit the amount that we speculatively
share as it usually is not needed.

Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agomon: do not populate MMonCommand paxos version field
Sage Weil [Wed, 10 Jul 2013 17:17:45 +0000 (10:17 -0700)]
mon: do not populate MMonCommand paxos version field

The field is not used or useful since the monitor does not even look
at it (in Monitor::handle_command()).  Avoid populating it and the
subsequent confusion for poor developers.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomessages/MPGStats: do not set paxos version to osdmap epoch
Sage Weil [Wed, 10 Jul 2013 17:06:20 +0000 (10:06 -0700)]
messages/MPGStats: do not set paxos version to osdmap epoch

The PaxosServiceMessage version field is meant for client-coordinated
ordering of messages when switching between monitors (and is rarely
used).  Do not fill it with the osdmap epoch lest it be compared to a
pgmap version, which may cause the mon to (near) indefinitely put it on
a wait queue until the pgmap version catches up.

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agorgw-admin: add some of the newer flags and specify their use 420/head
Greg Farnum [Wed, 10 Jul 2013 17:08:07 +0000 (10:08 -0700)]
rgw-admin: add some of the newer flags and specify their use

Signed-off-by: Greg Farnum <greg@inktank.com>
12 years agorgw-admin: use 'get' instead of 'show' or info for geo stuff
Greg Farnum [Wed, 10 Jul 2013 15:55:45 +0000 (08:55 -0700)]
rgw-admin: use 'get' instead of 'show' or info for geo stuff

These all output data that you can put back in via 'set', so they're
a 'get' rather than something else.

Signed-off-by: Greg Farnum <greg@inktank.com>
12 years agoMerge pull request #419 from dalgaaf/wip-da-fix-build-rados-classes
Sage Weil [Wed, 10 Jul 2013 16:34:40 +0000 (09:34 -0700)]
Merge pull request #419 from dalgaaf/wip-da-fix-build-rados-classes

ceph.spec.in: add missing %{_libdir}/rados-classes/libcls_* files

12 years agoqa/workunits/cls/test_cls_rgw: add new rgw class tests
Sage Weil [Wed, 10 Jul 2013 16:30:19 +0000 (09:30 -0700)]
qa/workunits/cls/test_cls_rgw: add new rgw class tests

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge pull request #418 from dalgaaf/wip-da-fix-build-ceph-test
Sage Weil [Wed, 10 Jul 2013 16:21:05 +0000 (09:21 -0700)]
Merge pull request #418 from dalgaaf/wip-da-fix-build-ceph-test

Fix build and packaging of ceph-test package

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #417 from dalgaaf/wip-da-fix-CRYPTO_LIBS
Sage Weil [Wed, 10 Jul 2013 16:20:03 +0000 (09:20 -0700)]
Merge pull request #417 from dalgaaf/wip-da-fix-CRYPTO_LIBS

Makefile.am: fix build, use $(CRYPTO_LIBS)

Reviewed-by: Sage Weil <sage@Inktank.com>
12 years agoceph.spec.in: add missing %{_libdir}/rados-classes/libcls_* files 419/head
Danny Al-Gaaf [Wed, 10 Jul 2013 16:12:05 +0000 (18:12 +0200)]
ceph.spec.in: add missing %{_libdir}/rados-classes/libcls_* files

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agodebian/ceph-test.install: add missing files 418/head
Danny Al-Gaaf [Wed, 10 Jul 2013 15:55:52 +0000 (17:55 +0200)]
debian/ceph-test.install: add missing files

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph.spec.in: add some more ceph_test_cls_rgw_* files
Danny Al-Gaaf [Wed, 10 Jul 2013 15:43:13 +0000 (17:43 +0200)]
ceph.spec.in: add some more ceph_test_cls_rgw_* files

Add new ceph_test_cls_rgw_* files to ceph-test package section.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/Makefile.am: rename cls_test_rgw_*
Danny Al-Gaaf [Wed, 10 Jul 2013 15:41:24 +0000 (17:41 +0200)]
src/Makefile.am: rename cls_test_rgw_*

Rename files from cls_test_rgw_* to ceph_test_cls_rgw_* to fit the current
naming scheme.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph.spec.in: add some ceph_test_cls_* files
Danny Al-Gaaf [Wed, 10 Jul 2013 15:37:59 +0000 (17:37 +0200)]
ceph.spec.in: add some ceph_test_cls_* files

Add some installed but not packaged ceph_test_cls_* files to
the ceph-test package.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoMakefile.am: fix build, use $(CRYPTO_LIBS) 417/head
Danny Al-Gaaf [Wed, 10 Jul 2013 15:15:00 +0000 (17:15 +0200)]
Makefile.am: fix build, use $(CRYPTO_LIBS)

Use $(CRYPTO_LIBS) instead of -lcryptopp to work also with
nss crypto lib.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoMerge pull request #400 from ceph/wip-mon-newsync
Sage Weil [Wed, 10 Jul 2013 00:12:28 +0000 (17:12 -0700)]
Merge pull request #400 from ceph/wip-mon-newsync

simpler mon sync

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoMerge branch 'wip-4982-4983-oloc-rebase'
David Zafman [Tue, 9 Jul 2013 23:24:22 +0000 (16:24 -0700)]
Merge branch 'wip-4982-4983-oloc-rebase'

fixes: #4982
fixes: #4983

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge pull request #415 from ceph/rgw-next
Sage Weil [Tue, 9 Jul 2013 22:34:05 +0000 (15:34 -0700)]
Merge pull request #415 from ceph/rgw-next

12 years agomon: do not scrub if scrub is in progress
Sage Weil [Tue, 9 Jul 2013 21:12:15 +0000 (14:12 -0700)]
mon: do not scrub if scrub is in progress

This prevents an assert from unexpected scrub results from the previous
scrub on the leader.

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agounittest_pglog: fix unittest
Sage Weil [Tue, 9 Jul 2013 21:11:37 +0000 (14:11 -0700)]
unittest_pglog: fix unittest

This was broken by the pg_stat_t::reported cleanup.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'master' into wip-4982-4983-oloc-rebase 394/head
David Zafman [Tue, 9 Jul 2013 21:10:42 +0000 (14:10 -0700)]
Merge branch 'master' into wip-4982-4983-oloc-rebase

12 years agolibrados/misc.cc: reverse offset and length on write call
Samuel Just [Tue, 9 Jul 2013 17:35:09 +0000 (10:35 -0700)]
librados/misc.cc: reverse offset and length on write call

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: Add namespace to dump_watchers output
David Zafman [Tue, 9 Jul 2013 06:56:56 +0000 (23:56 -0700)]
osd: Add namespace to dump_watchers output

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoosd: Clean-up redundant use of object_locator_t
David Zafman [Tue, 9 Jul 2013 01:58:12 +0000 (18:58 -0700)]
osd: Clean-up redundant use of object_locator_t

Remove locator arg from get_object_context()/find_object_context()
Remove locator from object_info_t but retain encode format
Remove locator from object_info_t dump output
Remove OLOC_BLANK

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoosd: Add the ability to set capabilities on namespaces
David Zafman [Fri, 28 Jun 2013 22:45:27 +0000 (15:45 -0700)]
osd: Add the ability to set capabilities on namespaces

Parse namespace spec in osd caps and use in is_match()
Add test cases to unit test

feature: #4983 (OSD: namespaces pt 2 (caps))

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoosd: Prepare for nspace match with simpler is_match_all()
David Zafman [Fri, 28 Jun 2013 21:20:23 +0000 (14:20 -0700)]
osd: Prepare for nspace match with simpler is_match_all()

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agotest: Add namespace list test cases to librados test
David Zafman [Tue, 25 Jun 2013 22:08:55 +0000 (15:08 -0700)]
test: Add namespace list test cases to librados test

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agotest: Add namespace test cases to librados tests
David Zafman [Tue, 25 Jun 2013 05:37:50 +0000 (22:37 -0700)]
test: Add namespace test cases to librados tests

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agorados: Add namespace arg (--namespace, -N) to rados command
David Zafman [Wed, 3 Jul 2013 19:32:17 +0000 (12:32 -0700)]
rados: Add namespace arg (--namespace, -N) to rados command

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agolibrados: Add operate()/operate_read() log messages
David Zafman [Fri, 21 Jun 2013 22:19:41 +0000 (15:19 -0700)]
librados: Add operate()/operate_read() log messages

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agolibrados, os, osd, osdc, test: Add support for client specified namespaces
David Zafman [Tue, 11 Jun 2013 01:18:59 +0000 (18:18 -0700)]
librados, os, osd, osdc, test: Add support for client specified namespaces

Add rados_ioctx_namespace_set_key() and librados::IoCtx::namespace_set_key()
Add namespace to admin-daemon operations
Support namespace in osd map command
Add namespace to object_locator_t and hobject_t
Add random namespaces to psim program

Feature: #4982 (OSD: namespaces pt 1 (librados/osd, not caps))

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge branch 'wip-mon-osdmap-trim'
Sage Weil [Tue, 9 Jul 2013 20:43:25 +0000 (13:43 -0700)]
Merge branch 'wip-mon-osdmap-trim'

Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: change pg_stat_t::reported from eversion_t to a pair of fields
Sage Weil [Mon, 8 Jul 2013 21:31:29 +0000 (14:31 -0700)]
osd: change pg_stat_t::reported from eversion_t to a pair of fields

This rarely represents an actual eversion_t as the epoch and seq values are
bumped semi-independently to ensure it is always unique.  Break it into
two separate fields to avoid confusion.

Drop now-unused and slightly curious inc() method.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: be smarter about calculating last_epoch_clean lower bound
Sage Weil [Mon, 8 Jul 2013 22:57:48 +0000 (15:57 -0700)]
mon: be smarter about calculating last_epoch_clean lower bound

We need to take PGs whose mapping has not changed in a long time into
account.  For them, the pg state will indicate it was clean at the time of
the report, in which case we can use that as a lower-bound on their actual
latest epoch clean.  If they are not currently clean (at report time), use
the last_epoch_clean value.

Fixes: #5519
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: report pg stats to mon at least every N (=500) epochs
Sage Weil [Mon, 8 Jul 2013 20:27:58 +0000 (13:27 -0700)]
osd: report pg stats to mon at least every N (=500) epochs

The mon needs a moderately accurate last_epoch_clean value in order to trim
old osdmaps.  To prevent a PG that hasn't peered or received IO in forever
from preventing this, send pg stats at some minimum frequency.  This will
increase the pg stat report workload for the mon over an idle pool, but
should be no worse that a cluster that is getting actual IO and sees these
updates from normal stat updates.

This makes the reported update a bit more aggressive/useful in that the epoch
is the last map epoch processed by this PG and not just one that is >= the
currenting interval.  Note that the semantics of this field are pretty useless
at this point.

See #5519

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/OSDMonitor: allow osdmap trimming to be forced via a config option
Sage Weil [Mon, 8 Jul 2013 21:55:44 +0000 (14:55 -0700)]
mon/OSDMonitor: allow osdmap trimming to be forced via a config option

In certain cases the admin may know that it is safe to trim old osdmaps but
a bug or other issue is preventing the Monitor from deciding on its own.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/OSDMonitor: make 'osd crush rm ...' slightly more idempotent
Sage Weil [Tue, 9 Jul 2013 04:09:09 +0000 (21:09 -0700)]
mon/OSDMonitor: make 'osd crush rm ...' slightly more idempotent

This particular failure is easily triggered by the crush_ops.sh
workunit.  Make it a bit less likely to fail.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agodoc/release-notes: v0.66
Sage Weil [Tue, 9 Jul 2013 18:45:34 +0000 (11:45 -0700)]
doc/release-notes: v0.66

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-mon-trim'
Sage Weil [Tue, 9 Jul 2013 18:10:30 +0000 (11:10 -0700)]
Merge branch 'wip-mon-trim'

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon/PaxosService: update docs a bit
Sage Weil [Tue, 9 Jul 2013 05:06:31 +0000 (22:06 -0700)]
mon/PaxosService: update docs a bit

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: inline trim()
Sage Weil [Tue, 9 Jul 2013 05:04:10 +0000 (22:04 -0700)]
mon/PaxosService: inline trim()

This is now trivial; pull it into the caller.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: move paxos_service_trim_max into caller, clean up
Sage Weil [Tue, 9 Jul 2013 05:02:00 +0000 (22:02 -0700)]
mon/PaxosService: move paxos_service_trim_max into caller, clean up

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: simplify paxos_service_trim_min check
Sage Weil [Tue, 9 Jul 2013 04:58:13 +0000 (21:58 -0700)]
mon/PaxosService: simplify paxos_service_trim_min check

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: make service trim_to stateless
Sage Weil [Tue, 9 Jul 2013 04:54:53 +0000 (21:54 -0700)]
mon: make service trim_to stateless

Call get_trim_to() when we need to know how much to trim (if any), and
calculate it then.  No need to keep this in a hidden trim_version
variable and remember to update it.  This drops several helpers and
accessors and makes get_trim_to() a single method that services need to
override.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: pass trim target into encode_trim()
Sage Weil [Tue, 9 Jul 2013 18:09:44 +0000 (11:09 -0700)]
mon/PaxosService: pass trim target into encode_trim()

This will help us in a few patches...

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: preserve last_committed_floor across sync 400/head
Sage Weil [Tue, 9 Jul 2013 17:55:05 +0000 (10:55 -0700)]
mon: preserve last_committed_floor across sync

Add a paranoid check to prevent us from forgetting how far ahead our
last_committed was when we sync.  This prevents an i'll-timed forced-sync
from allowing paxos to warp back in time.

This should never happen unless there is a perfect storm of bad admin
decisions and/or bugs, but we guard against it anyway.

See: #5256
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: no need to reset sync state on restart
Sage Weil [Tue, 9 Jul 2013 17:52:48 +0000 (10:52 -0700)]
mon: no need to reset sync state on restart

If we are in or forcing a sync, we can leave these there until the sync
completes.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: drop single-use is_sync_on_going() check
Sage Weil [Fri, 5 Jul 2013 23:46:38 +0000 (16:46 -0700)]
mon: drop single-use is_sync_on_going() check

Signed-off-by: Sage Weil <sage@inktank.com>