]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agocrush: fix incorrect use of adjust_item_weight method 2689/head
Rongze Zhu [Fri, 10 Oct 2014 11:18:00 +0000 (19:18 +0800)]
crush: fix incorrect use of adjust_item_weight method

adjust_item_weight method will adjust all buckets which the item
inside. If the osd.0 in host=fake01 and host=fake02, we execute
"ceph osd crush osd.0 10 host=fake01", it not only will adjust fake01's
weight, but also will adjust fake02's weight.

the patch add adjust_item_weightf_in_loc method and fix remove_item,
_remove_item_under, update_item, insert_item, detach_bucket methods.

Signed-off-by: Rongze Zhu <zrzhit@gmail.com>
10 years agoMerge pull request #2665 from yuyuyu101/update-mailmap
Loic Dachary [Wed, 8 Oct 2014 08:18:54 +0000 (10:18 +0200)]
Merge pull request #2665 from yuyuyu101/update-mailmap

mailmap: add yuandong to organizationmap

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agomailmap: add yuandong to organizationmap 2665/head
Haomai Wang [Wed, 8 Oct 2014 07:23:47 +0000 (15:23 +0800)]
mailmap: add yuandong to organizationmap

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
10 years agoMerge pull request #2617 from ceph/wip-9628
Gregory Farnum [Wed, 8 Oct 2014 02:26:20 +0000 (19:26 -0700)]
Merge pull request #2617 from ceph/wip-9628

mds: Add session to sessionmap when its state becomes opening

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge remote-tracking branch 'gh/giant'
Sage Weil [Tue, 7 Oct 2014 19:40:45 +0000 (12:40 -0700)]
Merge remote-tracking branch 'gh/giant'

Conflicts:
src/osdc/Objecter.cc

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 #2489 from guangyy/wip-9008
Samuel Just [Tue, 7 Oct 2014 17:51:21 +0000 (10:51 -0700)]
Merge pull request #2489 from guangyy/wip-9008

For pgls OP, get/put budget on per list session basis, instead of per OP basis.

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.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 #2654 from dachary/wip-9677-ioprio-class
Sage Weil [Tue, 7 Oct 2014 15:47:44 +0000 (08:47 -0700)]
Merge pull request #2654 from dachary/wip-9677-ioprio-class

common: ceph_ioprio_string_to_class always returns -EINVAL

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2626 from dachary/wip-rados-empty-file
Sage Weil [Tue, 7 Oct 2014 15:13:22 +0000 (08:13 -0700)]
Merge pull request #2626 from dachary/wip-rados-empty-file

tools: rados put /dev/null should write() and not create()

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2652 from ceph/wip-msgr
Gregory Farnum [Tue, 7 Oct 2014 14:23:54 +0000 (07:23 -0700)]
Merge pull request #2652 from ceph/wip-msgr

msgr: fix remaining direct references to "new SimpleMessenger" by replacing with the factory method

Reorganize the src/msg hierarchy to push SimpleMessenger down into a subfolder to make way for organizing new in-tree implementations.

Reviewed-by: Greg Farnum <greg@inktank.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 agoMerge pull request #2647 from ceph/wip-rm-legacy-cli
Sage Weil [Tue, 7 Oct 2014 13:30:46 +0000 (06:30 -0700)]
Merge pull request #2647 from ceph/wip-rm-legacy-cli

tools: remove old ceph.cc

Reviewed-by: Loic Dachary <loic@dachary.org>
10 years agoMerge pull request #2646 from ceph/wip-osd-op-macro
Sage Weil [Tue, 7 Oct 2014 13:27:09 +0000 (06:27 -0700)]
Merge pull request #2646 from ceph/wip-osd-op-macro

rados.h: use macros to generate osd ops definitons and strings

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 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 agocommon: ceph_ioprio_string_to_class always returns -EINVAL 2654/head
Loic Dachary [Tue, 7 Oct 2014 12:06:38 +0000 (14:06 +0200)]
common: ceph_ioprio_string_to_class always returns -EINVAL

The l string is always empty because std::transform needs a
pre-allocated string. Replace with the in-place version. Add unit tests.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoosd: log error if set_ioprio fails to parse class
Loic Dachary [Tue, 7 Oct 2014 12:05:08 +0000 (14:05 +0200)]
osd: log error if set_ioprio fails to parse class

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocommon: set_ioprio debug message including pid
Loic Dachary [Tue, 7 Oct 2014 12:03:39 +0000 (14:03 +0200)]
common: set_ioprio debug message including pid

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocommon: do not set ioprio if pid is not set
Loic Dachary [Tue, 7 Oct 2014 12:02:09 +0000 (14:02 +0200)]
common: do not set ioprio if pid is not set

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2653 from dachary/wip-9676-ioprio-doc
Loic Dachary [Tue, 7 Oct 2014 08:15:20 +0000 (10:15 +0200)]
Merge pull request #2653 from dachary/wip-9676-ioprio-doc

doc: missing osd prefix to ioprio config options

Reviewed-by: Mehdi Abaakouk <sileht@sileht.net>
10 years agodoc: missing osd prefix to ioprio config options 2653/head
Loic Dachary [Tue, 7 Oct 2014 08:09:46 +0000 (10:09 +0200)]
doc: missing osd prefix to ioprio config options

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agomsg: move SimpleMessenger to msg/simple/ 2652/head
Sage Weil [Mon, 6 Oct 2014 15:40:16 +0000 (08:40 -0700)]
msg: move SimpleMessenger to msg/simple/

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agolibrados: use Messenger factory method
Sage Weil [Tue, 7 Oct 2014 04:20:08 +0000 (21:20 -0700)]
librados: use Messenger factory method

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomsg: use localized cct for derr
Sage Weil [Tue, 7 Oct 2014 04:21:57 +0000 (21:21 -0700)]
msg: use localized cct for derr

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agodoc/release-notes: v0.86
Sage Weil [Tue, 7 Oct 2014 04:15:33 +0000 (21:15 -0700)]
doc/release-notes: v0.86

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2651 from ceph/wip-ostool
Sage Weil [Tue, 7 Oct 2014 04:11:51 +0000 (21:11 -0700)]
Merge pull request #2651 from ceph/wip-ostool

ceph_objectstore_tool: Accept CEPH_ARGS environment arguments

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoceph_objectstore_tool: Accept CEPH_ARGS environment arguments 2651/head
David Zafman [Tue, 7 Oct 2014 01:26:44 +0000 (18:26 -0700)]
ceph_objectstore_tool: Accept CEPH_ARGS environment arguments

Signed-off-by: David Zafman <dzafman@redhat.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 agoMerge pull request #2639 from ceph/wip-9661
David Zafman [Mon, 6 Oct 2014 22:47:30 +0000 (15:47 -0700)]
Merge pull request #2639 from ceph/wip-9661

Fix 9661: ceph_objectstore_tool doesn't work with memstore

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agotools: remove old ceph.cc 2647/head
John Spray [Fri, 3 Oct 2014 18:12:52 +0000 (19:12 +0100)]
tools: remove old ceph.cc

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #2649 from ceph/wip-os-recommend-doc-fix
Sage Weil [Mon, 6 Oct 2014 18:20:10 +0000 (11:20 -0700)]
Merge pull request #2649 from ceph/wip-os-recommend-doc-fix

doc: update kernel recommendations, add tunables link

10 years agodoc: update kernel recommendations, add tunables link 2649/head
Ilya Dryomov [Fri, 3 Oct 2014 15:23:27 +0000 (19:23 +0400)]
doc: update kernel recommendations, add tunables link

No 3.16.[0-2] - same rbd deadlock regression as in 3.15.

Signed-off-by: Ilya Dryomov <idryomov@redhat.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 agomsg: make messenger type configurable
Sage Weil [Sat, 4 Oct 2014 00:59:40 +0000 (17:59 -0700)]
msg: make messenger type configurable

Eventaully we may want to override this by passing the type in as an
arg, but let's do that later.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomsg/Message: drop unneeded #include
Sage Weil [Mon, 6 Oct 2014 15:50:33 +0000 (08:50 -0700)]
msg/Message: drop unneeded #include

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/MonClient: use generic Messenger factory
Sage Weil [Mon, 6 Oct 2014 15:50:48 +0000 (08:50 -0700)]
mon/MonClient: use generic Messenger factory

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 agoMerge pull request #2644 from objoo/master
Loic Dachary [Sun, 5 Oct 2014 21:18:02 +0000 (23:18 +0200)]
Merge pull request #2644 from objoo/master

Add one more case ( "=" ) and test get_str_vec as well.

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 agoAdd one more case ( "=" ) and test get_str_vec as well. 2644/head
Yann Dupont [Sun, 28 Sep 2014 22:14:45 +0000 (00:14 +0200)]
Add one more case ( "=" ) and test get_str_vec as well.
Signed-off-by: Yann Dupont <yann@objoo.org>
10 years agoMerge pull request #2641 from dachary/wip-9655-osd-tell
Sage Weil [Sun, 5 Oct 2014 16:00:01 +0000 (09:00 -0700)]
Merge pull request #2641 from dachary/wip-9655-osd-tell

qa: ceph tell must retry on ENXIO

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agorados.h: use macros to generate osd ops definitons and strings 2646/head
Ilya Dryomov [Wed, 1 Oct 2014 13:02:00 +0000 (17:02 +0400)]
rados.h: use macros to generate osd ops definitons and strings

Eliminate multiple points of maintenance by using macros - no
functional changes apart from adding strings which were missing.

Signed-off-by: Ilya Dryomov <idryomov@redhat.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 #2599 from johnugeorge/wip-9492-crush-indep
Loic Dachary [Sat, 4 Oct 2014 09:45:09 +0000 (11:45 +0200)]
Merge pull request #2599 from johnugeorge/wip-9492-crush-indep

Crush: Ensuring at most num-rep osds are selected for indep rules

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoqa: ceph tell must retry on ENXIO 2641/head
Loic Dachary [Sat, 4 Oct 2014 09:34:27 +0000 (11:34 +0200)]
qa: ceph tell must retry on ENXIO

It is expected for ceph tell to fail with ENXIO if the daemon it is
trying to join is not ready for some reason. This should be handled as a
transient error instead of a fatal error.

Add two shell functions to help with retry. They may prove useful if
other cases requiring a few retries show up.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoCrush: Ensuring at most num-rep osds are selected 2599/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
10 years agoMerge remote-tracking branch 'gh/giant'
Sage Weil [Sat, 4 Oct 2014 00:56:31 +0000 (17:56 -0700)]
Merge remote-tracking branch 'gh/giant'

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 agoMemStore: Need set/get_allow_sharded_objects() to work for ceph_objectstore_tool 2639/head
David Zafman [Fri, 3 Oct 2014 22:09:30 +0000 (15:09 -0700)]
MemStore: Need set/get_allow_sharded_objects() to work for ceph_objectstore_tool

Keep a bool sharded in memory and use for set/get_allow_sharded_objects()
Create a file "sharded" in the data dir when sharded is true during _save()
Check for file "sharded" during _load()

Fixes: #9661
Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agoceph_objectstore_tool: MemStore needs a CephContext
David Zafman [Fri, 3 Oct 2014 22:12:28 +0000 (15:12 -0700)]
ceph_objectstore_tool: MemStore needs a CephContext

Pass g_ceph_context to ObjectStore::create() needed by MemStore

Fixes: #9661
Signed-off-by: David Zafman <dzafman@redhat.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 #2633 from dachary/wip-9653-ceph-disk-bootstrap-osd
Sage Weil [Fri, 3 Oct 2014 18:58:32 +0000 (11:58 -0700)]
Merge pull request #2633 from dachary/wip-9653-ceph-disk-bootstrap-osd

ceph-disk: bootstrap-osd keyring ignores --statedir

Reviewed-by: Sage Weil <sage@redhat.com>
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 agoMerge pull request #2636 from dachary/wip-9245-test-mon-pending
Sage Weil [Fri, 3 Oct 2014 16:27:27 +0000 (09:27 -0700)]
Merge pull request #2636 from dachary/wip-9245-test-mon-pending

mon: obsolete osdmonitor_prepare_command

Reviewed-by: Sage Weil <sage@redhat.com>
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 agotests: remove tests requiring osdmonitor_prepare_command 2636/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>
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>
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>
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 agoMerge pull request #2577 from dachary/wip-9570-cpp-strerror
Loic Dachary [Fri, 3 Oct 2014 13:25:14 +0000 (15:25 +0200)]
Merge pull request #2577 from dachary/wip-9570-cpp-strerror

os: io_event.res is the size written

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
10 years agoceph-disk: bootstrap-osd keyring ignores --statedir 2633/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>
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 agoMerge pull request #2627 from theanalyst/fix/mailmap
Loic Dachary [Thu, 2 Oct 2014 10:47:00 +0000 (12:47 +0200)]
Merge pull request #2627 from theanalyst/fix/mailmap

mailmap: Yehuda Sadeh name normalization

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agomailmap: Yehuda Sadeh name normalization 2627/head
Abhishek Lekshmanan [Thu, 2 Oct 2014 10:25:06 +0000 (15:55 +0530)]
mailmap: Yehuda Sadeh name normalization

Reported-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
10 years agotools: rados put /dev/null should write() and not create() 2626/head
Loic Dachary [Thu, 2 Oct 2014 07:23:55 +0000 (09:23 +0200)]
tools: rados put /dev/null should write() and not create()

In the rados.cc special case to handle put an empty objects, use
write_full() instead of create().

A special case was introduced 6843a0b81f10125842c90bc63eccc4fd873b58f2
to create() an object if the rados put file is empty. Prior to this fix
an attempt to rados put an empty file was a noop. The problem with this
fix is that it is not idempotent. rados put an empty file twice would
fail the second time and rados put a file with one byte would succeed as
expected.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2625 from ceph/wip-ysw-mailmap
Loic Dachary [Thu, 2 Oct 2014 05:52:43 +0000 (07:52 +0200)]
Merge pull request #2625 from ceph/wip-ysw-mailmap

mailmap: update email address

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agomailmap: update email address 2625/head
Yehuda Sadeh [Thu, 2 Oct 2014 02:49:33 +0000 (19:49 -0700)]
mailmap: update email address

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agodoc/release-notes: fix attributions for 8702 fix
Sage Weil [Thu, 2 Oct 2014 01:01:51 +0000 (18:01 -0700)]
doc/release-notes: fix attributions for 8702 fix

Oops!

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agodoc/release-notes: v0.80.6
Sage Weil [Thu, 2 Oct 2014 00:48:12 +0000 (17:48 -0700)]
doc/release-notes: v0.80.6

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2623 from ceph/wip-coverity-20141002
Sage Weil [Wed, 1 Oct 2014 23:20:09 +0000 (16:20 -0700)]
Merge pull request #2623 from ceph/wip-coverity-20141002

build and coverity fixes

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2622 from dachary/wip-osd-pool-ls
Sage Weil [Wed, 1 Oct 2014 23:18:36 +0000 (16:18 -0700)]
Merge pull request #2622 from dachary/wip-osd-pool-ls

qa: fix osd pool ls invalid test

10 years agoMerge pull request #2621 from ceph/wip-objecter-shutdown
Sage Weil [Wed, 1 Oct 2014 23:14:07 +0000 (16:14 -0700)]
Merge pull request #2621 from ceph/wip-objecter-shutdown

Fix Objecter shutdown races with message handling

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoqa: fix osd pool ls invalid test 2622/head
Loic Dachary [Wed, 1 Oct 2014 21:39:39 +0000 (23:39 +0200)]
qa: fix osd pool ls invalid test

expect_false does not extend past the pipe and fails because the command
succeeds

introduced in f05c977bbcd310a83e6df03344a72d4cc06e1cc3

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoBtrfsFileStoreBackend.cc: fix string overflow 2623/head
Danny Al-Gaaf [Wed, 1 Oct 2014 21:08:15 +0000 (23:08 +0200)]
BtrfsFileStoreBackend.cc: fix string overflow

Use strncpy() instead of strcpy and make sure the result
is '\0' terminated.

Fix for:

CID 1063700 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
 fixed_size_dest: You might overrun the 4088 byte fixed-size string
 vol_args.name by copying the return value of c_str without checking
 the length.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>