]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agomon: PGMonitor: populate scrub timestamps with 'now' on pg creation 2663/head
Joao Eduardo Luis [Tue, 7 Oct 2014 23:13:49 +0000 (00:13 +0100)]
mon: PGMonitor: populate scrub timestamps with 'now' on pg creation

Fixes: #9496
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: PGMonitor: prettify access to pg_stats_t in register_pg
Joao Eduardo Luis [Tue, 7 Oct 2014 23:12:29 +0000 (00:12 +0100)]
mon: PGMonitor: prettify access to pg_stats_t in register_pg

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoMerge pull request #2660 from athanatos/wip-9203
Sage Weil [Tue, 7 Oct 2014 21:08:39 +0000 (14:08 -0700)]
Merge pull request #2660 from athanatos/wip-9203

test/osd/Object: don't generate length of 0

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2659 from athanatos/wip-9113
Sage Weil [Tue, 7 Oct 2014 21:06:38 +0000 (14:06 -0700)]
Merge pull request #2659 from athanatos/wip-9113

Wip 9113

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2658 from athanatos/wip-9625
Sage Weil [Tue, 7 Oct 2014 21:03:55 +0000 (14:03 -0700)]
Merge pull request #2658 from athanatos/wip-9625

PG: release backfill reservations if a backfill peer rejects

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge tag 'v0.86' into giant
Sage Weil [Tue, 7 Oct 2014 19:34:10 +0000 (12:34 -0700)]
Merge tag 'v0.86' into giant

v0.86

10 years ago0.86
Jenkins [Tue, 7 Oct 2014 13:20:21 +0000 (06:20 -0700)]
0.86

10 years agoMerge remote-tracking branch 'guangyy/wip-9008' into giant
Samuel Just [Tue, 7 Oct 2014 18:42:14 +0000 (11:42 -0700)]
Merge remote-tracking branch 'guangyy/wip-9008' into giant

10 years agoMerge pull request #2631 from ceph/wip-rwtimer
Sage Weil [Tue, 7 Oct 2014 18:41:11 +0000 (11:41 -0700)]
Merge pull request #2631 from ceph/wip-rwtimer

DNM: osdc/Objecter: use SafeTimer; make callbacks race-tolerant

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #2655 from ceph/wip-9635
João Eduardo Luís [Tue, 7 Oct 2014 15:54:50 +0000 (15:54 +0000)]
Merge pull request #2655 from ceph/wip-9635

mon: fix async write completion waits

Fixes: #9635
Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoMerge pull request #2560 from ceph/wip-9418
Sage Weil [Tue, 7 Oct 2014 13:32:53 +0000 (06:32 -0700)]
Merge pull request #2560 from ceph/wip-9418

mon: add new profiles & audit cap checks

Reviewed-by: Sage Weil <sage@redhat.com>
10 years ago0.86 v0.86
Jenkins [Tue, 7 Oct 2014 13:20:21 +0000 (06:20 -0700)]
0.86

10 years agoRun configure without liblttng on squeeze as well.
Sandon Van Ness [Tue, 7 Oct 2014 13:03:36 +0000 (06:03 -0700)]
Run configure without liblttng on squeeze as well.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
10 years agoMerge branch 'wip-9658' into giant
Sage Weil [Mon, 6 Oct 2014 22:52:24 +0000 (15:52 -0700)]
Merge branch 'wip-9658' into giant

10 years agotest/osd/Object: don't generate length of 0 2660/head
Samuel Just [Mon, 6 Oct 2014 22:22:33 +0000 (15:22 -0700)]
test/osd/Object: don't generate length of 0

Fixes: #9203
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2645 from ceph/wip-9663
Sage Weil [Mon, 6 Oct 2014 16:37:32 +0000 (09:37 -0700)]
Merge pull request #2645 from ceph/wip-9663

client: clean-up objecter on failed client init

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoceph.spec: make ceph -> python-ceph dependency specify version
Sage Weil [Mon, 6 Oct 2014 16:15:29 +0000 (09:15 -0700)]
ceph.spec: make ceph -> python-ceph dependency specify version

It does this indirectly via ceph -> ceph-common -> python-ceph, but do so
here too for clarity/consistency.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2642 from johnugeorge/wip-9492-crush-giant
Loic Dachary [Mon, 6 Oct 2014 07:51:05 +0000 (09:51 +0200)]
Merge pull request #2642 from johnugeorge/wip-9492-crush-giant

Crush: Backporting fixes for #9492 to giant

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoclient: clean-up objecter on failed client init 2645/head
Noah Watkins [Sun, 5 Oct 2014 20:15:13 +0000 (13:15 -0700)]
client: clean-up objecter on failed client init

During mount() the objecter isn't shutdown if the mon client fails to
initialize. Objecter asserts in destructor expect it to have been
shutdown but this skipped.

hadoop@plana85:~$ ./hadoop/bin/hadoop fs -ls /
14/10/05 12:35:50 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
osdc/Objecter.cc: In function 'virtual Objecter::~Objecter()' thread 7ff422705700 time 2014-10-05 12:35:51.090776
osdc/Objecter.cc: 3927: FAILED assert(!m_request_state_hook)
 ceph version 0.85-981-g25bcc39 (25bcc39bb809e2d13beea1529e4ab92d1b61fa5b)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x7f) [0x7ff3f5c28f7f]
 2: (Objecter::~Objecter()+0x397) [0x7ff3f5bca707]
 3: (Objecter::~Objecter()+0x9) [0x7ff3f5bca8b9]
 4: (Client::~Client()+0x7d) [0x7ff3f5b6770d]
 5: (Client::~Client()+0x9) [0x7ff3f5b680a9]
 6: (ceph_mount_info::mount(std::string const&)+0x149) [0x7ff3f5b1fa49]
 7: (ceph_mount()+0x4e) [0x7ff3f5b1dcbe]
 8: (Java_com_ceph_fs_CephMount_native_1ceph_1mount()+0xb7) [0x7ff4158b1c97]
 9: [0x7ff41839dd68]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
terminate called after throwing an instance of 'ceph::FailedAssertion'
Aborted

fixes: #9663

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
10 years agoCrush: Ensuring at most num-rep osds are selected 2642/head
Johnu George [Mon, 29 Sep 2014 17:07:44 +0000 (10:07 -0700)]
Crush: Ensuring at most num-rep osds are selected

Crush temporary buffers are allocated as per replica size configured
by the user.When there are more final osds (to be selected as per
rule) than the replicas, buffer overlaps and it causes crash.Now, it
ensures that at most num-rep osds are selected even if more number of
osds are allowed by indep rule. The fix for firstn rules is already
merged as part of bug #9492. Required test files are added.

Fixes: #9492
Signed-off-by: Johnu George johnugeo@cisco.com
(cherry picked from commit 234b066ba04976783d15ff2abc3e81b6cc06fb10)

10 years agoCrush: Ensuring at most num-rep osds are selected
Johnu George [Wed, 24 Sep 2014 16:32:50 +0000 (09:32 -0700)]
Crush: Ensuring at most num-rep osds are selected

Crush temporary buffers are allocated as per replica size configured
by the user.When there are more final osds (to be selected as per
rule) than the replicas, buffer overlaps and it causes crash.Now, it
ensures that at most num-rep osds are selected even if more number of
osds are allowed by the rule.

Fixes: #9492
Signed-off-by: Johnu George <johnugeo@cisco.com>
(cherry picked from commit 6b4d1aa99718e3b367496326c1e64551330fabc0)

10 years agoMerge pull request #2640 from ceph/wip-9657
Sage Weil [Sat, 4 Oct 2014 00:02:56 +0000 (17:02 -0700)]
Merge pull request #2640 from ceph/wip-9657

messages: provide an explicit COMPAT_VERSION in MMDSBeacon

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agodebian/control: fix python-ceph -> ceph file move to allow upgrades
Sage Weil [Fri, 3 Oct 2014 23:22:57 +0000 (16:22 -0700)]
debian/control: fix python-ceph -> ceph file move to allow upgrades

See fe3434f41cd09433975d7d0f9dbb2fae662e4a1b.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomessages: provide an explicit COMPAT_VERSION in MMDSBeacon 2640/head
Greg Farnum [Fri, 3 Oct 2014 23:06:53 +0000 (16:06 -0700)]
messages: provide an explicit COMPAT_VERSION in MMDSBeacon

We weren't setting an explicit compat version and so the Message
was setting it to the head version, breaking communication with
older daemons.

Fixes: #9657
Signed-off-by: Greg Farnum <greg@inktank.com>
10 years agodebian/control: BuildDepend on lsb-release
Sage Weil [Fri, 3 Oct 2014 20:45:48 +0000 (13:45 -0700)]
debian/control: BuildDepend on lsb-release

debian/rules uses it to make lttng build conditional.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2635 from dachary/wip-9653-ceph-disk-bootstrap-osd-giant
Sage Weil [Fri, 3 Oct 2014 18:58:54 +0000 (11:58 -0700)]
Merge pull request #2635 from dachary/wip-9653-ceph-disk-bootstrap-osd-giant

ceph-disk: bootstrap-osd keyring ignores --statedir (giant)

10 years agoMerge pull request #2637 from dachary/wip-9245-test-mon-pending-giant
Sage Weil [Fri, 3 Oct 2014 18:24:44 +0000 (11:24 -0700)]
Merge pull request #2637 from dachary/wip-9245-test-mon-pending-giant

mon: obsolete osdmonitor_prepare_command (giant)

10 years agotests: remove tests requiring osdmonitor_prepare_command 2637/head
Loic Dachary [Fri, 3 Oct 2014 14:12:12 +0000 (16:12 +0200)]
tests: remove tests requiring osdmonitor_prepare_command

Although they have been useful, their maintenance and fragility caused
more trouble than their benefits.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 038de0031bc0892359201012dafb82ac1b1a4d0f)

10 years agomon: obsolete osdmonitor_prepare_command
Loic Dachary [Fri, 3 Oct 2014 14:10:30 +0000 (16:10 +0200)]
mon: obsolete osdmonitor_prepare_command

And the mon_advanced_debug_mode option that is only used in the context
of osdmonitor_prepare_command.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 2abc8f400f7db256c2a30f1d0886a593e6c194eb)

10 years agotest: minor case fix
Loic Dachary [Sat, 6 Sep 2014 14:06:12 +0000 (16:06 +0200)]
test: minor case fix

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 6f698374562de74806203c7b41072572b59bd256)

10 years agomon: Monitor: let 'handle_command()' deal with caps validation 2560/head
Joao Eduardo Luis [Tue, 30 Sep 2014 18:15:18 +0000 (19:15 +0100)]
mon: Monitor: let 'handle_command()' deal with caps validation

If a given client doesn't have the required caps when running a command,
it must receive an EACCES or EPERM reply.  This is already handled by
Monitor::handle_command(), which does an exceptionally good job at it.

Therefore, and unlike other messages that do not expect return values,
we can't simply drop the message if the client doesn't have the
appropriate capabilities, or things can get very weird very fast from
the user's perspective.  Dropping the message for a command without a
reply has roughly the same effect as loss of quorum (timeout, pipes
failing) and confusion may ensue from it.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoqa/workunits: mon: auth_caps: account for mon blank caps
Joao Eduardo Luis [Tue, 30 Sep 2014 18:13:52 +0000 (19:13 +0100)]
qa/workunits: mon: auth_caps: account for mon blank caps

test creating and entity with blank caps with and without '--force'
being specified.  without '--force' they must fail with EINVAL as the
monitor will not be able to parse them.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: MonCommands: adjust indentation for 'auth add'
Joao Eduardo Luis [Tue, 30 Sep 2014 18:11:01 +0000 (19:11 +0100)]
mon: MonCommands: adjust indentation for 'auth add'

Eye-candy.  We changed indentation of a few other entries and this one
was just too darn obvious, itching all over, night terrors, the whole
nine yards.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoqa/workunits: mon: auth_caps: variables must be local
Joao Eduardo Luis [Tue, 30 Sep 2014 17:49:19 +0000 (18:49 +0100)]
qa/workunits: mon: auth_caps: variables must be local

We have variables with the same name that are being shared!  We don't
hit any issues with it currently because the code just kind of works
even though that happens.  Add a bit of new logic that relies on an
immutable return code (for instance) and we're in the woods.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoqa/workunits: mon: auth_caps: cleanup on successful exit
Joao Eduardo Luis [Tue, 30 Sep 2014 17:46:49 +0000 (18:46 +0100)]
qa/workunits: mon: auth_caps: cleanup on successful exit

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agotest/vstart_wrapper.sh: use cephx
Joao Eduardo Luis [Wed, 24 Sep 2014 15:06:09 +0000 (16:06 +0100)]
test/vstart_wrapper.sh: use cephx

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: Monitor: remove redudant call to osdmon's dispatch
Joao Eduardo Luis [Tue, 16 Sep 2014 16:32:41 +0000 (17:32 +0100)]
mon: Monitor: remove redudant call to osdmon's dispatch

Backport: firefly

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agomon: Monitor: check caps and source before dispatching messages
Joao Eduardo Luis [Tue, 16 Sep 2014 15:32:37 +0000 (16:32 +0100)]
mon: Monitor: check caps and source before dispatching messages

Only dispatch messages that a client may send if said client has at
least MON_CAP_R, and only dispatch internal monitor messages if peer is
a monitor.

Backport: firefly

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agomon: Monitor: create logical divisions on dispatch() based on msg nature
Joao Eduardo Luis [Fri, 12 Sep 2014 16:21:45 +0000 (17:21 +0100)]
mon: Monitor: create logical divisions on dispatch() based on msg nature

Instead of a single switch(), have multiple switch() and order them by
increasing necessity of privileges.

This patch thus divides the big switch into:

- messages not requiring auth/caps checks at all
- messages which caps shall be checked somewhere else
- messages the Monitor class needs to deal with but only require a
  client to have enough caps for the monitor to consider handling them
- messages that only a monitor is allowed to send.

Backport: firefly

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agotest: mon: test-mon-msg: Check which msgs the mons handle and reply to
Joao Eduardo Luis [Thu, 11 Sep 2014 16:40:04 +0000 (17:40 +0100)]
test: mon: test-mon-msg: Check which msgs the mons handle and reply to

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agoqa/workunits: cephtool: test auth profiles
Joao Eduardo Luis [Mon, 8 Sep 2014 16:45:20 +0000 (17:45 +0100)]
qa/workunits: cephtool: test auth profiles

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agomon: MonCap: add new profiles
Joao Eduardo Luis [Mon, 8 Sep 2014 16:00:20 +0000 (17:00 +0100)]
mon: MonCap: add new profiles

Adds three new profiles:

  read-only:  able to issue all read-only (MON_CAP_R) commands.  Any
  command that may take additional caps (MON_CAP_W or MON_CAP_X) won't
  be allowed.

  read-write: able to issue all read-write (MON_CAP_R | MON_CAP_W)
  commands.  Commands that require MON_CAP_X will not be allowed.

  role-definer: solely able to issue commands on the 'auth' subsystem,
  to which all caps are given (MON_CAP_R | MON_CAP_W | MON_CAP_X).

Fixes: #8899
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agomon: Monitor: match command module caps against what's on MonCommands.h
Joao Eduardo Luis [Tue, 23 Sep 2014 23:33:57 +0000 (00:33 +0100)]
mon: Monitor: match command module caps against what's on MonCommands.h

We were checking the command's permissions against what we perceived as
the 'module' from parsing the command's "prefix" (specified by the
client).  This caused troubles with cap checks for commands without a
submodule clearly defined, such as 'status' or 'health' (vs 'mon dump'
or 'osd pool set', which are of submodule 'mon' and 'osd' respectively).

As such, we now grab the command's submodule (right now solely for caps
checks) from the monitor's internal representation of the commands
(defined in mon/MonCommands.h and built at compile time and stashed in
'mon_commands').  Given that commands such as 'health', 'fsid' or
'status' have properly defined modules in MonCommands.h, we simply rely
on that representation for all commands.  Which is what we should have
been doing from the start anyway, because we shouldn't be relying on the
client to point us to what we want to authenticate against.

Backport: firefly

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: AuthMonitor: validate caps when creating or changing mon caps
Joao Eduardo Luis [Mon, 8 Sep 2014 10:28:48 +0000 (11:28 +0100)]
mon: AuthMonitor: validate caps when creating or changing mon caps

The monitor doesn't really know how to validate caps not meant for it.
The MDS or the OSD may very well allow blank caps for instance, while
the monitor categorically does not.  We can't simply state a capability
is invalid because we wouldn't take it as such.

On the other hand, we must check monitor caps and make sure they are
correct, otherwise malformed caps can go unnoticed for a while,
sometimes even being hard to understand what may have gone wrong.

Backport: firefly

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agoceph-disk: bootstrap-osd keyring ignores --statedir 2635/head
Loic Dachary [Fri, 3 Oct 2014 12:08:57 +0000 (14:08 +0200)]
ceph-disk: bootstrap-osd keyring ignores --statedir

The STATEDIR variable is used to initialize the bootstrap-osd keyring
before it gets a chance to be overriden by --statedir. Replace it with
{statedir} so that it can be substituted after all options have been
parsed.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit fa0bd06b4657e5b84e237b76033ac3d3478b6a1f)

10 years agoosdc/Objecter: use SafeTimer; make callbacks race-tolerant 2631/head
Sage Weil [Thu, 2 Oct 2014 22:22:56 +0000 (15:22 -0700)]
osdc/Objecter: use SafeTimer; make callbacks race-tolerant

The RWTimer event cancellation is racy.  Instead, just make all of our
callbacks tolerate cancellation races.  This is already true of most of
them (in fact, they are probably broken because they try to take a write
lock while holding a read lock).  Fix C_CancelOp so that it calls the
other op_cancel (that takes a tid).

Then switch the RWTimer back to a SafeTimer.  Put it in unsafe callbacks
mode because we don't want to introduce lock cycles with timer_lock.

Fixes: #9582
See also: #9650
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoReplicatedPG: dump snap_trimq on pg query 2659/head
Samuel Just [Wed, 1 Oct 2014 21:30:59 +0000 (14:30 -0700)]
ReplicatedPG: dump snap_trimq on pg query

Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoReplicatedPG: do not queue the snap trimmer constantly
Samuel Just [Mon, 29 Sep 2014 23:26:54 +0000 (16:26 -0700)]
ReplicatedPG: do not queue the snap trimmer constantly

Previously, we continuously requeued the snap trimmer while in
TrimmingObjects.  This is not a good idea now that we try to
limit the number of snap trimming repops in flight and requeue
the snap trimmer directly as those repops complete.

Fixes: #9113
Backport: giant, dumpling, firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoReplicatedPG: clean out completed trimmed objects as we go
Samuel Just [Wed, 24 Sep 2014 20:55:47 +0000 (13:55 -0700)]
ReplicatedPG: clean out completed trimmed objects as we go

Also, explicitely maintain a max number of concurrently trimming
objects.

Fixes: 9113
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2525 from ceph/wip-9487
Samuel Just [Wed, 1 Oct 2014 20:45:27 +0000 (13:45 -0700)]
Merge pull request #2525 from ceph/wip-9487

RFC: initialize purged_snaps on backfill

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2620 from ceph/revert-2604-wip-9113
Sage Weil [Wed, 1 Oct 2014 20:23:21 +0000 (13:23 -0700)]
Merge pull request #2620 from ceph/revert-2604-wip-9113

Revert "ReplicatedPG: clean out completed trimmed objects as we go"

10 years agoRevert "ReplicatedPG: clean out completed trimmed objects as we go" 2620/head
Samuel Just [Wed, 1 Oct 2014 20:18:46 +0000 (13:18 -0700)]
Revert "ReplicatedPG: clean out completed trimmed objects as we go"

10 years agoceph.spec: fix typo
Sage Weil [Wed, 1 Oct 2014 19:33:38 +0000 (12:33 -0700)]
ceph.spec: fix typo

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2614 from ceph/wip-rpm-epoch
Sage Weil [Wed, 1 Oct 2014 19:23:44 +0000 (12:23 -0700)]
Merge pull request #2614 from ceph/wip-rpm-epoch

rpm: set epoch 1 to match fedora

Reviewed-by: Boris Ranto <branto@redhat.com>
10 years agoMerge branch 'wip-9013' into giant
Yehuda Sadeh [Wed, 1 Oct 2014 17:28:38 +0000 (10:28 -0700)]
Merge branch 'wip-9013' into giant

10 years agorgw: add civetweb as a default frontend 2381/head
Yehuda Sadeh [Tue, 2 Sep 2014 16:18:47 +0000 (09:18 -0700)]
rgw: add civetweb as a default frontend

Fixes: #9013
Originally the configurable was empty, now setting explicitly both
fastcgi and civetweb (on port 7480).

Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoceph.spec.: add epoch 2614/head
Sage Weil [Wed, 1 Oct 2014 13:02:02 +0000 (06:02 -0700)]
ceph.spec.: add epoch

This is done in fedora packaging.  Do it here too so that you can move
between upstream packages (from ceph.com) and fedora and other derivatives
will builds.

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2615 from ceph/wip-fsls-json
Sage Weil [Wed, 1 Oct 2014 12:54:45 +0000 (05:54 -0700)]
Merge pull request #2615 from ceph/wip-fsls-json

mon: fix JSON `fs ls` output

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomon: fix JSON `fs ls` output 2615/head
John Spray [Wed, 1 Oct 2014 11:08:00 +0000 (12:08 +0100)]
mon: fix JSON `fs ls` output

A missing list terminator was causing unparseable output.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #2564 from ceph/wip-8587
Josh Durgin [Wed, 1 Oct 2014 00:24:02 +0000 (17:24 -0700)]
Merge pull request #2564 from ceph/wip-8587

rgw: subuser creation fixes

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agomon: wait for paxos writes before touching state 2655/head
Sage Weil [Wed, 1 Oct 2014 00:18:49 +0000 (17:18 -0700)]
mon: wait for paxos writes before touching state

Fix two other paths where may change the mon state so that we wait for the
pending write first.  start_election() in particular can be triggered at
almost any time if we see an election message from another mon.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon: flush paxos write before setting shutdown state
Sage Weil [Wed, 1 Oct 2014 00:19:35 +0000 (17:19 -0700)]
mon: flush paxos write before setting shutdown state

Paxos::commit_finish() makes assertions about our state (writing |
writing-previous).

Fixes: #9635
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon: move paxos write wait into a helper
Sage Weil [Wed, 1 Oct 2014 00:15:25 +0000 (17:15 -0700)]
mon: move paxos write wait into a helper

Avoid duplicated code.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2613 from ceph/wip-8822
Sage Weil [Tue, 30 Sep 2014 21:45:27 +0000 (14:45 -0700)]
Merge pull request #2613 from ceph/wip-8822

osd: swap state spinlock for atomic_t

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoPG: release backfill reservations if a backfill peer rejects 2658/head
Samuel Just [Mon, 29 Sep 2014 22:01:25 +0000 (15:01 -0700)]
PG: release backfill reservations if a backfill peer rejects

Also, the full peer will wait until the rejection from the primary
to do a state transition.

Fixes: #9626
Backport: giant, firefly, dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoosd: swap state spinlock for atomic_t 2613/head
Sage Weil [Tue, 30 Sep 2014 18:56:30 +0000 (11:56 -0700)]
osd: swap state spinlock for atomic_t

We are hitting a strange issue with valgrind and pthread spinlocks. Avoid
the issue by using an atomic_t here (which is simpler anyway).

Avoids: #8822
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2612 from ceph/wip-9562-backport
Gregory Farnum [Tue, 30 Sep 2014 17:49:05 +0000 (10:49 -0700)]
Merge pull request #2612 from ceph/wip-9562-backport

osdc/Filer: drop probe/purge locks before calling objecter

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoosdc/Filer: drop probe/purge locks before calling objecter 2612/head
John Spray [Wed, 24 Sep 2014 13:19:32 +0000 (14:19 +0100)]
osdc/Filer: drop probe/purge locks before calling objecter

Fixes: #9562
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 8dc94a2d8ce3364c0d8d52f634e5fc967e43d819)

10 years agoLocker: accept ctime updates from clients without dirty write caps 2606/head
Greg Farnum [Mon, 29 Sep 2014 23:10:36 +0000 (16:10 -0700)]
Locker: accept ctime updates from clients without dirty write caps

The ctime changes any time the inode does. That can happen even without
the file itself having changed, so we'd better accept the update whenever
the auth caps have dirtied, without worrying about the file caps!

Fixes: #9514
Backport: firefly

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #2556 from dachary/wip-9572-erasure-code-blaumroth
Loic Dachary [Mon, 29 Sep 2014 23:48:26 +0000 (01:48 +0200)]
Merge pull request #2556 from dachary/wip-9572-erasure-code-blaumroth

erasure-code: restore jerasure BlaumRoth default w

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2601 from ceph/wip-python-flask
Sage Weil [Mon, 29 Sep 2014 23:24:50 +0000 (16:24 -0700)]
Merge pull request #2601 from ceph/wip-python-flask

debian: python-flask is needed by ceph, not python-ceph

Reviewed-by: Loic Dachary <loic@dachary.org>
10 years agodebian: move ceph_rest_api.py into ceph 2601/head
Sage Weil [Mon, 29 Sep 2014 21:28:32 +0000 (14:28 -0700)]
debian: move ceph_rest_api.py into ceph

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoceph.spec.in: move ceph_rest_api.py into ceph
Sage Weil [Mon, 29 Sep 2014 21:24:01 +0000 (14:24 -0700)]
ceph.spec.in: move ceph_rest_api.py into ceph

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2602 from athanatos/wip-9574
Sage Weil [Mon, 29 Sep 2014 21:14:40 +0000 (14:14 -0700)]
Merge pull request #2602 from athanatos/wip-9574

PG: check full ratio again post-reservation

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2604 from athanatos/wip-9113
Sage Weil [Mon, 29 Sep 2014 21:02:15 +0000 (14:02 -0700)]
Merge pull request #2604 from athanatos/wip-9113

ReplicatedPG: clean out completed trimmed objects as we go

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2549 from ceph/wip-9545
Samuel Just [Mon, 29 Sep 2014 20:54:31 +0000 (13:54 -0700)]
Merge pull request #2549 from ceph/wip-9545

os/FileJournal: do not request sync while shutting down

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2550 from ceph/wip-8629
Samuel Just [Mon, 29 Sep 2014 20:52:21 +0000 (13:52 -0700)]
Merge pull request #2550 from ceph/wip-8629

osd: fix cache_evict vs make_writeable/finish_ctx snapdir bug #8629

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2510 from somnathr/wip-obj-delete-fix
Samuel Just [Mon, 29 Sep 2014 20:44:37 +0000 (13:44 -0700)]
Merge pull request #2510 from somnathr/wip-obj-delete-fix

FileStore: Race condition during object delete is fixed

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoceph.spec: fix python-flask dependency
Sage Weil [Mon, 29 Sep 2014 20:44:03 +0000 (13:44 -0700)]
ceph.spec: fix python-flask dependency

This is needed by ceph-rest-api, which is in ceph.rpm; it's not related to
python-ceph (except that ceph-rest-api happens to require that too).

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agodebian: python-flask is needed by ceph, not python-ceph
Sage Weil [Mon, 29 Sep 2014 20:40:18 +0000 (13:40 -0700)]
debian: python-flask is needed by ceph, not python-ceph

It's used by ceph-rest-api which is in the 'ceph' (server) package.

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2598 from ceph/wip-9582
Sage Weil [Mon, 29 Sep 2014 20:08:10 +0000 (13:08 -0700)]
Merge pull request #2598 from ceph/wip-9582

librados: fix other timeout segfault

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2594 from dachary/wip-9620-test-mon-thrash
Sage Weil [Mon, 29 Sep 2014 15:18:36 +0000 (08:18 -0700)]
Merge pull request #2594 from dachary/wip-9620-test-mon-thrash

qa/workunits/cephtool/test.sh: fix thrash (ultimate)

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoqa/workunits/cephtool/test.sh: fix thrash (ultimate) 2594/head
Loic Dachary [Mon, 29 Sep 2014 11:47:06 +0000 (13:47 +0200)]
qa/workunits/cephtool/test.sh: fix thrash (ultimate)

Keep the osd trash test to ensure it is a valid command but make it a
noop by giving it a zero argument (meaning thrash 0 OSD maps).

Remove the loops that were added after the command in an attempt to wait
for the cluster to recover and not pollute the rest of the tests. Actual
testing of osd thrash would require a dedicated cluster because it the
side effects are random and it is unnecessarily difficult to ensure they
are finished.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoceph-disk: add Scientific Linux as a Redhat clone
Dan van der Ster [Fri, 26 Sep 2014 16:00:22 +0000 (18:00 +0200)]
ceph-disk: add Scientific Linux as a Redhat clone

Scientific Linux is a RHEL clone and needs to use partx.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
(cherry picked from commit 5ca7ea5b531f28b3c87161d53aee907d6957cfc2)

10 years agoMerge pull request #2531 from dachary/wip-9536-isa-alignment
Sage Weil [Thu, 25 Sep 2014 21:05:57 +0000 (14:05 -0700)]
Merge pull request #2531 from dachary/wip-9536-isa-alignment

erasure-code: isa plugin alignment fixes

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoosd: improve debug output for do_{notifies,queries,infos}
Sage Weil [Thu, 25 Sep 2014 20:51:46 +0000 (13:51 -0700)]
osd: improve debug output for do_{notifies,queries,infos}

Hunting #9389

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2540 from ceph/wip-giant-messenger-fixes
Sage Weil [Thu, 25 Sep 2014 20:01:38 +0000 (13:01 -0700)]
Merge pull request #2540 from ceph/wip-giant-messenger-fixes

giant messenger fixes

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoosdc/Objecter: only post_rx_buffer if no op timeout 2598/head
Sage Weil [Thu, 25 Sep 2014 19:34:11 +0000 (12:34 -0700)]
osdc/Objecter: only post_rx_buffer if no op timeout

If we post an rx buffer and there is a timeout, the revocation can happen
while the reader has consumed the buffers but before it has decoded and
constructed the message.  In particular, we calculate a crc32c over the
data portion of the message after we've taken the buffers and dropped the
lock.

Instead of fixing this race (for example, by reverifying rx_buffers under
the lock while calculating the crc.. bleh), just skip the rx buffer
optimization entirely when a timeout is present.

Note that this doesn't cover the op_cancel() paths, but none of those users
provide static buffers to read into.

Fixes: #9582
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2574 from ceph/wip-msgr-shutdown
Sage Weil [Thu, 25 Sep 2014 16:26:18 +0000 (09:26 -0700)]
Merge pull request #2574 from ceph/wip-msgr-shutdown

msg: allow calling dtor immediately after ctor

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoerasure-code: test isa encode/decode with various object sizes 2531/head
Loic Dachary [Mon, 22 Sep 2014 12:16:32 +0000 (14:16 +0200)]
erasure-code: test isa encode/decode with various object sizes

Create an encode_decode() helper method to be called from the
encode_decode test function with various object size arguments. The
helper method is a copy/paste of the previous test that was using a
single object of a fixed size. The test is slightly adapted to
accommodate for different object sizes but the logic is not modified.

The object sizes being tested are chosen to be under the size of the
required size alignment or on multiple pages, size aligned or not.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: add test for isa chunk_size method
Loic Dachary [Mon, 22 Sep 2014 12:14:01 +0000 (14:14 +0200)]
erasure-code: add test for isa chunk_size method

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agomsg: allow calling dtor immediately after ctor 2574/head
John Spray [Thu, 25 Sep 2014 16:01:10 +0000 (17:01 +0100)]
msg: allow calling dtor immediately after ctor

Asserting on reaper_stop only made sense if the
messenger had ever been started: as it stood,
one couldn't create and destroy a messenger
without also starting and stopping it.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoerasure-code: isa encode tests adapted to per chunk alignment
Loic Dachary [Mon, 22 Sep 2014 12:11:07 +0000 (14:11 +0200)]
erasure-code: isa encode tests adapted to per chunk alignment

The encode tests use the alignment constraints. It has been changed to
be aligned on a per chunk basis instead of computing a more expensive
object alignement constraint. The test function is modified to take the
change into account but the logic is otherwise unmodified.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: isa test compare chunks with memcmp instead of strncmp
Loic Dachary [Mon, 22 Sep 2014 12:09:56 +0000 (14:09 +0200)]
erasure-code: isa test compare chunks with memcmp instead of strncmp

Because they may contain null characters.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: run isa tests via libtool and valgrind
Loic Dachary [Mon, 22 Sep 2014 12:08:48 +0000 (14:08 +0200)]
erasure-code: run isa tests via libtool and valgrind

Because running valgrind with no libtool does not test the binary but
the enclosing shell script.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: do not use typed tests for isa
Loic Dachary [Mon, 22 Sep 2014 12:08:07 +0000 (14:08 +0200)]
erasure-code: do not use typed tests for isa

Because there only is one type.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: isa uses per chunk alignment constraints
Loic Dachary [Mon, 22 Sep 2014 12:02:08 +0000 (14:02 +0200)]
erasure-code: isa uses per chunk alignment constraints

Copy code from the jerasure plugin to enforce alignment constraints per
chunk instead of using the total object size. It is simpler and reduces
the size of the chunks. See
https://github.com/ceph/ceph/commit/c7daaaf5e63d0bd1d444385e62611fe276f6ce29
for more information.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: [ISA] modify get_alignment function to imply a platform/compiler indepe...
Andreas Peters [Thu, 25 Sep 2014 14:48:47 +0000 (16:48 +0200)]
erasure-code: [ISA] modify get_alignment function to imply a platform/compiler independent alignment constraint of 32-byte aligned buffer addresses & length

10 years agoFor pgls OP, get/put budget on per list session basis, instead of per OP basis, which... 2489/head
Guang Yang [Mon, 15 Sep 2014 11:41:06 +0000 (11:41 +0000)]
For pgls OP, get/put budget on per list session basis, instead of per OP basis, which could lead to deadlock.

Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
10 years agoReplicatedPG: clean out completed trimmed objects as we go 2604/head
Samuel Just [Wed, 24 Sep 2014 20:55:47 +0000 (13:55 -0700)]
ReplicatedPG: clean out completed trimmed objects as we go

Also, explicitely maintain a max number of concurrently trimming
objects.

Fixes: 9113
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sam.just@inktank.com>