summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* test: test for replica ops perf counterwip-localized-read-testsNoah Watkins2013-01-051-0/+5
| | | | | | Tests that the op_send_replica performance counter exists. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* test: access objecter ops sent to replica in gtestNoah Watkins2013-01-053-3/+27
| | | | | | | | | | Constructs a unique /tmp/path admin socket for the client before each unit test. Adds an accessor for lazily reading performance counters to grab the number of ops sent to a replica by the objecter. Enables json_spirit MVALUE to make finding the value in the JSON easier. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* tools: create noinst libtools_commonNoah Watkins2013-01-054-60/+89
| | | | | | | | | Creates a non-installed static libtools_common library from tools/common.cc and moves do_admin_socket(..) into the library from tools/ceph.cc. This routine is useful in the unit tests for connecting to and querying an admin socket. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* osdc: track number of ops sent to a replicaNoah Watkins2013-01-051-0/+4
| | | | | | | | Adds l_osdc_op_send_replica performance counter to count the number of operations queued up on a connection to an osd that isn't the primary for the operation being handled. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* test: run w/ and w/o read from replica enabledNoah Watkins2013-01-051-26/+80
| | | | | | | | | | | | | | | | | This patch does two things. First, it uses value-parameterized version of the test fixture which allows us to pass in a boolean flag that enables/disable read from replica feature. We create two instances of the fixture (true and false), so we run all the tests twice, once for each state. Existing tests use getpid() to create unique file names, but often don't clean up after themselves. Since each tests is run in the same process more than once, the names are no longer unique to the test instance. To handle this case we change the fixture to construct a unique directory that the mount is rooted in to create a clean room directory for each test. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* test: auto create/cleanup ceph mount instancesNoah Watkins2013-01-051-198/+91
| | | | | | | | | Adds a test fixture which creates and destroys a ceph mount automatically for each test. This lets us easily alter the mount before each test runs. We'll use this to enable/disable local reads for each test. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* test: consolidate tests into single fileNoah Watkins2013-01-053-61/+43
| | | | | | | This will avoid having to construct a new header file to be shared between files with tests when the test fixture is added. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* test: cleanup opendir and shutdown in testNoah Watkins2013-01-051-0/+3
| | | | | | | ceph_shutdown will hang unless we close the directory. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> Signed-off-by: Sam Lang <sam.lang@inktank.com>
* Merge branch 'next'Sage Weil2013-01-049-41/+72
|\
| * osd: special case CALL op to not have RD bit effectsSage Weil2013-01-042-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 20496b8d2b2c3779a771695c6f778abbdb66d92a we treat a CALL as different from a normal "read", but we did not adjust the behavior determined by the RD bit in the op. We tried to fix that in 91e941aef9f55425cc12204146f26d79c444cfae, but changing the op code breaks compatibility, so that was reverted. Instead, special-case CALL in the helper--the only point in the code that actually checks for the RD bit. (And fix one lingering user to use that helper appropriately.) Fixes: #3731 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com>
| * Revert "OSD: remove RD flag from CALL ops"Sage Weil2013-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 91e941aef9f55425cc12204146f26d79c444cfae. We cannot change this op code without breaking compatibility with old code (client and server). We'll have to special case this op code instead. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com>
| * ReplicatedPG: remove old-head optization from push_to_replicaSamuel Just2013-01-041-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This optimization allowed the primary to push a clone as a single push in the case that the head object on the replica is old and happens to be at the same version as the clone. In general, using head in clone_subsets is tricky since we might be writing to head during the push. calc_clone_subsets does not consider head (probably for this reason). Handling the clone from head case properly would require blocking writes on head in the interim which is probably a bad trade off anyway. Because the old-head optimization only comes into play if the replica's state happens to fall on the last write to head prior to the snap that caused the clone in question, it's not worth the complexity. Fixes: #3698 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
| * os/FileStore: fix non-btrfs op_seq commit orderSage Weil2013-01-031-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The op_seq file is the starting point for journal replay. For stable btrfs commit mode, which is using a snapshot as a reference, we should write this file before we take the snap. We normally ignore current/ contents anyway. On non-btrfs file systems, however, we should only write this file *after* we do a full sync, and we should then fsync(2) it before we continue (and potentially trim anything from the journal). This fixes a serious bug that could cause data loss and corruption after a power loss event. For a 'kill -9' or crash, however, there was little risk, since the writes were still captured by the host's cache. Fixes: #3721 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
| * OSD: for old osds, dispatch peering messages immediatelySamuel Just2013-01-032-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, we batch up peering messages until the end of process_peering_events to allow us to combine many notifies, etc to the same osd into the same message. However, old osds assume that the actiavtion message (log or info) will be _dispatched before the first sub_op_modify of the interval. Thus, for those peers, we need to send the peering messages before we drop the pg lock, lest we issue a client repop from another thread before activation message is sent. Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
| * Merge remote-tracking branch 'gh/wip-3714-b' into nextSage Weil2013-01-032-16/+19
| |\ | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| | * osd: move common active vs booting code into consume_mapSage Weil2013-01-022-11/+18
| | | | | | | | | | | | | | | | | | | | | Push osdmaps to PGs in separate method from activate_map() (whose name is becoming less and less accurate). Signed-off-by: Sage Weil <sage@inktank.com>
| | * osd: let pgs process map advances before bootingSage Weil2013-01-021-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OSD deliberate consumes and processes most OSDMaps from while it was down before it marks itself up, as this is can be slow. The new threading code does this asynchronously in peering_wq, though, and does not let it drain before booting the OSD. The OSD can get into a situation where it marks itself up but is not responsive or useful because of the backlog, and only makes the situation works by generating more osdmaps as result. Fix this by calling activate_map() even when booting, and when booting draining the peering_wq on each call. This is harmless since we are not yet processing actual ops; we only need to be async when active. Fixes: #3714 Signed-off-by: Sage Weil <sage@inktank.com>
| | * osd: drop oldest_last_clean from activate_mapSage Weil2013-01-021-6/+0
| | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| | * osd: drop unused variables from activate_mapSage Weil2013-01-021-4/+0
| |/ | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * OSDMap: fix modifed -> modified typoSage Weil2013-01-023-4/+4
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | libcephfs: delete client after messenger shutdownNoah Watkins2013-01-041-2/+4
| | | | | | | | | | | | | | | | Prevents race between messages being dispatched to the client after the client has been free'd. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | rbd: Don't call ProgressContext's finish() if there's an error.Dan Mick2013-01-041-2/+4
| | | | | | | | | | | | | | | | do_copy was different from the others; call pc.fail() on error and do not call pc.finish(). Fixes: #3729 Signed-off-by: Dan Mick <dan.mick@inktank.com>
* | Merge remote branch 'origin/wip-rbd-watch'Josh Durgin2013-01-044-60/+15
|\ \ | | | | | | | | | Reviewed-by: Dan Mick <dan.mick@inktank.com>
| * | librbd: establish watch before reading headerJosh Durgin2013-01-021-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | This eliminates a window in which a race could occur when we have an image open but no watch established. The previous fix (using assert_version) did not work well with resend operations. Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
| * | Revert "librbd: ensure header is up to date after initial read"Josh Durgin2013-01-024-50/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using assert version for linger ops doesn't work with retries, since the version will change after the first send. This reverts commit e1776809031c6dad441cfb2b9fac9612720b9083. Conflicts: qa/workunits/rbd/watch_correct_version.sh
* | | doc: Removed the --without-tcmalloc flag until further advised.John Wilkins2013-01-031-7/+0
| | | | | | | | | | | | Signed-off-by: John Wilkins <john.wilkins@inktank.com>
* | | Merge pull request #30 from rca/masterSage Weil2013-01-031-2/+5
|\ \ \ | | | | | | | | Minor clarification in docs.
| * | | Update doc/rados/configuration/filesystem-recommendations.rstrca2013-01-031-2/+5
| | | | | | | | | | | | | | | | | | | | Clarified when it's necessary to use the setting: filestore xattr use omap = true
* | | | doc: Added defaults for PGs, links to recommended settings, and updated note ↵John Wilkins2013-01-031-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on splitting. Fixes: #3555 Signed-off-by: John Wilkins <john.wilkins@inktank.com>
* | | | doc: Added comments on --without-tcmalloc option when building Ceph.John Wilkins2013-01-031-6/+16
| | | | | | | | | | | | | | | | Signed-off-by: John Wilkins <john.wilkins@inktank.com>
* | | | doc: Added some packages to the copyable line.John Wilkins2013-01-031-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #3686 Signed-off-by: John Wilkins <john.wilkins@inktank.com>
* | | | doc: Fixed syntax error.John Wilkins2013-01-031-1/+1
|/ / / | | | | | | | | | Signed-off-by: John Wilkins <john.wilkins@inktank.com>
* | | qa/workunit: Add dbench-short.sh for nfs suiteDavid Zafman2013-01-031-0/+5
| | | | | | | | | | | | | | | | | | | | | A multi-client dbench run doesn't work over NFS, see bug #3718. Make single client dbench available. Signed-off-by: David Zafman <david.zafman@inktank.com>
* | | Merge remote-tracking branch 'gh/next'Sage Weil2013-01-024-36/+93
|\ \ \ | | |/ | |/|
| * | log: fix locking typo/stupid for dump_recent()Sage Weil2013-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We weren't locking m_flush_mutex properly, which in turn was leading to racing threads calling dump_recent() and garbling the crash dump output. Backport: bobtail, argonaut Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com>
| * | fuse: Fix cleanup code path on init failureSam Lang2013-01-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | With the changes from 856f32ab, the cfuse.init call returns a _positive_ errno, which was getting ignored. Also, if an error occurs during cfuse.init(), we need to teardown the client mount. Signed-off-by: Sam Lang <sam.lang@inktank.com>
| * | Merge branch 'wip-journal-aio' into nextSage Weil2013-01-022-33/+89
| |\ \ | | | | | | | | | | | | | | | | Reviewed-by: Samuel Just <sam.just@inktank.com> Backport: bobtail
| | * | test_filejournal: optionally specify journal filename as an argumentSage Weil2013-01-021-2/+7
| | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| | * | test_filejournal: test journaling bl with >IOV_MAX segmentsSage Weil2013-01-021-0/+38
| | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| | * | os/FileJournal: limit size of aio submissionSage Weil2013-01-021-29/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Limit size of each aio submission to IOV_MAX-1 (to be safe). Take care to only mark the last aio with the seq to signal completion. Signed-off-by: Sage Weil <sage@inktank.com>
| | * | os/FileJournal: logger is optionalSage Weil2012-12-281-2/+4
| | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | | | Merge branch 'master' of https://github.com/ceph/cephJohn Wilkins2013-01-021-2/+2
|\ \ \ \
| * | | | qa/workunit: Update pjd script to use new tarballSam Lang2013-01-021-2/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | The pjd script now uses the latest version of pjd with an additional test for opening a non-existent file. Signed-off-by: Sam Lang <sam.lang@inktank.com>
* | | | doc: Added a memory profiling section. Ported from the wiki.John Wilkins2013-01-021-0/+96
| | | | | | | | | | | | | | | | Signed-off-by: John Wilkins <john.wilkins@inktank.com>
* | | | doc: Added memory profiling to the index.John Wilkins2013-01-021-0/+1
|/ / / | | | | | | | | | Signed-off-by: John Wilkins <john.wilkins@inktank.com>
* | | doc: Minor edits.John Wilkins2013-01-021-9/+4
| | | | | | | | | | | | Signed-off-by: John Wilkins <john.wilkins@inktank.com>
* | | doc: Fixed typo, clarified usage.John Wilkins2013-01-021-8/+6
| | | | | | | | | | | | Signed-off-by: John Wilkins <john.wilkins@inktank.com>
* | | Merge remote-tracking branch 'gh/wip-bobtail-docs'Sage Weil2013-01-016-19/+480
|\ \ \ | |/ / |/| |
| * | doc/release-notes: link to upgrade docSage Weil2012-12-291-1/+3
| | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * | doc/install/upgrading: edits to upgrade documentSage Weil2012-12-291-32/+31
| | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>