summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rgw: use CURL_NOSIGNALwip-4425Yehuda Sadeh2013-03-121-0/+1
| | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: set attrs on various list bucket xml results (swift)wip-4247-bobtailYehuda Sadeh2013-03-071-4/+4
| | | | | | | | | Fixes: #4247 The list buckets operation was missing some attrs on the different xml result entities. This fixes it. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> (cherry picked from commit 2b2704180a12153dc692dd0902515101502a85ba)
* formatter: add the ability to dump attrs in xml entitiesYehuda Sadeh2013-03-072-9/+88
| | | | | | | | | | | | | | | | xml entities may have attrs assigned to them. Add the ability to set them. A usage example: formatter->open_array_section_with_attrs("container", FormatterAttrs("name", "foo", NULL)); This will generate the following xml entity: <container name="foo"> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Conflicts: src/common/Formatter.cc
* ObjectCacher: fix debug log level in splitJosh Durgin2013-03-061-1/+1
| | | | | | | | Level 0 should never be used for this kind of debugging. Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com> (cherry picked from commit cb3ee33532fb60665f39f6ccb1d69d67279fd5e1)
* rados: remove unused "check_stdio" parameterDan Mick2013-03-051-3/+3
| | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> (cherry picked from commit bb860e49a7faeaf552538a9492ef0ba738c99760)
* rados: obey op_size for 'get'Sage Weil2013-03-051-12/+31
| | | | | | | | | Otherwise we try to read the whole object in one go, which doesn't bode well for large objects (either non-optimal or simply broken). Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com> (cherry picked from commit 234becd3447a679a919af458440bc31c8bd6b84f)
* FileJournal::wrap_read_bl: adjust pos before returningSamuel Just2013-02-281-0/+2
| | | | | | | | | | | | | Otherwise, we may feed an offset past the end of the journal to check_header in read_entry and incorrectly determine that the entry is corrupt. Fixes: 4296 Backport: bobtail Backport: argonaut Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Samuel Just <sam.just@inktank.com> (cherry picked from commit 5d54ab154ca790688a6a1a2ad5f869c17a23980a)
* osd: leave osd_lock locked in shutdown()Sage Weil2013-02-261-3/+2
| | | | | | | | No callers expect the lock to be dropped. Fixes: #3816 Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 98a763123240803741ac9f67846b8f405f1b005b)
* msg: fix entity_addr_t::is_same_host() for IPv6Sage Weil2013-02-261-1/+1
| | | | | | | | We weren't checking the memcmp return value properly! Aie... Backport: bobtail Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit c8dd2b67b39a8c70e48441ecd1a5cc3c6200ae97)
* osd: requeue pg waiters at the front of the finished queueSage Weil2013-02-251-2/+7
| | | | | | | | | | | | | | | | | | | We could have a sequence like: - op1 - notify - op2 in the finished queue. Op1 gets put on waiting_for_pg, the notify creates the pg and requeues op1 (and the end), op2 is handled, and finally op1 is handled. That breaks ordering; see #2947. Instead, when we wake up a pg, queue the waiting messages at the front of the dispatch queue. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com> (cherry picked from commit 56c5a07708d52de1699585c9560cff8b4e993d0a)
* osd: pull requeued requests off one at a timeSage Weil2013-02-251-13/+8
| | | | | | | | | | | | | | | Pull items off the finished queue on at a time. In certain cases, an event may result in new items betting added to the finished queue that will be put at the *front* instead of the back. See latest incarnation of #2947. Note that this is a significant changed in behavior in that we can theoretically starve if an event keeps resulting in new events getting generated. Beware! Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com> (cherry picked from commit f1841e4189fce70ef5722d508289e516faa9af6a)
* mds: open mydir after replaySage Weil2013-02-251-1/+1
| | | | | | | | | In certain cases, we may replay the journal and not end up with the dirfrag for mydir open. This is fine--we just need to open it up and fetch it below. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit e51299fbce6bdc3d6ec736e949ba8643afc965ec)
* mds: use inode_t::layout for dir layout policyGreg Farnum2013-02-219-173/+82
| | | | | | | | | | | | Remove the default_file_layout struct, which was just a ceph_file_layout, and store it in the inode_t. Rip out all the annoying code that put this on the heap. To aid in this usage, add a clear_layout() function to inode_t. Signed-off-by: Sage Weil <sage.weil@dreamhost.com> Signed-off-by: Greg Farnum <greg@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* mds: parse ceph.*.layout vxattr key/value contentSage Weil2013-02-202-1/+57
| | | | | | | | | Use qi to parse a strictly formatted set of key/value pairs. Be picky about whitespace. Any subset of recognized keys is allowed. Parse the same set of keys as the ceph.*.layout.* vxattrs. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 5551aa5b3b5c2e9e7006476b9cd8cc181d2c9a04)
* rgw: fix multipart uploads listingYehuda Sadeh2013-02-191-4/+4
| | | | | | | | | | | Fixes: #4177 Backport: bobtail Listing multipart uploads had a typo, and was requiring the wrong resource (uploadId instead of uploads). Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com> (cherry picked from commit db99fb4417b87301a69cb37b00c35c838b77197e)
* rgw: don't copy object when it's copied into itselfYehuda Sadeh2013-02-191-25/+38
| | | | | | | | | | | | Fixes: #4150 Backport: bobtail When object copied into itself, object will not be fully copied: tail reference count stays the same, head part is rewritten. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com> (cherry picked from commit 34f885be536d0ac89c10fd29b1518751d2ffc547)
* PG: remove weirdness log for last_complete < log.tailSamuel Just2013-02-191-6/+0
| | | | | | | | | | | | | | | In the case of a divergent object prior to log.tail, last_complete may end up before log.tail. Backport: bobtail Fixes #4174 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit dbadb3e2921297882c5836c67ca32bb8ecdc75db) Conflicts: src/osd/PG.cc
* Strip any trailing whitespace from rbd showmappedJames Page2013-02-181-1/+1
| | | | | | | | | More recent versions of ceph append a bit of whitespace to the line after the name of the /dev/rbdX device; this causes the monitor check to fail as it can't find the device name due to the whitespace. This fix excludes any characters after the /dev/rbdN match. (cherry picked from commit ad84ea07cac5096de38b51b8fc452c99f016b8d8)
* Merge pull request #64 from dalgaaf/wip-bobtail-memleaksSage Weil2013-02-175-11/+35
|\ | | | | cherry-pick some memleak fixes from master to bobtail
| * rgw/rgw_rest.cc: fix 4K memory leakDanny Al-Gaaf2013-02-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fix 4K memory leak in case RGWClientIO::read() fails in read_all_chunked_input(). Error from cppcheck was: Checking src/rgw/rgw_rest.cc... [src/rgw/rgw_rest.cc:688]: (error) Memory leak: data Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit 89df090e04ef9fc5aae29122df106b0347786fab)
| * SyntheticClient.cc: fix some memory leaks in the error handlingDanny Al-Gaaf2013-02-161-3/+12
| | | | | | | | | | | | | | | | | | | | | | Fix some memory leaks in case of error handling due to failed client->open() calls. Error from cppcheck was: [src/client/SyntheticClient.cc:1980]: (error) Memory leak: buf [src/client/SyntheticClient.cc:2040]: (error) Memory leak: buf [src/client/SyntheticClient.cc:2090]: (error) Memory leak: buf (cherry picked from commit f0ba80756d1c3c313014ad7be18191981fb545be)
| * rgw/rgw_xml.cc: fix realloc memory leak in error caseDanny Al-Gaaf2013-02-161-2/+9
| | | | | | | | | | | | | | | | | | | | Fix error from cppcheck: [src/rgw/rgw_xml.cc:212]: (error) Common realloc mistake: 'buf' nulled but not freed upon failure Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit d48cc789ea075ba2745754035640ada4131b2119)
| * os/FileStore.cc: fix realloc memory leak in error caseDanny Al-Gaaf2013-02-161-2/+5
| | | | | | | | | | | | | | | | | | | | Fix error from cppcheck: [src/os/FileStore.cc:512]: (error) Common realloc mistake: 'fiemap' nulled but not freed upon failure Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit c92a0f552587a232f66620170660d6b2ab6fb3a5)
| * common/fiemap.cc: fix realloc memory leakDanny Al-Gaaf2013-02-161-3/+6
|/ | | | | | | | | | Fix error from cppcheck: [src/common/fiemap.cc:73]: (error) Common realloc mistake: 'fiemap' nulled but not freed upon failure Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit f26f1470e7af36fa1eb8dc59c8a7c62c3c3a22ba)
* osd/OSDCap: add unit test for parsing pools/objects with _ and -Sage Weil2013-02-141-1/+5
| | | | | | | | | | Hunting #4122, where a user saw 2013-02-13 19:39:25.467916 7f766fdb4700 10 osd.0 10 session 0x2c8cc60 client.libvirt has caps osdcap[grant(object_prefix rbd^@children class-read),grant(pool libvirt^@pool^@test rwx)] 'allow class-read object_prefix rbd_children, allow pool libvirt-pool-test rwx' Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 2ce28ef1d7f95e71e1043912dfa269ea3b0d1599) (cherry picked from commit a6534bc8a0247418d5263b765772d5266f99229c)
* osd/OSDCap: tweak unquoted_word parsing in osd capsSage Weil2013-02-141-1/+1
| | | | | | | | | | | | Newer versions of spirit (1.49.0-3.1ubuntu1.1 in quantal, in particular) dislike the construct with alnum and replace the - and _ with '\0' in the resulting string. Fixes: #4122 Backport: bobtail Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com> (cherry picked from commit 6c504d96c1e4fbb67578fba0666ca453b939c218)
* v0.56.3v0.56.3Gary Lowell2013-02-132-1/+7
|
* rgw: change json formatting for swift list containerYehuda Sadeh2013-02-131-3/+11
| | | | | | | | | | | Fixes: #4048 There is some difference in the way swift formats the xml output and the json output for list container. In xml the entity is named 'name' and in json it is named 'subdir'. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> (cherry picked from commit 3e4d79fe42dfc3ca70dc4d5d2aff5223f62eb34b)
* librbd: unprotect any non-unprotected snapshotJosh Durgin2013-02-123-4/+23
| | | | | | | | | | | Include snapshots in the UNPROTECTING state as well, which can occur after an unprotect is interrupted. Fixes: #4100 Backport: bobtail Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com> (cherry picked from commit fe283813b44a7c45def6768ea0788a3a0635957e)
* java: make CephMountTest use user.* xattr namesSage Weil2013-02-121-9/+14
| | | | | | | | | | | | Changes to the xattr code in Ceph require a few tweaks to existing test cases. Specifically, there is now a ceph.file.layout xattr by default and user defined xattrs are prepended with "user." Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Joe Buck <jbbuck@gmail.com> Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
* mon: fix typo in C_StatsSage Weil2013-02-121-1/+1
| | | | | | | Broken by previous commit. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 3cf3710be0b4cccc8de152a97be50d983c35116d)
* mon: retry PGStats message on EAGAINSage Weil2013-02-121-3/+6
| | | | | | | | | If we get EAGAIN from a paxos restart/election/whatever, we should restart the message instead of just blindly acking it. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Joao Luis <joao.luis@inktank.com> (cherry picked from commit 4837063d447afb45554f55bb6fde1c97559acd4b)
* mon: handle -EAGAIN in completion contextsSage Weil2013-02-121-16/+14
| | | | | | | | | | | | We can get ECANCELED, EAGAIN, or success out of the completion contexts, but in the EAGAIN case (meaning there was an election) we were sending a success to the client. This resulted in client hangs and all-around confusion when the monitor cluster was thrashing. Backport: bobtail Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Joao Luis <joao.luis@inktank.com> (cherry picked from commit 17827769f1fe6d7c4838253fcec3b3a4ad288f41)
* osd: only share maps on hb connection of OSD_HBMSGS feature is setSage Weil2013-02-121-2/+6
| | | | | | | | | | Back in 1bc419a7affb056540ba8f9b332b6ff9380b37af we started sharing maps with dead osds via the heartbeat connection, but old code will crash on an unexpected message. Only do this if the OSD_HBMSGS feature is present. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com> (cherry picked from commit 302b26ff70ee5539da3dcb2e5614e2b7e83b9dcd)
* osd: tolerate unexpected messages on the heartbeat interfaceSage Weil2013-02-122-2/+5
| | | | | | | | | | | | | We should note but not crash on unexpected messages. Announce this awesome new "capability" via a feature bit. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com> (cherry picked from commit afda30aeaae0a65f83c6886658354ad2b57c4c43) Conflicts: src/include/ceph_features.h
* Merge remote-tracking branch 'gh/wip-bobtail-osd-msgr' into bobtailSage Weil2013-02-125-68/+38
|\
| * osd: kill unused addr-based send_map()Sage Weil2013-02-042-12/+0
| | | | | | | | | | | | | | Not used, old API, bad. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit e359a862199c8a94cb238f7271ba1b0edcc0863c)
| * osd: share incoming maps via Connection*, not addrsSage Weil2013-02-042-49/+20
| | | | | | | | | | | | | | | | | | Kill a set of parallel methods that are using the old addr/inst-based msgr APIs, and instead use Connection handles. This is much safer and gets us closer to killing the old msgr API. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 5e2fab54a4fdf2f59e2b635cbddef8a5909acb7c)
| * osd: pass new maps to dead osds via existing ConnectionSage Weil2013-02-041-7/+1
| | | | | | | | | | | | | | | | | | | | Previously we were sending these maps to dead osds via their old addrs using a new outgoing connection and setting the flags so that the msgr would clean up. That mechanism is possibly buggy and fragile, and we can avoid it entirely if we just reuse the existing heartbeat Connection. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 1bc419a7affb056540ba8f9b332b6ff9380b37af)
| * osd: requeue osdmaps on heartbeat connections for cluster connectionSage Weil2013-02-041-0/+8
| | | | | | | | | | | | | | | | | | If we receive an OSDMap on the cluster connection, requeue it for the cluster messenger, and process it there where we normally do. This avoids any concerns about locking and ordering rules. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 76705ace2e9767939aa9acf5d9257c800f838854)
| * msgr: add get_loopback_connection() methodSage Weil2013-02-043-0/+9
| | | | | | | | | | | | | | | | Return the Connection* for ourselves, so we can queue messages for ourselves. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit a7059eb3f3922cf08c1e5bb5958acc2d45952482)
* | test_libcephfs: fix xattr testSage Weil2013-02-091-0/+8
| | | | | | | | | | | | | | Ignore the ceph.*.layout xattrs. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit b0d4dd21c7be86eb47728a4702a3c67ca44424ac)
* | radosgw-admin: fix cli testSage Weil2013-02-081-0/+1
| | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 1b05b0edbac09d1d7cf0da2e536829df05e48573)
* | Merge remote-tracking branch 'gh/wip-bobtail-vxattrs' into bobtailSage Weil2013-02-0710-30/+392
|\ \
| * | qa: add layout_vxattrs.sh test scriptSage Weil2013-02-041-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | Test virtual xattrs for file and directory layouts. TODO: create a data pool, add it to the fs, and make sure we can use it. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 61fbe27a52d12ecd98ddeb5fc0965c4f8ee7841a)
| * | mds: allow dir layout/policy to be removed via removexattr on ceph.dir.layoutSage Weil2013-02-042-5/+64
| | | | | | | | | | | | | | | | | | | | | This lets a user remove a policy that was previously set on a dir. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit db31a1f9f27416e4d531fda716e32d42a275e84f)
| * | mds: handle ceph.*.layout.* setxattrSage Weil2013-02-043-7/+159
| | | | | | | | | | | | | | | | | | | | | Allow individual fields of file or dir layouts to be set via setxattr. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit ebebf72f0993d028e795c78a986e1aee542ca5e0)
| * | mdsmap: backported is_data_pool()Sage Weil2013-02-041-0/+4
| | | | | | | | | | | | | | | | | | This roughly corresponds to mainline commit 99d9e1d. Signed-off-by: Sage Weil <sage@inktank.com>
| * | mds: fix client view of dir layout when layout is removedSage Weil2013-02-042-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | We weren't handling the case where the projected node has NULL for the layout properly. Fixes the client's view when we remove the dir layout. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 09f28541e374ffac198e4d48082b064aae93cb2c)
| * | client: note presence of dir layout in inode operator<<Sage Weil2013-02-041-0/+3
| | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 84751489ca208964e617516e04556722008ddf67)