summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rados.py: fix Rados() unicode checkingwip-5970Josh Durgin2013-08-142-1/+15
| | | | | | | Check new parameters and check that rados_id is not None again to catch the empty string. Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
* rados.py: fix Rados() backwards compatibilityJosh Durgin2013-08-142-2/+27
| | | | | | | | | | | | | | | Previously it had no name parameter, so the default will be used by old clients. However, if an old client set rados_id, a new check that both rados_id and name are set would result in an error. Fix this by only applying the default names after the check, and add tests of this behavior. This was introduced in 783b7ec847c7f987ac1814c9c41c91921cac4eba, so it does not affect cuttlefish. Fixes: #5970 Reported-by: Michael Morgan <mmorgan@dca.net> Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
* librados: fix async aio completion wakeupSage Weil2013-08-141-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | For aio flush, we register a wait on the most recent write. The write completion code, however, was *only* waking the waiter if they were waiting on that write, without regard to previous writes (completed or not). For example, we might have 6 and 7 outstanding and wait on 7. If they finish in order all is well, but if 7 finishes first we do the flush completion early. Similarly, if we - start 6 - start 7 - finish 7 - flush; wait on 7 - finish 6 we can hang forever. Fix by doing any completions that are prior to the oldest pending write in the aio write completion handler. Refs: #5919 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com> Tested-by: Oliver Francke <Oliver.Francke@filoo.de>
* librados: fix locking for AioCompletionImpl refcountingJosh Durgin2013-08-141-5/+9
| | | | | | | | | | | | | | | | | | Add an already-locked helper so that C_Aio{Safe,Complete} can increment the reference count when their caller holds the lock. C_AioCompleteAndSafe's caller is not holding the lock, so call regular get() to ensure no racing updates can occur. This eliminates all direct manipulations of AioCompletionImpl->ref, and makes the necessary locking clear. The only place C_AioCompleteAndSafe is used is in handling aio_flush_async(). This could cause a missing completion. Refs: #5919 Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> Tested-by: Oliver Francke <Oliver.Francke@filoo.de>
* Merge branch 'next'Gary Lowell2013-08-134-3/+15
|\
| * v0.67v0.67Gary Lowell2013-08-131-0/+6
| |
| * rgw: fix multi deleteYehuda Sadeh2013-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #5931 Backport: bobtail, cuttlefish Fix a bad check, where we compare the wrong field. Instead of comparing the ret code to 0, we compare the string value to 0 which generates implicit casting, hence the crash. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
| * ceph-disk: fix mount options passed to move_mountSage Weil2013-08-091-0/+6
| | | | | | | | | | | | | | | | | | | | Commit 6cbe0f021f62b3ebd5f68fcc01a12fde6f08cff5 added a mount_options but in certain cases it may be blank. Fill in with the defaults, just as we do in mount(). Backport: cuttlefish Reviewed-by: Dan Mick <dan.mick@inktank.com> Signed-off-by: Sage Weil <sage@inktank.com>
| * config_opts.h: reduce osd_recovery_max_active and osd_recovery_max_single_startSamuel Just2013-08-091-2/+2
| | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: David Zafman <david.zafman@inktank.com>
* | client: add enclosing object for asok dumpsSage Weil2013-08-131-0/+2
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | pybind/ceph_argparse: GPL -> LGPL2Sage Weil2013-08-131-4/+1
| | | | | | | | | | | | | | | | | | Danny Al-Gaaf <danny.al-gaaf@bisect.de> Dan Mick <dan.mick@inktank.com> both consented to this change via email. Signed-off-by: Sage Weil <sage@inktank.com>
* | rbd.cc: relicense as LGPL2Sage Weil2013-08-133-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All past authors for rbd.cc have consented to relicensing from GPL to LGPL2 via email: --- Date: Sat, 27 Jul 2013 01:59:36 +0200 From: Sylvain Munaut <s.munaut@whatever-company.com> Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change I hereby consent to the relicensing of any contribution I made to the aforementioned rbd.cc file from GPL to LGPL2.1. (I hope that'll be impressive enough, I did my best :p) btw, tnt@246tNt.com and s.munaut@whatever-company.com are both me. Cheers, Sylvain --- Date: Fri, 26 Jul 2013 17:00:48 -0700 From: Yehuda Sadeh <yehuda@inktank.com> Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change I consent. --- Date: Fri, 26 Jul 2013 17:02:24 -0700 From: Josh Durgin <josh.durgin@inktank.com> Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change I consent. --- Date: Fri, 26 Jul 2013 18:17:46 -0700 From: Stanislav Sedov <stas@freebsd.org> Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change I consent. Thanks for taking care of it! --- Date: Fri, 26 Jul 2013 18:24:15 -0700 From: Colin McCabe <cmccabe@alumni.cmu.edu> I consent. cheers, Colin --- Date: Sat, 27 Jul 2013 07:08:12 +0200 From: Christian Brunner <christian@brunner-muc.de> Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change I consent Christian --- Date: Sat, 27 Jul 2013 12:17:34 +0300 From: Stratos Psomadakis <psomas@grnet.gr> Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change Hi, I consent with the GPL -> LGL2.1 re-licensing. Thanks Stratos --- Date: Sat, 27 Jul 2013 16:13:13 +0200 From: Wido den Hollander <wido@42on.com> Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change I consent! You have my permission to re-license the code I wrote for rbd.cc to LGPL2.1 --- Date: Sun, 11 Aug 2013 10:40:32 +0200 From: Danny Al-Gaaf <danny.al-gaaf@bisect.de> Subject: Re: btw Hi Sage, I agree to switch the license of ceph_argparse.py and rbd.cc from GPL2 to LGPL2. Regards Danny Al-Gaaf --- Date: Tue, 13 Aug 2013 17:15:24 -0700 From: Dan Mick <dan.mick@inktank.com> Subject: Re: Ceph rbd.cc GPL -> LGPL2 license change I consent to relicense any contributed code that I wrote under LGPL2.1 license. --- ...and I consent too. Drop the exception from COPYING and debian/copyright files. Signed-off-by: Sage Weil <sage@inktank.com>
* | librados: fix MWatchNotify leakSage Weil2013-08-131-9/+6
| | | | | | | | | | | | | | | | | | | | Do not leak the message if the watcher is not registered. Also, simplify this block. Fixes (part of): #5949 Backport: dumpling, cuttlefish Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
* | rgw: do not leak handler in get_handler() error pathSage Weil2013-08-131-1/+3
| | | | | | | | | | | | | | | | If we fail to initialize, delete the handler. Fixes (part of): #5949 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
* | Merge pull request #497 from ksperis/rbdmap.init-3Sage Weil2013-08-131-9/+11
|\ \ | | | | | | | | | | | | Rbdmap.init 3 Reviewed-by: Sage Weil <sage@inktank.com>
| * | init-rbdmap: minor fix no rbd existLaurent Barbe2013-08-131-5/+7
| | | | | | | | | | | | | | | | | | Avoid error if stop when no rbd device exist Signed-off-by: Laurent Barbe <laurent@ksperis.com>
| * | init-rbdmap: fix for recursive umountLaurent Barbe2013-08-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Umount is not always done in the correct order. For exemple in that case : /dev/rbd1 on /myrbd /dev/rbd2 on /myrbd/.snapshots/@GMT-2013.08.09-10.14.44 rbd2 should be umounted before rbd1 Signed-off-by: Laurent Barbe <laurent@ksperis.com>
* | | doc/release-notes: fix rstSage Weil2013-08-131-10/+8
| | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | | doc/release-notes: upgrade sequenceSage Weil2013-08-131-0/+19
| | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | | doc/release-notes: roll-up of upgrade/compat notes from cuttlefish to dumplingSage Weil2013-08-131-0/+50
|/ / | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | Makefile.am: fix libglobal.la racesGary Lowell2013-08-121-11/+8
| | | | | | | | | | | | | | | | | | | | | | Several targets had libglobal.la in the _LDFLAGS macro definition when it should have been in the _LDADD macro. Remove those occurrance and add the LIBGLOBAL_LDA macro to the targets _LDADD instead. See related commit 71f3e56d4b2c07f5fc56522a2080f1ff101ef340 Signed-off-by: Gary Lowell <gary.lowell@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com>
* | doc/release-notes: adjust whitespaceSage Weil2013-08-091-45/+45
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | doc/release-notes: v0.67 release notesSage Weil2013-08-092-45/+160
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | Merge remote-tracking branch 'gh/next'Sage Weil2013-08-099-30/+64
|\ \ | |/
| * ceph: retry new-style mon command if we get EINVAL from the old-style commandSage Weil2013-08-091-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can race with a mon upgrade: - get command descriptions, get EINVAL - mons upgrade, new quorum - send old-style command - get EINVAL In this case, we should try one last time to get the command descriptions. Fixes: #5788 Reviewed-by: Dan Mick <dan.mick@inktank.com> Signed-off-by: Sage Weil <sage@inktank.com>
| * common: pick_addresses: fix bug with observer class that triggered #5205Joao Eduardo Luis2013-08-091-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Observer class we defined to observe conf changes and thus avoid triggering #5205 (as fixed by eb86eebe1ba42f04b46f7c3e3419b83eb6fe7f9a), was returning always the same const static array, which would lead us to always populate the observer's list with an observer for 'public_addr'. This would of course become a problem when trying to obtain the observer for 'cluster_add' during md_config_t::set_val() -- thus triggering the same assert as initially reported on #5205. Backport: cuttlefish Fixes: #5205 Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com> Reviewed-by: Sage Weil <sage@inktank.com>
| * rgw: return 423 Locked response when failing to lock objectYehuda Sadeh2013-08-094-0/+8
| | | | | | | | | | | | | | | | | | | | Fixes: #5882 Translate the EBUSY we get when trying to lock a shard / object to 423 Locked response. Beforehand it was just translated to the default 500. Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * rgw: make RGWHTTPClient callback methods pure virtualYehuda Sadeh2013-08-092-3/+22
| | | | | | | | | | | | | | | | This will make it easier to catch interface changes, like the ones that triggered #5921. Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * rgw: rename read_header() to receive_header() where neededYehuda Sadeh2013-08-091-2/+2
| | | | | | | | | | | | | | The same as with #5921, fixing a missed interface change. Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * rgw: rename data receive callbacks in swift token revocationYehuda Sadeh2013-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #5921 As part of the work that was made for dumpling, the http client in-data callback was renamed in order to avoid confusion. However, we missed the rename in a couple of places, which this patch amend. Reported-by: Roald van Loon <roaldvanloon@gmail.com> Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * RadosClient: shutdown monclient after dropping lockSamuel Just2013-08-081-1/+1
| | | | | | | | | | | | | | | | | | Otherwise, the monclient shutdown may deadlock waiting on a context trying to take the RadosClient lock. Fixes: #5897 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | Merge pull request #486 from kri5/wip-s3-compliance-docYehuda Sadeh2013-08-092-1/+306
|\ \ | | | | | | | | | | | | Wip s3 compliance doc Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
| * | doc: Add a page about rgw S3 API complianceChristophe Courtaut2013-08-092-1/+306
| | | | | | | | | | | | Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
* | | Merge remote-tracking branch 'gh/wip-5648-c'Sage Weil2013-08-0910-145/+533
|\ \ \ | | | | | | | | | | | | Reviewed-by: Sage Weil <sage@inktank.com>
| * | | test: mon: moncap: add 'allow command foo with arg="bar.baz"' testsJoao Eduardo Luis2013-08-061-0/+2
| | | | | | | | | | | | | | | | Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| * | | qa: workunits: mon: workunit to stress the monitor's capsJoao Eduardo Luis2013-08-061-0/+370
| | | | | | | | | | | | | | | | Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| * | | mon: AuthMonitor: change 'auth add' behaviourJoao Eduardo Luis2013-08-061-16/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an entity already existed, 'auth add' would smash its key and caps with whatever was on the supplied keyring file; if a keyring weren't specified, we would simply generate a new key and destroy all existing caps (unless caps were specified and happened to be different from the already in-place caps). This behaviour is obviously sketchy. With this patch we now enforce the following behaviour: - if entity does not exist in current state, check if we are about to create it (by checking the pending state); if so, wait for the new state to be committed and re-handle the command then, so we don't get bad results from pending request - if the command reproduces the current state (same key, same caps), we return 0; else, - if entity exists and supplied key OR caps are different, return -EINVAL - else create a new entity. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
| * | | mon: drop old _allowed_command()Sage Weil2013-08-062-42/+0
| | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * | | mon: services: no longer needed to enforce caps on a per-service basisJoao Eduardo Luis2013-08-067-31/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We now perform all perm checks for commands on Monitor::handle_command(). Services no longer need to check them. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| * | | mon: Monitor: purge old permission checking format on handle_command()Joao Eduardo Luis2013-08-061-57/+0
| | | | | | | | | | | | | | | | Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| * | | mon: Monitor: check caps considering command's requirementsJoao Eduardo Luis2013-08-062-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #5648 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
* | | | PendingReleaseNotes: note 'ceph daemon ...' argument behavior changeSage Weil2013-08-091-0/+11
| |/ / |/| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | | mds: notify clients about deleted inodeYan, Zheng2013-08-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | To make sure clients trim the deleted inode from the their cache ASAP. After all clients release the inode, we can reclaim space. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | Merge remote-tracking branch 'yan/wip-mds'Sage Weil2013-08-087-56/+52
|\ \ \ | | | | | | | | | | | | Reviewed-by: Sage Weil <sage@inktank.com>
| * | | mds: don't issue caps while session is staleYan, Zheng2013-08-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Locker::issue_caps() does not issue new caps to stale client, CInode::encode_inodestat() should have the same logical. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
| * | | mds: change LOCK_SCAN to unstable stateYan, Zheng2013-08-054-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 0071b8e75b (mds: stay in SCAN state in file_eval) makes Locker::file_eval() ignore lock in LOCK_SCAN state. If there is no request changes the lock state, the lock can be stuck in LOCK_SCAN state forever. This can cause client read/write hang because lock in LOCK_SCAN state does not allow Frw caps. The fix is change LOCK_SCAN to a unstable state. Thank to the CInode::STATE_RECOVERING check in Locker::eval_gather(), the lock stays in the SCAN state while file is being recovering. The lock will transit to a stable state once the recovery finishes. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
| * | | mds: handle "state == LOCK_LOCK_XLOCK" when cancelling xlockYan, Zheng2013-08-051-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we find lock state is LOCK_LOCK_XLOCK when cancelling xlock, set lock state to LOCK_XLOCK_DONE and call Locker::eval_gather(). This makes sure the lock will eventually transit to a stable state. (LOCK_XLOCK_DONE's next state is stable) Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
| * | | mds: remove "type != CEPH_LOCK_DN" check in Locker::cancel_locking()Yan, Zheng2013-08-051-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For acquiring/cancelling xlock, the lock state transitions for dentry lock and other types of locks are the same. So I think the "type != CEPH_LOCK_DN" check doesn't make sense. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
| * | | mds: revoke GSHARED cap when finishing xlockYan, Zheng2013-08-052-32/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If lock state is LOCK_XLOCKDONE, the xlocker can have GSHARED cap. So when finishing xlock, we may need to revoke the GSHARED cap. In most cases Locker::_finish_xlock() directly set lock state to LOCK_LOCK or LOCK_EXCL, which hides the issue. If 'num_rdlock > 0' or 'num_wrlock > 0' when finishing xlock, the issue reveals. (lock get stuck in LOCK_XLOCKDONE forever) The fix is always call Locker::_finish_xlock() when xlock count reaches zero. _finish_xlock() checks if it can change lock state to LOCK_EXCL immediately. If not, it uses Locker::eval_gather() to transit lock state. Another change of this patch is avoid changing lock state to LOCK_LOCK directly. because lock in LOCK_XLOCK_DONE state allows GSHARED cap, lock in LOCK_LOCK state does not. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
| * | | mds: fix cap revoke confirmationYan, Zheng2013-08-051-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several issues in the Capability::confirm_receipt() 1. when receiving a client caps message with 'seq == last_sent', it doesn't mean we finish revoking caps. The client can send caps message that only flushes dirty metadata. 2. When receiving a client caps message with 'seq == N', we should forget pending revocations whose seq numbers are less than N. This is because, when revoking caps, we create a revoke_info structure and set its seq number to 'last_sent', then increase the 'last_sent'. 3. When client actively releases caps (by request), the code only works for the 'seq == last_sent' case. If there are pending revocations, we should update them as if the release message is received before we revoke the corresponding caps. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>