summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* FileStore: handle observers in constructor/destructorwip_observerSamuel Just2013-06-191-7/+6
| | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
* FileStore: apply changes after disabling m_filestore_replica_fadviseSamuel Just2013-06-191-0/+1
| | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com> (cherry picked from commit ed8b0e65bde14d0a3a08bc233dee6a997e379dcc)
* ceph-disk: make list_partition behave with unusual device namesAlexandre Maragone2013-06-191-9/+4
| | | | | | | | | | | When you get device names like sdaa you do not want to mistakenly conclude that sdaa is a partition of sda. Use /sys/block/$device/$partition existence instead. Fixes: #5211 Backport: cuttlefish Signed-off-by: Alexandre Maragone <alexandre.maragone@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* os/FileStore: disable fadvise on XFSSage Weil2013-06-191-0/+14
| | | | | | | | | | | fadvise(DONTNEED) on XFS can break writeback ordering and zeroing; see http://oss.sgi.com/archives/xfs/2013-06/msg00066.html If we detect XFS, turn this option off. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
* Revert "client: fix warning"Sage Weil2013-06-191-1/+1
| | | | | | This reverts commit 4a3127f48d75121745f81d1aba723cb7f867f790. Wrong branch.
* mon: Monitor: make sure we backup a monmap during sync startJoao Eduardo Luis2013-06-181-3/+5
| | | | | | | | | | | | | | | | | | | First of all, we must find a monmap to backup. The newest version. Secondly, we must make sure we back it up before clearing the store. Finally, we must make sure that we don't remove said backup while clearing the store; otherwise, we would be out of a backup monmap if the sync happened to fail (and if the monitor happened to be killed before a new sync had finished). This patch makes sure these conditions are met. Fixes: #5256 (partially) Backport: cuttlefish Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* mon: Monitor: obtain latest monmap on sync store initJoao Eduardo Luis2013-06-182-13/+54
| | | | | | | | | | | Always use the highest version amongst all the typically available monmaps: whatever we have in memory, whatever we have under the MonmapMonitor's store, and whatever we have backed up from a previous sync. This ensures we always use the newest version we came across with. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* mon: Monitor: don't remove 'mon_sync' when clearing the store during abortJoao Eduardo Luis2013-06-181-1/+0
| | | | | | | | | | | | Otherwise, we will end up losing the monmap we backed up when we started the sync, and the monitor may be unable to start if it is killed or crashes in-between the sync abort and finishing a new sync. Fixes: #5256 (partially) Backport: cuttlefish Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* AuthMonitor: auth export's status message to ss, not dsDan Mick2013-06-181-1/+1
| | | | | | This puts it on stderr, not stdout Signed-off-by: Dan Mick <dan.mick@inktank.com>
* ceph.spec: create /var/run on package installSage Weil2013-06-181-0/+1
| | | | | | | | | The %ghost %dir ... line will make this get cleaned up but won't install it. Reported-by: Derek Yarnell <derek@umiacs.umd.edu> Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
* test_rados.py: add some tests for mon_commandDan Mick2013-06-181-1/+58
| | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* rados.py: wrap target in c_char_p()Dan Mick2013-06-181-4/+4
| | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* rados.py: return error strings even if ret != 0Dan Mick2013-06-181-24/+18
| | | | | | | Key rados_free() off returned length, not ret Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* ceph.in: pass parsed conffile to Rados constructorDan Mick2013-06-181-1/+1
| | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* ceph.in: global var dontsplit should be capitalizedDan Mick2013-06-181-3/+3
| | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* client: fix warningSage Weil2013-06-181-1/+1
| | | | | | signed/unsigned comparison Signed-off-by: Sage Weil <sage@inktank.com>
* common/Preforker: fix warningSage Weil2013-06-181-2/+5
| | | | | | | | | | | | | common/Preforker.h: In member function ‘int Preforker::signal_exit(int)’: warning: common/Preforker.h:82:45: ignoring return value of ‘ssize_t safe_write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result] This is harder than it should be to fix. :( http://stackoverflow.com/questions/3614691/casting-to-void-doesnt-remove-warn-unused-result-error Whatever, I guess we can do something useful with this return value. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: David Zafman <david.zafman@inktank.com>
* client: fix warningSage Weil2013-06-181-0/+6
| | | | | | | | | | client/Client.cc: In member function 'virtual void Client::ms_handle_remote_reset(Connection*)': warning: client/Client.cc:7892:9: enumeration value 'STATE_NEW' not handled in switch [-Wswitch] warning: client/Client.cc:7892:9: enumeration value 'STATE_OPEN' not handled in switch [-Wswitch] warning: client/Client.cc:7892:9: enumeration value 'STATE_CLOSED' not handled in switch [-Wswitch] Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: David Zafman <david.zafman@inktank.com>
* client: handle reset during initial mds session openSage Weil2013-06-171-1/+14
| | | | | | | | | If we get a reset during our attempt to open an MDS session, close out the Connection* and retry to open the session, moving the waiters over. Fixes: #5379 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* mon: fix 'osd dump <epoch>'Sage Weil2013-06-171-1/+3
| | | | | | | The optional epoch argument was missing from the command spec. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com>
* Merge branch 'wip-5194' into nextSage Weil2013-06-176-7/+140
|\ | | | | | | | | Reviewed-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
| * ceph-disk: add some notes on wth we are up toSage Weil2013-06-171-0/+42
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * ceph-disk: clear TERM to avoid libreadline hijinxSage Weil2013-06-171-0/+5
| | | | | | | | | | | | The weird output from libreadline users is related to the TERM variable. Signed-off-by: Sage Weil <sage@inktank.com>
| * ceph-disk-udev: set up by-partuuid, -typeuuid symlinks on ancient udevSage Weil2013-06-171-5/+17
| | | | | | | | | | | | | | Make the ancient-udev/blkid workaround script for RHEL/CentOS create the symlinks for us too. Signed-off-by: Sage Weil <sage@inktank.com>
| * ceph-disk: do not stop activate-all on first failureSage Weil2013-06-171-2/+9
| | | | | | | | | | | | | | | | Keep going even if we hit one activation error. This avoids failing to start some disks when only one of them won't start (e.g., because it doesn't belong to the current cluster). Signed-off-by: Sage Weil <sage@inktank.com>
| * ceph.spec: include partuuid rules in packageSage Weil2013-06-171-0/+1
| | | | | | | | | | | | Commit f3234c147e083f2904178994bc85de3d082e2836 missed this. Signed-off-by: Sage Weil <sage@inktank.com>
| * ceph.spec: install/uninstall init scriptSage Weil2013-06-171-2/+2
| | | | | | | | | | | | | | | | | | This was commented out almost years ago in commit 9baf5ef4 but it is not clear to me that it was correct to do so. In any case, we are not installing the rc.d links for ceph, which means it does not start up after a reboot. Signed-off-by: Sage Weil <sage@inktank.com>
| * sysvinit, upstart: ceph-disk activate-all on startSage Weil2013-06-172-0/+11
| | | | | | | | | | | | | | On 'service ceph start' or 'service ceph start osd' or start ceph-osd-all we should activate any osd GPT partitions. Signed-off-by: Sage Weil <sage@inktank.com>
| * ceph-disk: add 'activate-all'Sage Weil2013-06-171-0/+52
| | | | | | | | | | | | | | | | Scan /dev/disk/by-parttypeuuid for ceph OSDs and activate them all. This is useful when the event didn't trigger on the initial udev event for some reason. Signed-off-by: Sage Weil <sage@inktank.com>
| * udev: /dev/disk/by-parttypeuuid/$type-$uuidSage Weil2013-06-171-0/+3
| | | | | | | | | | | | We need this to help trigger OSD activations. Signed-off-by: Sage Weil <sage@inktank.com>
* | OSD: we need to check pg ?.0 for resurrectionSamuel Just2013-06-171-1/+3
| | | | | | | | | | | | | | Fixes: #5269 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* | rgw: escape prefix correctly when listing objectsYehuda Sadeh2013-06-171-2/+6
| | | | | | | | | | | | | | | | | | | | | | Fixes: #5362 When listing objects prefix needs to be escaped correctly (the same as with the marker). Otherwise listing objects with prefix that starts with underscore doesn't work. Backport: bobtail, cuttlefish Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* | client: fix ancient typo in caps revocation pathSage Weil2013-06-171-1/+1
|/ | | | | | | | | If we have dropped all references to a revoked capability, send the ack to the MDS. This typo has been there since v0.7 (early 2009)! Backport: cuttlefish Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* mon: make mark_me_down asserts match checkSage Weil2013-06-161-13/+14
| | | | | | | | The OSD may have sent a request where the message source does not match the target in the message. Verify that the target matches so that it matches the assert. Signed-off-by: Sage Weil <sage@inktank.com>
* ceph: remove space when prefix is blankSage Weil2013-06-161-4/+4
| | | | Signed-off-by: Sage Weil <sage@inktank.com>
* ceph: fix return code for multi-target commandsSage Weil2013-06-161-1/+1
| | | | Signed-off-by: Sage Weil <sage@inktank.com>
* ceph: error out properly when failing to get commandsSage Weil2013-06-161-4/+1
| | | | | | | If we make ret positive here we miss the failure check below. Instead, just set outs appropriately. Signed-off-by: Sage Weil <sage@inktank.com>
* test/admin_socket/objecter_requests: fix testSage Weil2013-06-161-1/+1
| | | | | | | Commit 2bda9db1c24530cbaaa161b7ff0a80efa913aa78 added command_ops to the result. Signed-off-by: Sage Weil <sage@inktank.com>
* ceph: do not print status to output file when talking to old monsSage Weil2013-06-161-7/+5
| | | | | | | | | | | | | | The old cli would send the status message to stdout instead of stderr; we try to emulate that behavior when talking to old monitors because they send some useful data to outs instead of the data payload. However, when outputting to a *file*, the outs would still go to stdout. Maintain that so that, e.g., ceph mon getmap -o /tmp/foo doesn't prefix the monmap with 'got latest monmap\n'. Signed-off-by: Sage Weil <sage@inktank.com>
* common/Preforker: fix broken recursion on exit(3)Sage Weil2013-06-151-2/+2
| | | | | | | | | | | | | | | | | | | | If we exit via preforker, call exit(3) and not recursively back into Preforker::exit(r). Otherwise you get a hang with the child blocked at: Thread 1 (Thread 0x7fa08962e7c0 (LWP 5419)): #0 0x000000309860e0cd in write () from /lib64/libpthread.so.0 #1 0x00000000005cc906 in Preforker::exit(int) () #2 0x00000000005c8dfb in main () and the parent at #0 0x000000309860eba7 in waitpid () from /lib64/libpthread.so.0 #1 0x00000000005cc87a in Preforker::parent_wait() () #2 0x00000000005c75ae in main () Backport: cuttlefish Signed-off-by: Sage Weil <sage@inktank.com>
* osd/OSDMap: fix is_blacklisted()Sage Weil2013-06-151-4/+10
| | | | | | | | You can only call set_port() if is_ip() is true (there is an assert in the accessor). Fixes: #5366 Signed-off-by: Sage Weil <sage@inktank.com>
* ceph: pass --format=foo to old monitorsSage Weil2013-06-141-0/+4
| | | | | | | And --threshold too, although.. really. Signed-off-by: Sage Weil <sage@inktank.com> Reviwed-by: Dan Mick <dan.mick@inktank.com>
* ceph: add newline when using old monitorsSage Weil2013-06-141-2/+6
| | | | | | | | | | | | The old tool would print a newline after outs, e.g. from 'ceph osd create'. Do the same when we are talking to old monitors. Also, put outs at the top, not the bottom! Tweak the json code to not add the newline again if we already did so above. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com>
* ceph.in: zero-arg invocation was broken (check array length)Dan Mick2013-06-141-2/+2
| | | | | | Also remove stray comment char Signed-off-by: Dan Mick <dan.mick@inktank.com>
* rules: Don't disable tcmalloc on ARM (and other non-intel)Gary Lowell2013-06-141-7/+0
| | | | | | Fixes #5342 Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
* udev: drop useless --mount argument to ceph-diskSage Weil2013-06-142-4/+4
| | | | | | It doesn't mean anything anymore; drop it. Signed-off-by: Sage Weil <sage@inktank.com>
* ceph-disk-udev: activate-journalSage Weil2013-06-141-0/+2
| | | | | | Trigger 'ceph-disk activate-journal' from the alt udev rules. Signed-off-by: Sage Weil <sage@inktank.com>
* ceph-disk: do not use mount --move (or --bind)Sage Weil2013-06-141-2/+19
| | | | | | | | | | | | | | | The kernel does not let you mount --move when the parent mount is shared (see, e.g., https://bugzilla.redhat.com/show_bug.cgi?id=917008 for another person this also confused). We can't use --bind either since that (on RHEL at least) screws up /etc/mtab so that the final result looks like /var/lib/ceph/tmp/mnt.HNHoXU /var/lib/ceph/osd/ceph-0 none rw,bind 0 0 Instead, mount the original dev in the final location and then umount from the old location. Signed-off-by: Sage Weil <sage@inktank.com>
* ceph.spec: include by-partuuid udev workaround rulesSage Weil2013-06-141-0/+2
| | | | | | | These are need for old or buggy udev. Having them for new and unbroken udev is harmless. Signed-off-by: Sage Weil <sage@inktank.com>
* ceph.spec: add missing ceph_test_rados_api_cmd to packageSage Weil2013-06-141-0/+1
| | | | Signed-off-by: Sage Weil <sage@inktank.com>