Commit Graph

38193 Commits

Author SHA1 Message Date
John Spray
a58d104288 mds: support constness in MDSCacheObjects
So that one can have const CInode and CDir references
from time to time.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-09 14:20:59 +00:00
Jason Dillaman
e9033bb121 librbd: shadow variable in snap_unprotect and list_children
The shadow variable prevented snap_unprotect from returning the
correct error return code.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-09 08:28:18 -05:00
Wido den Hollander
cf432fa670 doc: Add Librados PHP documentation 2015-01-09 14:16:08 +01:00
Loic Dachary
9e356cddeb Merge pull request #3332 from dachary/wip-9570-filejournal
journal related cleanups

Reviewed-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-01-09 13:57:11 +01:00
Andreas Peters
d994e601d2 common: Formatter: cosmetic re-indent
Signed-off-by: Andreas Peters <andreas.joachim.peters@cern.ch>
2015-01-09 13:20:44 +01:00
Andreas-Joachim Peters
e797dcf6e9 common: Formatter: add TableFormatter class
For more human readable and shell parsable output.

Signed-off-by: Andreas Peters <andreas.joachim.peters@cern.ch>
2015-01-09 13:20:43 +01:00
Loic Dachary
bcdbbd560c os: fix confusing indentation in FileJournal::corrupt
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2015-01-09 13:05:09 +01:00
Loic Dachary
ecc3bcabde os: remove debug message leftover in FileJournal
The len of the buffer shows in the message above anyway.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2015-01-09 13:05:09 +01:00
Loic Dachary
63c8dd0a3f msg: initialize AsyncConnection::port
http://tracker.ceph.com/issues/10493 Fixes: #10493

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-09 11:57:58 +01:00
Xiaoxi Chen
c60f88ba8a Bump memstore_device_bytes from U32 to U64
U32 limit the max size of memstore to a few GB, which
block our test on memstore performance(as a phototype).

Bump it to U64 will suit for more widely usage

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
2015-01-09 16:15:06 +08:00
Sage Weil
20be188d5f osd: assert there is a peering event
This became conditional way back in 12e22b3d44
for unclear reasons.  It probably predates the in_use checks.  In any case,
at this point, we should only arrive here if the PG was queued, implying
that there will always be an event to process.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-08 16:14:56 -08:00
Sage Weil
492ccc900c osd: requeue PG when we skip handling a peering event
If we don't handle the event, we need to put the PG back into the peering
queue or else the event won't get processed until the next event is
queued, at which point we'll be processing events with a delay.

The queue_null is not necessary (and is a waste of effort) because the
event is still in pg->peering_queue and the PG is queued.

Note that this only triggers when we exceeed osd_map_max_advance, usually
when there is a lot of peering and recovery activity going on.  A
workaround is to increase that value, but if you exceed osd_map_cache_size
you expose yourself to crache thrashing by the peering work queue, which
can cause serious problems with heavily degraded clusters and bit lots of
people on dumpling.

Backport: giant, firefly
Fixes: #10431
Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-08 16:14:56 -08:00
Matt Richards
49d114f1ff librados: Translate operation flags from C APIs
The operation flags in the public C API are a distinct enum
and need to be translated to Ceph OSD flags, like as happens in
the C++ API. It seems like the C enum and the C++ enum consciously
use the same values, so I reused the C++ translation function.

Signed-off-by: Matthew Richards <mattjrichards@gmail.com>
2015-01-08 13:16:17 -08:00
Sage Weil
1e444e9103 Merge pull request #3321 from cernceph/wip-nobarrier-doc
doc: don't suggest mounting xfs with nobarrier

Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-08 13:06:07 -08:00
Sage Weil
c2929f14b9 Merge pull request #3322 from dachary/wip-10426-test-directories
tests: group clusters in a single directory

Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-08 12:57:53 -08:00
Gregory Farnum
1b22857f2b Merge pull request #3306 from ceph/wip-10041
client: fix mount timeout

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-01-08 10:39:31 -08:00
Sage Weil
6edfcc1dbd mds: allow 'ops' as shorthand for 'dump_ops_in_flight'
This is an extremely annoying thing to type when working with a
production cluster.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-08 10:36:22 -08:00
Sage Weil
1617fbb34a osd: allow 'ops' as shorthand for 'dump_ops_in_flight'
This is an extremely annoying thing to type when working with a
production cluster.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-08 10:36:15 -08:00
Loic Dachary
3d2fbf70bd tests: group clusters in a single directory
Group all test directories used for mini clusters into a single
sub-directory (testdir). This is easier to cleanup manually and less
error prone.

http://tracker.ceph.com/issues/10426 Fixes: #10426

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-08 12:53:57 +01:00
Loic Dachary
3c1d3ddca5 Merge pull request #3215 from dachary/wip-10384-ceph-test-helper-races
tests: resolve ceph-helpers races

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-01-08 12:02:32 +01:00
Dan van der Ster
bd7be04d6e doc: don't suggest mounting xfs with nobarrier
nobarrier is dangerous, so stop suggesting it as an example osd mount
options xfs.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
2015-01-08 09:49:10 +01:00
Yan, Zheng
4280d004fb Merge pull request #3310 from ceph/wip-mdsmonitor-fixes
MDSMonitor fixes
2015-01-08 09:55:01 +08:00
Josh Durgin
f31020dac2 Merge pull request #3167 from ceph/wip-10307
rgw: use s->bucket_attrs instead of trying to read obj attrs

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-07 13:23:44 -08:00
Loic Dachary
1c1f7c35e9 Merge pull request #3036 from dachary/wip-make-check
packages: add python-virtualenv and xmlstarlet

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-01-07 16:47:26 +01:00
John Spray
e9a29c58b6 Merge pull request #3269 from ceph/wip-10387
client: close dirfrag whem rmdir

Reviewed-by: John Spray <john.spray@redhat.com>
2015-01-07 14:30:02 +00:00
John Spray
97cc409fed mon/MDSMonitor: fix mds fail for standby MDSs
This command takes a gid, rank or name, but
in the name case it would previously only work if
the named daemon had a rank assigned (mds_info->rank >= 0),
otherwise it would fail silently.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-07 14:13:12 +00:00
John Spray
c400ba1e26 mon/MDSMonitor: respect MDSMAP_DOWN when promoting standbys
Previously, a standby could become active even if 'cluster_down'
had been run.  This was awkward, because it would get you a
"laggy or crashed" mds for the standby that was actually
up and running, just being ignored because of cluster_down.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-07 14:13:12 +00:00
Loic Dachary
487c22a8a4 init-ceph: stop returns before daemons are dead
The existence of the pidfile must be checked outside of the loop to send
a signal to the daemon. Otherwise the daemon will remove the pidfile and
stop can return before the process is dead because it only checks
/proc/$pid if the pidfile exists.

http://tracker.ceph.com/issues/10389 Fixes: #10389

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-07 10:52:20 +01:00
Yan, Zheng
485d139015 client: fix mount timeout
implement a simple timeout mechanism for make_request()

Fixes: #10041
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-01-07 16:27:25 +08:00
Josh Durgin
6fd348fe43 Merge remote-tracking branch 'origin/wip-10270' into master
Reviewed-by: Josh Durgin <jdurgin@redhat.com>

Conflicts:
	src/librados/IoCtxImpl.cc
	src/librados/IoCtxImpl.h
2015-01-06 15:24:14 -08:00
Sage Weil
1a13d92b34 Merge branch 'wip-fast-txn'
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
2015-01-06 13:48:37 -08:00
Sage Weil
95d2174ece osd/ECBackend: make sure localt uses tbl is ec txn does
Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-06 13:29:41 -08:00
Sage Weil
5d66525209 ceph-object-corpus: drop compat with old ObjectStore::Transaction
Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-06 13:29:41 -08:00
Dong Yuan
0354305db7 osd: fix Transaction::get_data_offset bug when map layout used
add following offset:
  sizeof(__u8) +      // encode struct_v
  sizeof(__u8) +      // encode compat_v
  sizeof(__u32);      // encode len

Change-Id: I5b6662eb42aeeae64baa8699da6ce65e0b1d58c3
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
2015-01-06 13:29:41 -08:00
Dong Yuan
fda601976b osd: add feature CEPH_FEATURE_OSD_TRANSACTION_MAY_LAYOUT (1ULL<<47)>>)
This feature determine whether we use tbl encode for transaction of use
the new map layout.

The primary uses peer_features to determine whether transaction should
use tbl, while the replica just follow the primary.

Change-Id: I92ca6e5b59bd1acde6007ad0dffc085be17accab
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
2015-01-06 13:29:41 -08:00
Dong Yuan
5da6b41f87 osd: build fields for Transaction::iterator when tbl is used
When tbl is used (for compatibility), the Transaction::begin method need
to build all fields used by iterator. That includes: coll_index,
object_index, data_bl, op_bl, etc.)

Change-Id: I48ea74fec8d052f50da254a726a9c0dffead19bc
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
2015-01-06 13:29:06 -08:00
Sage Weil
1889d390e0 ceph_perf_objectstore: fix warning
Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-06 13:29:06 -08:00
Dong Yuan
d427ca3540 osd: Transaction::append & Transaction::swap
Finish append and swap for new Transaction encode/decode layout.

Since append will modify the op_bl now, we changed the order of append
and swap in ReplicatedBackend::sub_op_modify and
ReplicatedBackend::submit_transaction to avoid append call on op_t, so
the op_t can be encode in message.

Change-Id: I6fb421e0defdb092fb9732eef818e90291b039f5
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
2015-01-06 13:29:06 -08:00
Dong Yuan
6b2103b728 osd: new Transaction::iterator interface
This patch add new Transaction::iterator interface according to new
encode/decode layout. The new iterator give the whole Op struct in a
single decode_op method.

All ObjectStore Impl (FileStore/MemStore/KeyValueStore) is also changed
to use the new interface.

Change-Id: I1900a6ec302890df2c4357b071e4966c26d7f037
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
2015-01-06 13:29:06 -08:00
Dong Yuan
a4575d1018 osd: add encode/deocde impl for new layout
When use_tbl is true, Transaction::encode will give the same result as
before, while when use_tbl is false, Transaction::encode will use new
field and logic to encode and all related methods such as
get_encoded_bytes, get_data_offset will do the same.

Change-Id: Ia5864e489d47f37cf496fe3fb825b21977d2d938
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
2015-01-06 13:29:06 -08:00
Dong Yuan
3db4f696e5 osd: new format for Transaction encode/decode
This patch add a new fixed size struct Transaction::Op to represent
all actions.

All coll and ghobject used by the transaction are keeped in two maps:
  coll:   map<coll_t, __le32> coll_index;
  object: map<ghobject_t, __le32> object_index;

And the Op struct use the map value(__le32) to refer coll and object,
so each coll and object is only need to encode once in the transaction.

Other variable-size fields(key/value/data) is encoded in bufferlist
data_bl.

Change-Id: I52b2fcd3217a6cb35de7b309a6dd74a99478feb2
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
2015-01-06 13:29:06 -08:00
Dong Yuan
dbae92253f osd: Add Transaction::TransactionData for fast encode/decode
TransactionData wrap the following fields:
      __le64 ops;
      __le32 largest_data_len;
      __le32 largest_data_off;
      __le32 largest_data_off_in_tbl;
      __le32 pad; //make TransactionData multiple of uint64_t

This struct can encode/decode just by a single memcpy instead of many
encode/decode operations.

Change-Id: I56df78def43bd2b80b77be0825756e133434a6e6
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
2015-01-06 13:29:06 -08:00
Dong Yuan
3bd0042154 osd: remove unused Transaction fields
We don't need sobject and pool_override anymore since we don't need to
support anything older than dumpling.

Change-Id: I22c01d4b5c6bf99765bf6bc13aecadc997d6750c
Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
2015-01-06 13:29:06 -08:00
Loic Dachary
ebfe230680 Merge pull request #3272 from trociny/tell-mon-version
cli: make ceph tell mon.* version work

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-01-06 19:35:36 +01:00
Loic Dachary
34c0e17d53 Merge pull request #3196 from tchaikov/shadow-cct
client, librados, osdc: do not shadow Dispatcher::cct

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-01-06 19:34:20 +01:00
Loic Dachary
815bb9c237 Merge pull request #3298 from majianpeng/fix5
TestLFNIndex.cc: For root, dont do permission operations.

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-01-06 19:32:27 +01:00
Loic Dachary
de0213457d tests: resolve ceph-helpers races
Some tests were racing against the monitor. On a fast machine it worked
but slower machines (or sometime when running in parallel), the monitor
is lagging behind. Use wait_for_clean to make sure the monitor is in the
desired state for the test to succeed.

http://tracker.ceph.com/issues/10384 Fixes: #10384

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-06 19:10:34 +01:00
Loic Dachary
d7142d9a70 Merge pull request #3283 from dachary/wip-make-debs
debian: create a repository from sources

Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-06 19:07:04 +01:00
Sage Weil
386ab7cef3 Merge pull request #3301 from ktdreyer/rm-tiobench
#10152: qa: drop tiobench suite

Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-06 08:26:04 -08:00
Sage Weil
6051321059 Merge pull request #3300 from ceph/wip-10412
client: fix use-after-free bug in unmount()

Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-06 08:20:19 -08:00