Commit Graph

28762 Commits

Author SHA1 Message Date
David Zafman
acc47d234a include: Bug fixes for CompatSet
FeatureSet insert/remove
  Use 64-bit arithmetic to allow features past 31
  Allow feature 63 by fixing assert in insert
CompatSet::unsupported() bugs
  Ignore feature 0 which became illegal
  Use 64-bit arithmetic when computing mask
  Use id in insert() and to get correct feature name
  Use the right map to get name for diff.ro_compat

Caused by 80979bbe92
Caused by 470796b545

Backport: dumpling, cuttlefish

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-09-26 11:24:40 -07:00
David Zafman
98b3cd3a78 os: Fix version_stamp_is_valid() and write_version_stamp() error return
Caused by 341fb208aa

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-09-26 11:24:31 -07:00
David Zafman
362dba1086 os, ceph_osd: Rename on_disk_version to target_version
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-09-23 13:12:41 -07:00
David Zafman
7b7e004611 os: Prior version bump should have updated this
Version available as argument, so use instead of constant

Caused by dab238b0fb

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-09-23 13:11:31 -07:00
David Zafman
8407669e42 os: Code conformance of os/LFNIndex.cc
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-09-23 11:57:10 -07:00
David Zafman
0d47bf8ace os: Fix typo in comment
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-09-23 11:57:10 -07:00
David Zafman
c4bcb469ad common: Fix get_namespace() definition in hobject_t
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-09-23 11:57:10 -07:00
David Zafman
1c0aecbe4a osd: Add assert() on collection_getattr() failure instead of later decode crash
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-09-23 11:57:09 -07:00
David Zafman
0655cc156f tools: Fix ceph_filestore_dump usage again
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-09-23 11:57:09 -07:00
Sage Weil
5bc4610855 Merge pull request #605 from dachary/wip-erasure-code-plugin-test
erasure code plugin test
2013-09-23 10:27:47 -07:00
Sage Weil
10f291838e Merge pull request #603 from dachary/wip-erasure-code-example
erasure code example cleanup
2013-09-23 10:26:48 -07:00
Sage Weil
b683005c21 Merge pull request #607 from ceph/prctl-getname-test
code_env: use feature test for PR_GET_NAME support

Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-23 10:14:07 -07:00
Sage Weil
6b745c9491 Merge pull request #616 from ceph/automake-flags
automake: fixup am_common_flags to avoid re-definitions

Reviewed-by: Roald J. van Loon <roaldvanloon@gmail.com>
2013-09-23 10:12:16 -07:00
Gregory Farnum
2299c4dbf2 Merge pull request #614 from ceph/wip-rados-model
Prevent copy_from against yourself, and fix issues with the testing framework around it

Reviewed-by: Greg Farnum <greg@inktank.com>
2013-09-23 09:55:32 -07:00
Sage Weil
10363daddb Merge remote-tracking branch 'gh/next' 2013-09-23 09:50:10 -07:00
Wido den Hollander
991139bc0d doc: When bootstrapping mon set the correct caps for client.admin
Otherwise client.admin will be privilege-less and the admin can't
access the cluster.
2013-09-23 13:52:51 +02:00
Noah Watkins
0a439745c4 automake: add per-target AM_CPPFLAGS
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-09-21 10:41:17 -07:00
Noah Watkins
11d8d75595 makefile-env: separate cppflags and cflags usage
AM_COMMON_FLAGS included both CPP and C[XX] flags. This can cause
re-definition errors like this:

make[4]: Nothing to be done for `all-am'.
CXX      cls/version/cls_version_client.o
<command-line>: warning: "__STDC_FORMAT_MACROS" redefined

because the macro definition appears in both AM_CXXFLAGS and
AM_CPPFLAGS.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-09-21 10:24:04 -07:00
João Eduardo Luís
3c64784e3f Merge pull request #612 from ceph/wip-6361
perfglue/heapprofiler: expect cmd name when handling command instead of 'heap <cmd>'

This was broken by the cli rework.

Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-09-21 04:40:55 -07:00
Sage Weil
2b75abbd85 ceph_test_rados: fix COPY_FROM completion
Fix the copy_from operation to not remove the objects from the in_use list
until after the entire operation is complete.  In particular, the racing
read was completing and removing the dest oid from the in-use list before
the copy-from completed.  This keeps the model in sync with what the OSD
is actually doing.

If another new read started up, it would grab the previous value from the
model and expect to see that, but would instead see the updated value.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-20 21:06:09 -07:00
Sage Weil
935eb22833 ceph_test_rados: fix seq_num, improve error output
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-20 20:49:55 -07:00
Sage Weil
4d0ee0b55b ceph_test_rados: limit max_in_flight to objects/2
In particular, we need to allow all in-flight ops to be COPY_FROM.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-20 20:44:36 -07:00
Sage Weil
303bc68e97 ceph_test_rados: do not COPY_FROM self
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-20 20:43:12 -07:00
Sage Weil
59ee51aff7 osd/ReplicatedPG: handle COPY_FROM self
Return EINVAL if we try to COPY_FROM ourselves.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-20 20:43:00 -07:00
Dan Mick
08a97ae45f Merge pull request #592 from ceph/wip-6287
mon/OSDMonitor: make busy creating pgs message more explicit

Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-09-20 15:44:34 -07:00
Dan Mick
2d089e4644 Merge pull request #608 from dachary/wip-6357
mon: fix inverted test in osd pool create

Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-09-20 15:41:09 -07:00
Dan Mick
5cb7b2985e mon: fix wrong arg to "instructed to" status message
Fixes: #6293
Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 16ebb25f7c)
2013-09-20 15:27:28 -07:00
Yehuda Sadeh
9e98620e43 rgw: destroy get_obj handle in copy_obj()
Fixes: #6176
Backport: dumpling
We take different code paths in copy_obj, make sure we close the handle
when we exit the function. Move the call to finish_get_obj() out of
copy_obj_data() as we don't create the handle there, so that should
makes code less confusing and less prone to errors.
Also, note that RGWRados::get_obj() also calls finish_get_obj(). For
everything to work in concert we need to pass a pointer to the handle
and not the handle itself. Therefore we needed to also change the call
to copy_obj_data().

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-09-20 14:07:35 -07:00
John Wilkins
556956f449 Merge pull request #613 from ceph/wip-6356
note that ceph-deploy should not be called with sudo on certain situations
2013-09-20 13:08:06 -07:00
Alfredo Deza
c28dd12c09 note that ceph-deploy should not be called with sudo on certain situations
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2013-09-20 16:02:28 -04:00
Joao Eduardo Luis
b1eeaddd5f qa: workunits: cephtool: check if 'heap' commands are parseable
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-09-20 17:51:50 +01:00
Joao Eduardo Luis
296f2d0db3 osd: OSD: add 'heap' command to known osd commands array
Must have been forgotten during the cli rework.

Backport: dumpling

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-09-20 17:51:42 +01:00
Joao Eduardo Luis
238fe272c6 mds: MDS: pass only heap profiler commands instead of the whole cmd vector
The heap profiler doesn't care, nor should it, what our command name is.
It only cares about the commands it handles.

Backport: dumpling

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-09-20 17:51:21 +01:00
Joao Eduardo Luis
c98b910d49 perfglue/heap_profiler.cc: expect args as first element on cmd vector
We used to pass 'heap' as the first element of the cmd vector when
handling commands.  We haven't been doing so for a while now, so we
needed to fix this.

Not expecting 'heap' also makes sense, considering that what we need to
know when we reach this function is what command we should handle, and
we should not care what the caller calls us when handling his business.

Fixes: #6361
Backport: dumpling

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-09-20 17:51:10 +01:00
Samuel Just
e112a8348a FileStore: only remove the omap entries if nlink == 1
Fixes: #6359
Introduced in 17c5d765d7
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-20 09:30:06 -07:00
Yehuda Sadeh
7c1d2ded8f lru_map: don't use list::size()
replace list::size() with map::size(), which should have
a constant time complexity.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-09-20 08:56:22 -07:00
Yehuda Sadeh
532e41a998 common/lru_map: rename tokens to entries
This code was originally used in a token cache, now
as a generic infrastructure rename token fields.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-09-20 08:55:46 -07:00
Yehuda Sadeh
ca984e321e bufferlist: don't use list::size()
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-09-20 08:55:12 -07:00
Sage Weil
04de6a839f Merge pull request #590 from ceph/wip-6284
osdc/ObjectCacher: finish contexts after dropping object reference

Tested: ubuntu@teuthology:/a/sage-2013-09-19_19:40:56-fs-wip-6284-testing-basic-plana
Reviewed-by: Sage Weil <sage@inktank.com>
2013-09-20 08:46:29 -07:00
Sage Weil
0681971e62 Makefile: add extra cls DENCODER_DEPS in the cls makefile, not rgw
They belong next to the class.  Also, if rgw isn't built, ceph-dencoder
will fail to link.

Fixes: #6352
Tested-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-19 21:03:36 -07:00
David Zafman
91dcdec18e Merge pull request #609 from dmick/wip-6293
mon: fix wrong arg to "instructed to" status message

Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-09-19 18:06:27 -07:00
Dan Mick
16ebb25f7c mon: fix wrong arg to "instructed to" status message
Fixes: #6293
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-09-19 16:05:01 -07:00
Loic Dachary
bcc1680ad2 mon: fix inverted test in osd pool create
When using the properties key=value only, the test was inverted
and an attempt to obtain a substring at index string::npos throws
an exception.

Add variations of osd pool create to qa/workunits/mon/pool_ops.sh
to assert the problem has been fixed and all code paths are used.

http://tracker.ceph.com/issues/6357 fixes #6357

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-20 00:33:13 +02:00
Noah Watkins
f3718c29bb code_env: use feature test for PR_GET_NAME support
Function `get_process_name` has platform specific dependencies. Check
for Linux prctl function and correct command flag.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-09-19 15:00:31 -07:00
Yehuda Sadeh
08fe028bad rgw: use bufferlist::append() instead of bufferlist::push_back()
push_back() expects char *, whereas append can append a single char.
Appending a NULL char to push_back is cast as a NULL pointer which is
bad.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-09-19 13:03:11 -07:00
Gary Lowell
5216ed134b Merge pull request #604 from ceph/wip-buck-centos-core
Wip buck centos core
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-09-19 13:01:00 -07:00
Sage Weil
fd6646f256 Makefile: fix unittest_arch
Also broken by makefile refactor.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-19 12:52:53 -07:00
Sage Weil
5421d6da2c Makefile: fix unittest_crc32c
This got dropped during the makefile refactor.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-19 08:48:23 -07:00
Loic Dachary
4c9497f9be ErasureCode: complete plugin loader unit tests
* TestErasureCodePluginExample.cc is renamed to TestErasureCodePlugin.cc
  because it's not limited to the example which is really used to
  support tests rather than being tested.

* Bugous plugins are added to exhibit failures and enable the unit tests
  to check they are handled as expected

  ErasureCodePluginFailToInitialize : the entry point returns != 0
  ErasureCodePluginFailToRegister : the plugin registry is not updated
  ErasureCodePluginMissingEntryPoint : the shared library has no entry
  point

* It would be difficult to prove that the mutex protecting against
  multiple loads actually does what it is expected to because of the
  lack of thread introspection functions such as : tell me if this
  thread is waiting on this mutex. A simpler approach is chosen : create
  a thread that blocks forever when loading ( that's what the delay in
  the example plugin is for ) and then check that the lock has indeed
  been acquired. Since this mutex is merely about making sure that only
  one thread at a time runs this sequence of code, it's probably enough.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-19 09:47:53 +02:00
Loic Dachary
7324931d5e ErasureCode: plugin loading in progress flag
The bool loading data member of ErasureCodePluginRegistry is
set to true when a plugin is being loaded, to provide an observable side
effect for test purposes.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-19 09:47:53 +02:00