Commit Graph

27949 Commits

Author SHA1 Message Date
Sage Weil
dd3b0865e0 Merge pull request #464 from toabctl/fuse-utils-obsolete
Remove fuse-utils from Recommends in debian/control

Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-27 17:34:12 -07:00
Sage Weil
c36c280a78 Merge remote-tracking branch 'gh/next'
Conflicts:
	src/pybind/ceph_argparse.py
2013-07-26 15:14:02 -07:00
Sage Weil
10959404b3 Merge pull request #470 from dalgaaf/wip-da-CID-3.v2
Fix several CID issues - v2

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-26 15:08:56 -07:00
Danny Al-Gaaf
de51aac8ac rgw/rgw_metadata.cc: delete md_log (RGWMetadataLog) in destructor
Call delete on md_log in the destructor.

CID 1054826 (#1 of 1): Resource leak in object (CTOR_DTOR_LEAK)
 1. alloc_new: Allocating memory by calling "new RGWMetadataLog(_cct, _store)".
 2. var_assign: Assigning: "this->md_log" = "new RGWMetadataLog(_cct, _store)".
 3. ctor_dtor_leak: The constructor allocates field "md_log" of
    "RGWMetadataManager" but the destructor and whatever functions it calls
    do not free it.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-26 23:56:10 +02:00
Danny Al-Gaaf
a45e296c04 rgw/rgw_rest_log.cc: free 'handle' to prevent memory leak
Call complete_list_entries() at end of RGWOp_MDLog_List::execute()
to free the 'handle'.

CID 1054834 (#1-2 of 2): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "handle" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-26 23:55:57 +02:00
Danny Al-Gaaf
94cefc7765 test_cls_log.cc: fix resource leak, delete 'rop'
Fixes for:

CID 1054838 (#14 of 14): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks the
  storage it points to.

CID 1054836 (#5 of 5): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-26 23:55:53 +02:00
Danny Al-Gaaf
87f8e8fe9c test_cls_log.cc: remove empty lines
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-26 23:55:49 +02:00
Danny Al-Gaaf
44f43ff8e9 test_cls_statelog.cc: fix memory leak, delete 'rop'
CID 1054840 (#3 of 3): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks
  the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-26 23:55:44 +02:00
Danny Al-Gaaf
143b843ed1 test_cls_version.cc: close some memory leaks
Close some memory leaks caused by calling new() without
freeing the memory already assigned to 'rop'.

CID 1054848 (#1-6 of 6): Resource leak (RESOURCE_LEAK)
  overwrite_var: Overwriting "rop" in "rop = new_rop()"
  leaks the storage that "rop" points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-26 23:55:41 +02:00
Sage Weil
a08998e8dc Merge pull request #468 from cernceph/condrestart
add condrestart to the sysvinit script

Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-26 14:55:30 -07:00
Sage Weil
792280cf06 Merge pull request #467 from dalgaaf/wip-da-next-SCA-cppcheck-1
Fix typical smaller issues from SCA

Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-26 14:54:50 -07:00
Sage Weil
a90a2b42db upstart: stop ceph-create-keys when the monitor stops
This avoids lingering ceph-create-keys tasks.

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 14:07:02 -07:00
Sage Weil
6f996223fb osd: make open classes on start optional
Some might want the old behavior.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 14:02:07 -07:00
Sage Weil
c24e652d8c osd: load all classes on startup
This avoid creating a wide window between when ceph-osd is started and
when a request arrives needing a class and it is loaded.  In particular,
upgrading the packages in that window may cause linkage errors (if the
class API has changed, for example).

Fixes: #5752
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-26 13:59:45 -07:00
Samuel Just
c562b72e70 FileStore: fix fd leak in _check_global_replay_guard
Bug introduced in f3f92fe210.

Fixes: #5766
Backport: cuttlefish
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-26 13:46:26 -07:00
Dan van der Ster
1e991edefe add condrestart to the sysvinit script
We need to be able to condrestart all the ceph services on a
machine, so that we don't restart daemons that are supposed to be
stopped (e.g. broken disks).

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
2013-07-26 22:20:52 +02:00
Greg Farnum
2a1aea7c7f Merge branch 'wip-rgw-versionchecks' into next
Conflicts:
	src/rgw/rgw_rest_metadata.h

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com
2013-07-26 13:03:01 -07:00
Dan Mick
4aeb73a5e6 ceph_rest_api.py: reversed test for failed request
A failed request has a response code *outside* the range (200, 300],
not within it.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-25 21:42:19 -07:00
Dan Mick
47d0937ccb rest/test.py: earlier versions of requests.py don't quote ' ' in params
requests 0.12.1 handles queryparams in the URL with embedded
spaces; requests 0.8.2 does not.  Avoid the issue by quoting the
URL into expect().

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-25 21:41:32 -07:00
Samuel Just
6951d2345a OSD: tolerate holes in stored maps
We may have holes in stored maps during init_splits_between
and advance_pg.  In either case, we should simply skip the
missing maps.

Fixes: #5677
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-25 20:37:49 -07:00
Dan Mick
fbf74d987d ceph_rest_api.py: return error in nonformatted mode
When a nonformatted request is made, currently the only text in the
response is the (probably empty) response buffer.  Add the statusmsg
as well, where the error is likely to be explained.  This lets
the http client get a clue what happened.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-25 20:03:22 -07:00
Dan Mick
8b3d7a1b5e ceph_rest_api.py: actually remove the trailing / on baseurl
Lurking bug since version 1...

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-25 18:06:41 -07:00
Sage Weil
dfabc61c2c mon/MonCap: match param for entity (not name)
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-07-25 17:58:47 -07:00
Sage Weil
ca8ac9502b mon: translate caps=[k1,v1,k2,v2] into [caps_k1=v1, caps_k2=v2]
The command matching needs key/value pairs.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-07-25 17:58:35 -07:00
Sage Weil
05b6c7e864 mon/Paxos: share uncommitted value when leader is/was behind
If the leader has and older lc than we do, and we are sharing states to
bring them up to date, we still want to also share our uncommitted value.
This particular case was broken by b26b7f6e, which was only contemplating
the case where the leader was ahead of us or at the same point as us, but
not the case where the leader was behind.  Note that the call to
share_state() a few lines up will bring them fully up to date, so
after they receive and store_state() for this message they will be at the
same lc as we are.

Fixes: #5750
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-07-25 17:01:20 -07:00
Greg Farnum
063c71f0ff rgw: expose the version of synced items to the poster
To support this, we add an optional out argument to
RGWMetadatManager::put() and fill in the read_version. When the
function returns, that contains whatever the current on-disk version
of the object is (either what already existed or what we just wrote).

Signed-off-by: Greg Farnum <greg@inktank.com>
2013-07-25 16:03:59 -07:00
Greg Farnum
81b62b5c71 rgw: return the update status on sync requests
Add new STATUS_APPLIED, then specify the RGWX_UPDATE_STATUS header
based on that return code when doing metadata puts.
Add a send_response() function to RGWOp_Metadata_Put in order to
support sending back our new headers. Move the translation from
STATUS_NO_APPLY from set_req_state_err() to this function, so we
can turn different sync results into failures if necessary elsewhere.

Signed-off-by: Greg Farnum <greg@inktank.com>
2013-07-25 16:03:54 -07:00
Greg Farnum
8ffc4ca914 rgw: add sync state parsing code and REST interface
Specify the param "sync-type" as one of "always", "update-by-version",
"update-by-timestamp". It defaults to always.

Signed-off-by: Greg Farnum <greg@inktank.com>
2013-07-25 16:00:17 -07:00
Greg Farnum
18eabd3322 rgw: pass the sync mode into the RGWMetadataManager::put() calls.
Signed-off-by: Greg Farnum <greg@inktank.com>
2013-07-25 16:00:17 -07:00
Greg Farnum
4f9855e470 rgw: add preliminary support for sync update policies on metadata sync
We want to be able to conditionally apply new updates:
1) if we already have a newer version than the sync is applying for some
reason (replay of logs?), we don't want to go back in time.
2) If both zones were active at the same time, then we'd like to be
able to do a merge based on timestamps.

In order to support this, we add a sync_type flag to the implementations of
RGWMetadataHandler::put, and then check the version or the mtime of the
incoming put to what we have on disk, and refuse the update if needed.
We return the 204 NoContent success code when refusing sync; for the
moment the conversion is automatic but we're going to pull it out in
the next couple commits.

This commit does not complete the feature: we don't provide an interface
for specifying a different sync protocol.

Signed-off-by: Greg Farnum <greg@inktank.com>
2013-07-25 15:59:24 -07:00
Sage Weil
176aa39466 remove old push_to_kclient.pl
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-25 15:24:52 -07:00
Alfredo Deza
ebb9aceb79 ceph-disk: use new dumpling-style osd caps if we can, or fall back to old-style ones
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-25 14:30:00 -07:00
David Zafman
b46fb62df3 osd: Don't put functional code inside of an assert
Fix assert in OSDService::get_map()

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-25 14:01:54 -07:00
Dan Mick
27a0b86615 ceph_argparse.py: wrong variable used if valid() fails for Ceph{Osd}Name
self.t isn't valid in the failure case; use t

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-25 11:40:33 -07:00
Sage Weil
df9b87776d Merge remote-tracking branch 'gh/next'
Conflicts:
	PendingReleaseNotes
2013-07-25 11:34:59 -07:00
Sage Weil
c5419785c8 Merge pull request #456 from dalgaaf/wip-da-CID-1
Fix CID issues

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-25 11:33:18 -07:00
Sage Weil
096af5ed09 Merge pull request #465 from dalgaaf/wip-da-CID-2
Fix some more CID issues

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-25 11:31:08 -07:00
Samuel Just
f653aa570e config_opts.h: increase xfs,btrfs wbthrottle defaults
Also increase fd limit defaults to accomodate the larger number
of fds.

Fixes: #5692
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Mark Nelson <mark.nelson@inktank.com>
2013-07-25 11:10:45 -07:00
Sage Weil
ddaf6d5a93 Merge remote-tracking branch 'gh/next'
Conflicts:
	configure.ac
	src/ceph.in
	src/pybind/ceph_argparse.py
2013-07-25 10:48:57 -07:00
Sage Weil
78214af3ba doc/release-notes: v0.61.7
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-25 10:38:37 -07:00
Samuel Just
870c474c53 FileStore::_collection_rename: fix global replay guard
If the replay is being replayed, we might have already
performed the rename, skip it.  Also, we must set the
collection replay guard only after we have done the
rename.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-25 10:33:40 -07:00
Samuel Just
0dc3efdd88 HashIndex: reset attr upon split or merge completion
A replay of an in progress merge or split might make
our counts unreliable.

Fixes: #5723
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-25 10:32:59 -07:00
Samuel Just
37a4c4af54 test/filestore/store_test: add test for 5723
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-25 10:32:59 -07:00
Danny Al-Gaaf
cb3ee1e421 rgw/rgw_metadata.h: init prefix in initialization list
For performance reasons: init 'prefix' with META_LOG_OBJ_PREFIX
in the initialization list of RGWMetadataLog instead of assigning
the value in the constructor body.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-25 19:12:44 +02:00
Danny Al-Gaaf
6bc0d0411c test_rgw_admin_log.cc: remove unused variable 'creds'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-25 19:07:58 +02:00
Danny Al-Gaaf
dda1014a1d test_rgw_admin_log.cc: use static_cast<>() instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-25 19:06:53 +02:00
Danny Al-Gaaf
8f45a73a34 test_rgw_admin_opstate.cc: remove unused variable 'creds'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-25 19:04:34 +02:00
Danny Al-Gaaf
e4dfe8ab20 test_rgw_admin_meta.cc: remove unused variable 'creds'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-25 19:03:06 +02:00
Danny Al-Gaaf
9d4c42f603 test_rgw_admin_opstate.cc: use static_cast<>() instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-25 19:01:52 +02:00
Danny Al-Gaaf
4c778e26fd test_rgw_admin_meta.cc: use static_cast<>() instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-25 18:58:37 +02:00