]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agoosd: fix leaked OSDMap 3204/head
Sage Weil [Thu, 18 Dec 2014 14:24:49 +0000 (06:24 -0800)]
osd: fix leaked OSDMap

*** CID 1258787:  Resource leak  (RESOURCE_LEAK)
/osd/OSD.cc: 6118 in OSD::handle_osd_map(MOSDMap *)()
6112                    << dendl;
6113            clog->warn() << "failed to encode map e" << e << " with expecte
crc\n";
6114            MMonGetOSDMap *req = new MMonGetOSDMap;
6115            req->request_full(e, last);
6116            monc->send_mon_message(req);
6117            last = e - 1;
>>>     CID 1258787:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "o" going out of scope leaks the storage it points to.
6118            break;
6119           }
6120
6121
6122           hobject_t fulloid = get_osdmap_pobject_name(e);
6123           t.write(META_COLL, fulloid, 0, fbl.length(), fbl);

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #3202 from ceph/wip-fix-asok
Yan, Zheng [Thu, 18 Dec 2014 12:22:40 +0000 (20:22 +0800)]
Merge pull request #3202 from ceph/wip-fix-asok

mds: fix asok on rank 0

10 years agomds: fix asok on rank 0 3202/head
John Spray [Thu, 18 Dec 2014 12:14:25 +0000 (12:14 +0000)]
mds: fix asok on rank 0

Broken by:
1b2b34431 (MDS: do not allow invocation of most commands on an inactive MDS)

MDS::whoami is a rank, so check for inactive is <0, not <=0

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agodoc: Show how new data pools can be added to CephFS for file layouts
Wido den Hollander [Thu, 18 Dec 2014 09:59:31 +0000 (10:59 +0100)]
doc: Show how new data pools can be added to CephFS for file layouts

10 years agoMerge pull request #3198 from ceph/wip-10335
Yan, Zheng [Thu, 18 Dec 2014 02:32:31 +0000 (10:32 +0800)]
Merge pull request #3198 from ceph/wip-10335

MDS: do not allow invocation of most commands on an inactive MDS

10 years agoMDS: do not allow invocation of most commands on an inactive MDS 3198/head
Greg Farnum [Wed, 17 Dec 2014 23:32:23 +0000 (15:32 -0800)]
MDS: do not allow invocation of most commands on an inactive MDS

They just cause all kinds of trouble!

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #2836 from ceph/wip-7317
Gregory Farnum [Wed, 17 Dec 2014 22:12:51 +0000 (14:12 -0800)]
Merge pull request #2836 from ceph/wip-7317

#7317 ENOSPC and OSD epoch barrier handling

Reviewed-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #3197 from ktdreyer/rpm-spec-comment
Loic Dachary [Wed, 17 Dec 2014 21:00:53 +0000 (22:00 +0100)]
Merge pull request #3197 from ktdreyer/rpm-spec-comment

ceph.spec.in: quote %files macro in comment

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph.spec.in: quote %files macro in comment 3197/head
Ken Dreyer [Wed, 17 Dec 2014 20:05:21 +0000 (13:05 -0700)]
ceph.spec.in: quote %files macro in comment

Prior to this commit, RPM would expand the %files macro that was present
in the comment.

Use a double percent sign to quote the macro so that RPM will not expand
it.

This fixes an rpmlint warning, "W: macro-in-comment %files"

More information from rpmlint's "-I" (help) command:

  $ rpmlint -I macro-in-comment
  macro-in-comment:
  There is a unescaped macro after a shell style comment in the
  specfile.  Macros are expanded everywhere, so check if it can cause a
  problem in this case and escape the macro with another leading % if
  appropriate.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
10 years agoMerge pull request #3171 from tchaikov/refactor-rados-class
Loic Dachary [Wed, 17 Dec 2014 18:32:34 +0000 (19:32 +0100)]
Merge pull request #3171 from tchaikov/refactor-rados-class

python-rados: refactor class Rados a little bit

Reviewed-by: Josh During <jdurgin@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agopython-rados: refactor class Rados a little bit 3171/head
Kefu Chai [Sat, 13 Dec 2014 03:30:26 +0000 (11:30 +0800)]
python-rados: refactor class Rados a little bit

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
10 years agopybind/cephfs: Fix setxattr function. Pass value as character pointer
Wido den Hollander [Wed, 17 Dec 2014 13:01:44 +0000 (14:01 +0100)]
pybind/cephfs: Fix setxattr function. Pass value as character pointer

This passes the value of the xattr correctly and makes it work.

10 years agoMerge pull request #3190 from dachary/wip-test-helpers
Loic Dachary [Wed, 17 Dec 2014 08:00:42 +0000 (09:00 +0100)]
Merge pull request #3190 from dachary/wip-test-helpers

tests: ignore xmlstarlet extra empty lines

10 years agotests: ignore xmlstarlet extra empty lines 3190/head
Loic Dachary [Wed, 17 Dec 2014 06:57:34 +0000 (07:57 +0100)]
tests: ignore xmlstarlet extra empty lines

With xmlstarlet 1.3.0 (which is on Ubuntu precise)

xmlstarlet sel -t -m '//pg_stat/state[(contains(.,'\''active'\'') and
contains(.,'\''clean'\'') and not(contains(.,'\''stale'\'')))]' -v . -n

will output an extra empty line which does not show on xmlstarlet
1.5.0 (which is on Ubuntu trusty and Fedora 20).

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #2530 from majianpeng/fiemap
Sage Weil [Wed, 17 Dec 2014 00:50:45 +0000 (16:50 -0800)]
Merge pull request #2530 from majianpeng/fiemap

Fiemap

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #2137 from yuyuyu101/pg-sparse-recovery
Sage Weil [Tue, 16 Dec 2014 23:15:02 +0000 (15:15 -0800)]
Merge pull request #2137 from yuyuyu101/pg-sparse-recovery

ReplicatedPG: Make recovery using fiemap and fix perf counter

sage-2014-12-16_08:43:28-powercycle-wip-sage-testing-distro

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #3000 from yuyuyu101/wip-10166
Sage Weil [Tue, 16 Dec 2014 23:14:20 +0000 (15:14 -0800)]
Merge pull request #3000 from yuyuyu101/wip-10166

Wip 10166: fiemap or FileStore::do_sparse_copy_range bug

sage-2014-12-16_08:43:28-powercycle-wip-sage-testing-distr

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge remote-tracking branch 'gh/master' into wip-watch-notify
Sage Weil [Tue, 16 Dec 2014 22:02:32 +0000 (14:02 -0800)]
Merge remote-tracking branch 'gh/master' into wip-watch-notify

Conflicts:
PendingReleaseNotes

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Josh During <jdurgin@redhat.com>
10 years agoMerge pull request #3033 from dachary/wip-10201-osd-scrub-repair
Samuel Just [Tue, 16 Dec 2014 21:54:11 +0000 (13:54 -0800)]
Merge pull request #3033 from dachary/wip-10201-osd-scrub-repair

osd scrub repair uses ceph_objecstore_tool + shell toolbox

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3181 from ceph/wip-10299
Josh Durgin [Tue, 16 Dec 2014 21:44:21 +0000 (13:44 -0800)]
Merge pull request #3181 from ceph/wip-10299

librbd: complete all pending aio ops prior to closing image

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agodoc: add cephfs ENOSPC and eviction information 2836/head
John Spray [Tue, 9 Dec 2014 13:21:44 +0000 (13:21 +0000)]
doc: add cephfs ENOSPC and eviction information

Adding this at this time to give us a sensible place
to talk about the epoch barrier stuff.  The eviction
stuff will probably get simplified once we add a mon-side
eviction command that handles blacklisting and MDS session
eviction in one go.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoclient: add 'status' asok
John Spray [Fri, 17 Oct 2014 13:13:09 +0000 (14:13 +0100)]
client: add 'status' asok

Useful in test/debug for querying OSD epoch
and OSD barrier epoch.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoclient: propagate flush errors to fclose/fsync
John Spray [Tue, 9 Dec 2014 19:52:58 +0000 (19:52 +0000)]
client: propagate flush errors to fclose/fsync

Ensure that all calls to _flush get an explicit
context (rather than implicit PutInode used
before), which tags any error onto the Inode object.

Later, read the error from the Inode object in _release_fh
and ensure all callers of _release_fh properly handle
its return code.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoclient: handle ENOSPC in _flush
John Spray [Thu, 9 Oct 2014 10:28:32 +0000 (11:28 +0100)]
client: handle ENOSPC in _flush

Previously we would avoid issuing writes
from _write, but the same condition was
not applied to _flush.  This was okay
when we were blocking on ENOSPC, but now
we're cancelling ops on ENOSPC so need
to make sure we don't issue any new ones.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: add 'osdmap barrier' admin command
John Spray [Fri, 10 Oct 2014 13:01:00 +0000 (14:01 +0100)]
mds: add 'osdmap barrier' admin command

This is for use with client eviction.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: set epoch barrier on transition to active
John Spray [Mon, 27 Oct 2014 13:27:30 +0000 (13:27 +0000)]
mds: set epoch barrier on transition to active

To handle case where MDSs restart after experiencing
a barrier-inducing operation: rather than persisting
OSD barrier somewhere, just have the MDSs always barrier
on latest OSD epoch at startup.

Effect is that after restart, MDS cap issues will
be delayed in (compliant) clients until the client
sees the latest OSD map.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: implement osd epoch barrier on caps
John Spray [Wed, 8 Oct 2014 10:25:16 +0000 (11:25 +0100)]
mds: implement osd epoch barrier on caps

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomessages: always encode barrier
John Spray [Mon, 27 Oct 2014 18:09:01 +0000 (18:09 +0000)]
messages: always encode barrier

Instead of truncating on INLINE_DATA, send
some blank fields there for clients that
don't support it (the kclient) in order
that we can include the following
epoch_barrier field.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomessages: add osd_epoch_barrier to cap msgs
John Spray [Wed, 8 Oct 2014 09:49:54 +0000 (10:49 +0100)]
messages: add osd_epoch_barrier to cap msgs

Extension to client-server protocol to allow clients
to release capabilities conditional on the receiver
having a particular OSD map, and the MDS to issue
caps conditional on the user having a particular
OSD map.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: return ENOSPC on write ops while osds full
John Spray [Wed, 1 Oct 2014 22:01:35 +0000 (23:01 +0100)]
mds: return ENOSPC on write ops while osds full

Allow removals and read-only ops, prevent others.  This
is a soft policy aimed at reducing the likelihood of a
"full" (mon_osd_full_ratio) OSD becoming physically full
(where it is unable to accept journal writes from MDS
even though it does not respect the FULL flag)

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoosdc: add public Objecter::osdmap_full_flag
John Spray [Tue, 16 Dec 2014 20:48:45 +0000 (20:48 +0000)]
osdc: add public Objecter::osdmap_full_flag

For the (now numerous) places where callers
would like to check this without doing a verbose
lock/unlock cycle.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoosdc: remove spurious _maybe_request_map return value
John Spray [Tue, 9 Dec 2014 17:45:41 +0000 (17:45 +0000)]
osdc: remove spurious _maybe_request_map return value

This was always zero: make the function return void, and
remove all the places we asserted on its return value.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoosdc: implement Objecter::set_epoch_barrier
John Spray [Tue, 9 Dec 2014 14:02:33 +0000 (14:02 +0000)]
osdc: implement Objecter::set_epoch_barrier

For use in MDS and Client when they want to wait
for a particular OSDMap epoch before using caps
that depend on a prior blacklist or op cancellation.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoosdc: continuously subscribe to osd map on pause
John Spray [Thu, 16 Oct 2014 18:35:34 +0000 (19:35 +0100)]
osdc: continuously subscribe to osd map on pause

We were doing this on FULL, should also have done it
on PAUSERD and PAUSEWR, to avoid paused requests
staying that way forever.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoosdc/Objecter: add have_map method
John Spray [Mon, 20 Oct 2014 15:41:29 +0000 (16:41 +0100)]
osdc/Objecter: add have_map method

This is for places we're going to call wait_for_map, so
that we can easily check if we will *probably* get
a true from wait_for_map, and thereby avoid
allocating Contexts we won't need.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoosdc/Objecter: add op_cancel_writes
John Spray [Tue, 7 Oct 2014 10:40:54 +0000 (11:40 +0100)]
osdc/Objecter: add op_cancel_writes

This is for use by Client when it encounters
the FULL flag and wants to abort operations
rather than having them pause.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoosdc/ObjectCacher: invoke flush_set_callback on purge_set
John Spray [Thu, 9 Oct 2014 10:25:21 +0000 (11:25 +0100)]
osdc/ObjectCacher: invoke flush_set_callback on purge_set

For the benefit of Client, so that it can get its
caps released when using purge_set to deal with
an ENOSPC condition.  Does not affect librbd because
librbd doesn't provide flush_set_callback.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #2300 from ceph/wip-osdmap
Sage Weil [Tue, 16 Dec 2014 16:49:44 +0000 (08:49 -0800)]
Merge pull request #2300 from ceph/wip-osdmap

add osdmap checksums

    sage-2014-12-16_06:27:10-rados:singleton-wip-sage-testing2-distro-basic-multi
    sage-2014-12-15_13:18:23-rados:thrash-wip-sage-testing2-distro-basic-multi

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #3166 from ceph/wip-librados-fadvise
Sage Weil [Tue, 16 Dec 2014 16:46:26 +0000 (08:46 -0800)]
Merge pull request #3166 from ceph/wip-librados-fadvise

fadvise for librados, librbd + osd guts

    sage-2014-12-16_06:27:10-rados:singleton-wip-sage-testing2-distro-basic-multi
    sage-2014-12-15_13:18:23-rados:thrash-wip-sage-testing2-distro-basic-multi

10 years agoMerge pull request #3080 from ceph/wip-fadvise
Sage Weil [Tue, 16 Dec 2014 16:38:40 +0000 (08:38 -0800)]
Merge pull request #3080 from ceph/wip-fadvise

osd: reenable fadvise; use it more often

sage-2014-12-16_06:27:10-rados:singleton-wip-sage-testing2-distro-basic-multi
sage-2014-12-15_13:18:23-rados:thrash-wip-sage-testing2-distro-basic-multi

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #3165 from nilamdyuti/wip-doc-ceph
John Wilkins [Tue, 16 Dec 2014 16:13:53 +0000 (08:13 -0800)]
Merge pull request #3165 from nilamdyuti/wip-doc-ceph

doc: Updates man page for Ceph

Reviewed-by: John Wilkins <jowilkin@redhat.com>
10 years agoMerge pull request #3184 from dachary/wip-10325-cauchy
Loic Dachary [Tue, 16 Dec 2014 14:10:54 +0000 (15:10 +0100)]
Merge pull request #3184 from dachary/wip-10325-cauchy

erasure-code: relax cauchy w restrictions

Reviewed-by: David Zhang <david.z1003@yahoo.com>
10 years agoerasure-code: relax cauchy w restrictions 3184/head
Loic Dachary [Tue, 16 Dec 2014 12:31:30 +0000 (13:31 +0100)]
erasure-code: relax cauchy w restrictions

A restriction that the w parameter of the cauchy technique is limited to
8, 16 or 32 was added incorrectly while refactoring parameter parsing in
the jerasure plugin and must be relaxed.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoman: Deprecate preferred OSD setting for cephfs
Wido den Hollander [Tue, 16 Dec 2014 12:07:36 +0000 (13:07 +0100)]
man: Deprecate preferred OSD setting for cephfs

In the source code of cephfs there is no reference to it anymore,
but it's still in the man page. Leave it there for now, but make
it more clear that it is deprecated and unsupported.

10 years agoMerge pull request #2970 from ceph/wip-swift-storage-policy
Josh Durgin [Tue, 16 Dec 2014 07:36:40 +0000 (23:36 -0800)]
Merge pull request #2970 from ceph/wip-swift-storage-policy

rgw: support swift storage policy api

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agoMerge pull request #3163 from ceph/wip-9254
Josh Durgin [Tue, 16 Dec 2014 07:35:27 +0000 (23:35 -0800)]
Merge pull request #3163 from ceph/wip-9254

rgw: http headers need to end with \r\n

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sweil@redhat.com>
10 years agolibrbd: complete all pending aio ops prior to closing image 3181/head
Jason Dillaman [Mon, 15 Dec 2014 15:53:53 +0000 (10:53 -0500)]
librbd: complete all pending aio ops prior to closing image

It was possible for an image to be closed while aio operations
were still outstanding.  Now all aio operations are tracked and
completed before the image is closed.

Fixes: #10299
Backport: giant, firefly, dumpling
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrados: do not choke on asphyxiate doc generation 3166/head
Alfredo Deza [Mon, 15 Dec 2014 17:41:03 +0000 (12:41 -0500)]
librados: do not choke on asphyxiate doc generation

Signed-off-by: Alfredo Deza <adeza@redhat.com>
10 years agoMerge pull request #3142 from ceph/wip-10220
Sage Weil [Mon, 15 Dec 2014 18:44:51 +0000 (10:44 -0800)]
Merge pull request #3142 from ceph/wip-10220

mon: suspend proposing paxos values when flushing pending writes

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #3182 from ceph/wip-9405
Loic Dachary [Mon, 15 Dec 2014 18:18:01 +0000 (19:18 +0100)]
Merge pull request #3182 from ceph/wip-9405

librbd: fixed garbage output from test LibRBD.TestIOPP

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agolibrbd: fixed garbage output from test LibRBD.TestIOPP 3182/head
Jason Dillaman [Mon, 15 Dec 2014 17:37:05 +0000 (12:37 -0500)]
librbd: fixed garbage output from test LibRBD.TestIOPP

buffer::list::c_str does not actually provide a C-style, NULL
terminated string.  As a result, its use for console output
resulted in stray garbage characters being printed.

Fixes: #9405
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agoMerge pull request #3161 from anandgbhat/wip-jemalloc
Sage Weil [Mon, 15 Dec 2014 17:37:57 +0000 (09:37 -0800)]
Merge pull request #3161 from anandgbhat/wip-jemalloc

jemalloc-support: Added --with-jemalloc configure option

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #3180 from ktdreyer/doc-corpus-spelling
Loic Dachary [Mon, 15 Dec 2014 17:20:09 +0000 (18:20 +0100)]
Merge pull request #3180 from ktdreyer/doc-corpus-spelling

doc: fix spelling in corpus page

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agomon: Paxos: reset accept timeout before submiting work to the store 3142/head
Joao Eduardo Luis [Wed, 10 Dec 2014 17:46:35 +0000 (17:46 +0000)]
mon: Paxos: reset accept timeout before submiting work to the store

Otherwise we may trigger the timeout while waiting for the work to be
committed to the store -- and it would only take the write to take a bit
longer than 10 seconds (default accept timeout).

We do wait for the work to be properly committed to the store before
extending the lease though.

Fixes: #10220
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoMerge pull request #3146 from ceph/wip-9323
João Eduardo Luís [Mon, 15 Dec 2014 16:36:08 +0000 (16:36 +0000)]
Merge pull request #3146 from ceph/wip-9323

mon: allow full flag to be manually cleared

Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoReplicatedPG: Make pull and push op use sparse read 2137/head
Haomai Wang [Tue, 22 Jul 2014 03:27:02 +0000 (11:27 +0800)]
ReplicatedPG: Make pull and push op use sparse read

If user enable fiemap feature in osd side, there exists three ways to make
read/write sprase:

1. normal sparse read/write op
2. clone op
3. recover op

If any op doesn't support sparse way, it will destroy the advantage of this
way and write zero hole to sparse file. Now clone op can support sparse write,
this commit implement sparse read/write for recover op.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
10 years agodoc: fix spelling in corpus page 3180/head
Ken Dreyer [Mon, 15 Dec 2014 14:57:14 +0000 (07:57 -0700)]
doc: fix spelling in corpus page

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
10 years agoosdc/Objecter: respect honor_osdmap_full setting
John Spray [Wed, 1 Oct 2014 22:00:35 +0000 (23:00 +0100)]
osdc/Objecter: respect honor_osdmap_full setting

With this, it no longer needs to special case the MDS,
as the MDS can just call unset_honor_osdmap_full.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoos: free space tracking for MemStore
John Spray [Tue, 30 Sep 2014 18:14:38 +0000 (19:14 +0100)]
os: free space tracking for MemStore

Allow users to set an artificial upper bound
on size of the memstore OSD, and report actual
usage information in fsstat.

This is a useful tool for simulating nearly-full
systems.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agotests: convert osd-scrub-repair to ceph_objectstore_tool 3033/head
Loic Dachary [Fri, 28 Nov 2014 15:57:27 +0000 (16:57 +0100)]
tests: convert osd-scrub-repair to ceph_objectstore_tool

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: shell functions toolbox dedicated to testing
Loic Dachary [Fri, 28 Nov 2014 15:22:22 +0000 (16:22 +0100)]
tests: shell functions toolbox dedicated to testing

The osd/osd-test-helpers.sh mon/mon-test-helpers.sh are useful to create
shell based functional tests. Since they were introduced they did not
grow significantly. As more tests are added, it becomes necessary to
have more sophisticated helpers. The ceph-helpers.sh toolbox is a merge
of the existing helpers intended to be easy to maintain and expand.

  * Each function is documented
  * Each function is tested

When adding to a function or looking for a new function, it is unlikely
the developer will find time to explore the entire file and understand
its structure. The documentation, body and test for each function are
grouped together to limit the scope of exploration required from the
casual developer.

The test are designed to not use internal helpers so that they can be
understood in full just by reading the test function. It means a given
test takes longer than it should (i.e. each getters tests run one mon).
In the context of testing this toolbox, simplicity is preferred over
efficiency.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #3075 from theanalyst/doc/v0.89/mailmap
Loic Dachary [Mon, 15 Dec 2014 09:16:54 +0000 (10:16 +0100)]
Merge pull request #3075 from theanalyst/doc/v0.89/mailmap

mailmap updates

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agomailmap: Blaine Gardner affiliation 3075/head
Abhishek Lekshmanan [Thu, 4 Dec 2014 09:04:47 +0000 (14:34 +0530)]
mailmap: Blaine Gardner affiliation

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agomailmap: Lei Dong affiliation
Abhishek Lekshmanan [Thu, 4 Dec 2014 09:03:05 +0000 (14:33 +0530)]
mailmap: Lei Dong affiliation

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agomailmap: Sandon Van Ness name normalization
Abhishek Lekshmanan [Thu, 4 Dec 2014 09:01:14 +0000 (14:31 +0530)]
mailmap: Sandon Van Ness name normalization

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agojemalloc-support: Added --with-jemalloc configure option 3161/head
shishir gowda [Mon, 15 Dec 2014 05:52:29 +0000 (11:22 +0530)]
jemalloc-support: Added --with-jemalloc configure option

If --with-jemalloc option is not specified, then it defaults to tcmalloc.

If --with-jemalloc is specified, then --without-tcmalloc is required.
Also if a rocksdb static linking is desired --with-librocksdb-static,
do not use --with-jemalloc, as rocksdb uses tcmalloc for builds.

Support for jemalloc in package build and perf stats/heap profiler is
underway

Signed-off-by: shishir gowda <shishir.gowda@sandisk.com>
10 years agomailmap: Chendi Xue name normalization
Abhishek Lekshmanan [Mon, 15 Dec 2014 05:52:27 +0000 (11:22 +0530)]
mailmap: Chendi Xue name normalization

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
Conflicts:
.mailmap

10 years agomailmap: Ding Dinghua affiliation
Abhishek Lekshmanan [Thu, 4 Dec 2014 08:57:18 +0000 (14:27 +0530)]
mailmap: Ding Dinghua affiliation

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agomailmap: Dongmao Zhang affiliation
Abhishek Lekshmanan [Thu, 4 Dec 2014 08:55:34 +0000 (14:25 +0530)]
mailmap: Dongmao Zhang affiliation

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agomailmap: Kefu Chai affiliation
Abhishek Lekshmanan [Thu, 4 Dec 2014 08:54:15 +0000 (14:24 +0530)]
mailmap: Kefu Chai affiliation

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agomailmap: Michal Jarzabek affiliation
Abhishek Lekshmanan [Thu, 4 Dec 2014 08:52:33 +0000 (14:22 +0530)]
mailmap: Michal Jarzabek affiliation

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agomailmap: Xinze Chi affiliation
Abhishek Lekshmanan [Thu, 4 Dec 2014 08:51:15 +0000 (14:21 +0530)]
mailmap: Xinze Chi affiliation

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agomailmap: Karl Eichwalder affiliation
Abhishek Lekshmanan [Thu, 4 Dec 2014 08:47:44 +0000 (14:17 +0530)]
mailmap: Karl Eichwalder affiliation

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agomailmap: Dan Mick name normalization
Abhishek Lekshmanan [Thu, 4 Dec 2014 08:47:15 +0000 (14:17 +0530)]
mailmap: Dan Mick name normalization

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agomailmap: Adam Spiers affiliation
Abhishek Lekshmanan [Thu, 4 Dec 2014 08:43:24 +0000 (14:13 +0530)]
mailmap: Adam Spiers affiliation

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agomailmap: Nilamdyuti Goswami affiliation
Abhishek Lekshmanan [Thu, 4 Dec 2014 08:42:55 +0000 (14:12 +0530)]
mailmap: Nilamdyuti Goswami affiliation

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agoceph_test_rados_api_io: fix new test
Sage Weil [Sun, 14 Dec 2014 19:36:12 +0000 (11:36 -0800)]
ceph_test_rados_api_io: fix new test

From 0c802e11d9f0ee993994d391d1e00aeb76965d6a.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #3175 from ceph/wip-test-huge-tickets
Sage Weil [Sun, 14 Dec 2014 17:44:21 +0000 (09:44 -0800)]
Merge pull request #3175 from ceph/wip-test-huge-tickets

qa: add script to test how libceph handles huge auth tickets

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #3174 from dachary/wip-warning
Sage Weil [Sun, 14 Dec 2014 06:09:14 +0000 (22:09 -0800)]
Merge pull request #3174 from dachary/wip-warning

tests: fix signedness compilation warnings

10 years agoceph_test_rados_api_watch_notify: use 5 min timeout for notifies 2924/head
Sage Weil [Sun, 14 Dec 2014 05:51:41 +0000 (21:51 -0800)]
ceph_test_rados_api_watch_notify: use 5 min timeout for notifies

This should make them tolerate thrashing.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoceph_test_stress_watch: do not unwatch if watch failed
Sage Weil [Sun, 14 Dec 2014 05:40:21 +0000 (21:40 -0800)]
ceph_test_stress_watch: do not unwatch if watch failed

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2986 from ceph/wip-9998
Loic Dachary [Sat, 13 Dec 2014 23:52:08 +0000 (00:52 +0100)]
Merge pull request #2986 from ceph/wip-9998

crush: fix weight underfloat issue

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoqa: add script to test how libceph handles huge auth tickets 3175/head
Ilya Dryomov [Fri, 21 Nov 2014 14:45:35 +0000 (17:45 +0300)]
qa: add script to test how libceph handles huge auth tickets

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
10 years agoMerge pull request #3112 from xiaoxichen/cleanup_getheader
Loic Dachary [Sat, 13 Dec 2014 17:22:12 +0000 (18:22 +0100)]
Merge pull request #3112 from xiaoxichen/cleanup_getheader

Cleanup:Use get_type()instead of get_header().type

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: fix signedness compilation warnings 3174/head
Loic Dachary [Sat, 13 Dec 2014 16:55:21 +0000 (17:55 +0100)]
tests: fix signedness compilation warnings

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #3172 from dachary/wip-10146-retrigger-udev
Loic Dachary [Sat, 13 Dec 2014 16:42:29 +0000 (17:42 +0100)]
Merge pull request #3172 from dachary/wip-10146-retrigger-udev

ceph-disk: test re-using an existing journal partition

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: LOG.info instead of print 3172/head
Loic Dachary [Sat, 13 Dec 2014 11:20:03 +0000 (12:20 +0100)]
ceph-disk: LOG.info instead of print

When a non fatal error happens with parted, use LOG.info to display it
instead of print.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: test re-using an existing journal partition
Dan van der Ster [Fri, 12 Dec 2014 11:40:19 +0000 (12:40 +0100)]
ceph-disk: test re-using an existing journal partition

Add a ceph-disk test to first setup an OSD with a separate journal
block device, then tear down the OSD (simulating a failure) and create
a new OSD which re-uses the same journal device.

Add create_dev / destroy_dev helpers that encapsulate the operations
that ensure the partition table is up to date in the kernel and the
symlinks are created as expected. In particular it makes sure the kernel
is aware that the partition table of a newly created device is
empty. If the device previously existed and the kernel was not informed
of the latest partition table updates via partprobe / partx, it may
have cached an old partition table which can create all sorts of
unexpected behaviors such as a failure to create the by-partuuid
symbolic links as described in http://tracker.ceph.com/issues/10146
Refs: #10146

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph-disk: fix get_partition_uuid for loop/cciss
Dan van der Ster [Fri, 12 Dec 2014 11:35:42 +0000 (12:35 +0100)]
ceph-disk: fix get_partition_uuid for loop/cciss

Loopback and cciss devices have an extra 'p' before the partition
number. Add exceptional handling of these devices.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
10 years agoceph-disk: don't change the journal partition uuid
Dan van der Ster [Tue, 18 Nov 2014 14:51:46 +0000 (15:51 +0100)]
ceph-disk: don't change the journal partition uuid

We observe that the new /dev/disk/by-partuuid/<journal_uuid>
symlink is not always created by udev when reusing a journal
partition. Fix by not changing the uuid of a journal partition
in this case -- instead we can reuse the existing uuid (and
journal_symlink) instead. We also now assert that the symlink
exists before further preparing the OSD.

Fixes: #10146
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
Tested-by: Dan van der Ster <daniel.vanderster@cern.ch>
10 years agodocumentation: simplify running make check
Loic Dachary [Sat, 6 Dec 2014 22:59:54 +0000 (23:59 +0100)]
documentation: simplify running make check

Encapsulate the compilation steps (install dependencies, autogen.sh,
configure, make check) in the run-make-check.sh script. Update the
developer documentation to point to this script instead of multiple
steps.

It is intended as a tool to help new developer make sure their patch is
sane, it focuses on efficiency (runs make check in parallel if possible)
and coverage (enables docker based tests if possible).

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: install parted in centos container
Loic Dachary [Sat, 13 Dec 2014 12:03:27 +0000 (13:03 +0100)]
tests: install parted in centos container

Because ceph-disk depends on it.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: install hdparm in containers
Loic Dachary [Sat, 13 Dec 2014 11:11:32 +0000 (12:11 +0100)]
tests: install hdparm in containers

The ceph-disk tests use hdparm, install it in containers that run
them.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: update centos docker file to epel 7.5
Loic Dachary [Fri, 12 Dec 2014 15:59:30 +0000 (16:59 +0100)]
tests: update centos docker file to epel 7.5

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: docker tests only need a workdir, not a clone
Loic Dachary [Sun, 7 Dec 2014 12:27:16 +0000 (13:27 +0100)]
tests: docker tests only need a workdir, not a clone

Instead of cloning the repository, create a work directory that has
symbolic links to the original .git, using

https://github.com/git/git/blob/master/contrib/workdir/git-new-workdir

It resolves the problem of fetching a commit that is not attached to any
ref, which is apparently not implemented in the git protocol (discussed
on irc.freenode.net#git).

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agorgw: cannot modify swift bucket policy 2970/head
Yehuda Sadeh [Sat, 13 Dec 2014 01:00:52 +0000 (17:00 -0800)]
rgw: cannot modify swift bucket policy

When trying to set a policy on the bucket, fail unless policy matches
current placement rule.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #3126 from ceph/wip-cleanup-removal
David Zafman [Sat, 13 Dec 2014 00:42:43 +0000 (16:42 -0800)]
Merge pull request #3126 from ceph/wip-cleanup-removal

osd: Remove dead code related to old pg removal mechanism

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agorgw: dump X-Storage-Policy header on bucket HEAD
Yehuda Sadeh [Fri, 12 Dec 2014 22:29:28 +0000 (14:29 -0800)]
rgw: dump X-Storage-Policy header on bucket HEAD

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: compare placement target on bucket recreation
Yehuda Sadeh [Fri, 12 Dec 2014 22:20:55 +0000 (14:20 -0800)]
rgw: compare placement target on bucket recreation

and return -EEXIST (409) if requested a mismatching placement target.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agolibrados: remove IoCtxImpl lock member
Sage Weil [Fri, 12 Dec 2014 22:11:54 +0000 (14:11 -0800)]
librados: remove IoCtxImpl lock member

It is dead!

Signed-off-by: Sage Weil <sage@redhat.com>