summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* mds: properly return log replay errorwip-mdlogYan, Zheng2013-09-261-1/+1
| | | | Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
* Merge pull request #640 from ceph/wip-mon-pgmapSage Weil2013-09-251-0/+2
|\ | | | | | | | | fix mon crash when osdmap and pgmap aren't yet synced Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
| * mon/PGMonitor: fix segfault when osdmap and pgmap stats are out of syncSage Weil2013-09-251-0/+2
|/ | | | | | | | | The leader mon is responsible for propagating changes in the osdmap into the pgmap (e.g., when a pool or osd goes away). If that hasn't happened yet, the pg_map map will be out of sync with the current set of pools. We shouldn't crash. Signed-off-by: Sage Weil <sage@inktank.com>
* Merge pull request #637 from dachary/masterSage Weil2013-09-251-0/+3
|\ | | | | mailmap: add Matthew Roy, Matthew Wodrich
| * mailmap: add Matthew Roy, Matthew WodrichLoic Dachary2013-09-251-0/+3
| | | | | | | | Signed-off-by: Loic Dachary <loic@dachary.org>
* | Merge pull request #639 from ceph/wip-gtestSage Weil2013-09-251-2/+2
|\ \ | |/ |/| | | | | | | Makefile: don't use srcdir in TESTS Reviewed-by: Roald J. van Loon <roaldvanloon@gmail.com>
| * Makefile: don't use srcdir in TESTSSage Weil2013-09-251-2/+2
|/ | | | | | | | | | | src/Makefile-env.am:31: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/unittest_bufferlist.sh' src/Makefile.am:1: 'src/Makefile-env.am' included from here src/Makefile-env.am:31: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/test/encoding/check-generated.sh' src/Makefile.am:1: 'src/Makefile-env.am' included from here on my (raring) laptop. Signed-off-by: Sage Weil <sage@inktank.com>
* Merge pull request #615 from dachary/wip-jerasure-copySage Weil2013-09-252-22/+104
|\ | | | | | | | | ErasureCode: get rid of extra copy when encoding Reviewed-by: Sage Weil <sage@inktank.com>
| * ErasureCode: get rid of extra copy when encodingLoic Dachary2013-09-252-22/+104
| | | | | | | | | | | | | | | | The substr_of bufferlist method is used to reduce the copies to the strict minimum. It is both able to split bufferptr when they are larger than a chunk and to concatenate them when they are smaller. Signed-off-by: Loic Dachary <loic@dachary.org>
* | Merge pull request #634 from dachary/masterSage Weil2013-09-251-0/+81
|\ \ | | | | | | | | | | | | git: consolidate mails in commit logs Reviewed-by: Sage Weil <sage@inktank.com>
| * | git: consolidate mails in commit logsLoic Dachary2013-09-251-0/+81
| |/ | | | | | | | | | | | | Map duplicate mails / names in commit logs to a single canonical names. Useful to report to management with git shortlog -nes Signed-off-by: Loic Dachary <loic@dachary.org>
* | Merge pull request #636 from dachary/wip-get_command_descriptionSage Weil2013-09-251-2/+1
|\ \ | | | | | | | | | | | | autoconf: remove get_command_descriptions dependency to gtest Reviewed-by: Sage Weil <sage@inktank.com>
| * | autoconf: remove get_command_descriptions dependency to gtestLoic Dachary2013-09-251-2/+1
| |/ | | | | | | | | | | | | | | | | It is not required and a leftover of the time when it was a unit test which was a mistake to begin with. It has been reported to create dependencies problems in some cases, when gest is not available at the time get_command_descriptions is compiled. Signed-off-by: Loic Dachary <loic@dachary.org>
* | Merge remote-tracking branch 'gh/next'Sage Weil2013-09-247-24/+54
|\ \ | | | | | | | | | | | | Conflicts: src/osd/ReplicatedPG.cc
| * | mon/OSDMonitor: fix 'ceph osd crush reweight ...'Sage Weil2013-09-242-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The adjust method returns a count of adjusted items. Add a test. Fixes: #6382 Backport: dumpling Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com>
| * | osd: change warn_interval_multiplier to uint32_tLoic Dachary2013-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to prevent overflow in OpTracker::check_ops_in_flight when multiplying warn_interval_multiplier *= 2 Backport: cuttlefish, dumpling http://tracker.ceph.com/issues/6370 fixes #6370 Signed-off-by: Loic Dachary <loic@dachary.org> (cherry picked from commit 1bce1f009bffd3e28025a08775fec189907a81db)
| * | arch/intel: fix old commentSage Weil2013-09-241-1/+0
| | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * | arch/intel: use intel probe instructions for x86_64 onlySage Weil2013-09-242-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Not LP64, which includes ppc64 and clearly does not build. Fixes: #6283 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
| * | osd: revert 'osd max xattr size' limitSage Weil2013-09-233-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Set it to 0 (unlimited) for now. Backport: dumpling Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
| * | Merge pull request #599 from ceph/wip-6323Sage Weil2013-09-231-6/+23
| |\ \ | | | | | | | | | | | | | | | | mon: OSDMonitor: fix #6322 and #6323 Reviewed-by: Greg Farnum <greg@inktank.com>
| | * | mon: OSDMonitor: multiple rebuilt full maps per transactionJoao Eduardo Luis2013-09-171-6/+22
| | | | | | | | | | | | | | | | Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | mon: OSDMonitor: update latest_full while rebuilding full mapsJoao Eduardo Luis2013-09-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not doing so will make the monitor rebuild the osdmap full versions, even though they may have been rebuilt before, every time the monitor starts. This mostly happens when the cluster is left in an unhealthy state for a long period of time and incremental versions build up. Even though we build the full maps on update_from_paxos(), not updating 'full_latest' leads to the situation initially described. Fixes: #6322 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | mon: OSDMonitor: smaller transactions when rebuilding full versionsJoao Eduardo Luis2013-09-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, for considerably sized rebuilds, the monitor will not only consume vast amounts of memory, but it will also have troubles committing the transaction. Anyway, it's also a good idea to adjust transactions to the granularity we want, and to be fair we care that each rebuilt full map gets to disk, even if subsequent full maps don't (those can be rebuilt later). Fixes: #6323 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
* | | | Merge pull request #633 from ceph/wip-repop-leaksDavid Zafman2013-09-241-0/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | fix a copule of leaks of RepGather structs Reviewed-by: David Zafman <david.zafman@inktank.com>
| * | | | osd/ReplicatedPG: fix leak of RepGather on watch timeoutSage Weil2013-09-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new_repop() gives us a ref; we need to release it, just as we do in execute_ctx(). Backport: dumpling Signed-off-by: Sage Weil <sage@inktank.com>
| * | | | osd/ReplicatedPG: fix leak of RepGather on large-object COPY_FROMSage Weil2013-09-241-0/+1
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | new_repop() gives us a ref; we need to release it, just as we do in execute_ctx(). Signed-off-by: Sage Weil <sage@inktank.com>
* | | | doc: Removed service ops language and added reference to operations.John Wilkins2013-09-241-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | fixes: #6374 Signed-off-by: John Wilkins <john.wilkins@inktank.com>
* | | | Merge pull request #477 from jpfrancois/patch-1Sage Weil2013-09-240-0/+0
|\ \ \ \ | |/ / / |/| | | Fix for Swift key command
| * | | Fix for Swift key commandJP François2013-08-011-2/+2
| | | | | | | | | | | | When creating a secret key for the Swift user, the command without the --gen-secret option generates an empty key.
* | | | Merge pull request #630 from dachary/masterSage Weil2013-09-241-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | osd: change warn_interval_multiplier to uint32_t Reviewed-by: Sage Weil <sage@inktank.com>
| * | | | osd: change warn_interval_multiplier to uint32_tLoic Dachary2013-09-241-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to prevent overflow in OpTracker::check_ops_in_flight when multiplying warn_interval_multiplier *= 2 Backport: cuttlefish, dumpling http://tracker.ceph.com/issues/6370 fixes #6370 Signed-off-by: Loic Dachary <loic@dachary.org>
* | | | Merge pull request #628 from dachary/wip-erasure-fix-thread-testSage Weil2013-09-246-42/+41
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | ErasureCode: fix plugin loading threaded test Reviewed-by: Sage Weil <sage@inktank.com>
| * | | | ErasureCode: fix plugin loading threaded testLoic Dachary2013-09-246-42/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TEST_F(ErasureCodePluginRegistryTest, factory_mutex) was bugous and only succeeded by chance. The sleep was on the factory constructor which was never called. An erasure code plugin that hangs forever on load is created instead. The sleep_forever.detach is replaced by pthread_cancel to interrupt the thread that hangs forever. If not, gtest will try to join the thread and never exit. Signed-off-by: Loic Dachary <loic@dachary.org>
* | | | | Merge pull request #627 from dachary/masterYehuda Sadeh2013-09-241-4/+5
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | rgw: fix rgw test to reflect usage change Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | | rgw: fix rgw test to reflect usage changeLoic Dachary2013-09-241-4/+5
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | otherwise src/test/cli/radosgw-admin/help.t fails when running make check when run after a configure --with-radosgw Signed-off-by: Loic Dachary <loic@dachary.org>
* | | | Merge pull request #588 from dachary/wip-6274Sage Weil2013-09-2313-28/+1223
|\ \ \ \ | | | | | | | | | | mon: unit tests to protect against some MonCommands.h typos
| * | | | ceph_argparse: unit tests for validate_command config-keyLoic Dachary2013-09-231-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | ceph_argparse: unit tests for validate_command osdLoic Dachary2013-09-231-0/+510
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | ceph_argparse: unit tests for validate_command monLoic Dachary2013-09-231-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | ceph_argparse: unit tests for validate_command mdsLoic Dachary2013-09-231-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | ceph_argparse: unit tests for misc validate_commandLoic Dachary2013-09-231-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contrary to all other classes, this series of command ( Monitor ) does not have a common prefix. http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | ceph_argparse: unit tests for validate_command authLoic Dachary2013-09-231-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | ceph_argparse: unit tests for validate_command pgLoic Dachary2013-09-231-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | pybind: ceph_argparse unit tests foundationsLoic Dachary2013-09-231-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The general idea is to have a series of commands, in the same order as they show in mon/MonCommands.h, as if they were input to the ceph client. For each command a valid combination is verified. And at least one validation error is checked to produce a validation error. For instance: ['pg', 'stat'] is a valid command and the validate_command function is expected to return a value that is not None or {}. The command ['pg', 'stat', 'toomany' ] is also given to validate_command to check that an error occurs when an extra argument is given. The TestArparse class implements a few methods to reduce the verbosity of the tests. It does not provide many methods : only those that significantly reduce the verbosity have been implemented. The drawback of writing too many convenience methods is that they are more difficult to read and maintain. The signature dictionary is made a global variable so that it is only extracted once for all classes. It is immutable. http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | pybind: catch EntityAddress missing /Loic Dachary2013-09-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the / is missing in an EntityAddress, an ArgumentValid exception must be raised so that it can be caught in the same way other argument validation exceptions are. http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | mon: validate mon dump epoch as a positive integerLoic Dachary2013-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All other epochs are validated in the same way http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | pybind: unit tests for ceph_argparse::parse_json_funcsigsLoic Dachary2013-09-234-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run parse_json_funcsigs against the builtin commands found in mon/MonCommands.h. Although it does not provide for a full validation, it will detect some degenerate cases. It is expected to raise if a space is missing at the end of an option specification ( see https://github.com/ceph/ceph/pull/585 ) and this case is tested. New tests of the same kind can be added whenever an undetected error is found. Ideally a validation function is implemented and it would be updated ( with an associated test ) when a new pathological case is found. The json string given to parse_json_funcsigs is obtained from the support program get_command_descriptions. The python-nose dependencies are added to the build requirements in debian/control and ceph.spec.in because make check should always be run at built time. http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | .gitignore gtags(1) generated filesLoic Dachary2013-09-231-1/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | mon: get_command_descriptions support programLoic Dachary2013-09-233-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The get_command_descriptions function is not designed to be tested in C++ because all the validation happens in pybind/ceph_argparse.py. The get_command_descriptions program is designed to be used by python unit tests as a mean to get a JSON dump of the content of mon/MonCommands.h get_command_descriptions --all {"cmd000":{"sig":["pg","stat"],"help": ... "avail":"cli,rest"}} It also provides a way to reproduce and keep track of past errors ( typos etc. ) to ensure the python validation keeps catching it. get_command_descriptions --pull585 Add /get_command_descriptions to .gitignore so that git ls-files --exclude-standard --others does not see it which is required for https://github.com/ceph/autobuild-ceph/blob/f018d220f2622a9fc8c86a31e1fa13263790c399/build-ceph.sh#L73 http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>
| * | | | mon: convenience function to convert commands to jsonLoic Dachary2013-09-232-23/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The get_command_descriptions is added to Monitor.h and contains the code previously inlined in Monitor::handle_command to implement the get_command_descriptions command. It is intended for tests to convert command descriptions into json, including error cases. http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> Signed-off-by: Loic Dachary <loic@dachary.org>