]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
8 years agocommon/config_opts: kill mon_pg_create_interval 13800/head
xie xingguo [Mon, 6 Mar 2017 06:47:38 +0000 (14:47 +0800)]
common/config_opts: kill mon_pg_create_interval

This is not needed anymore.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
8 years agoMerge pull request #14260 from dmick/wip-workunit-clone-with-branch
Kefu Chai [Fri, 31 Mar 2017 05:17:46 +0000 (13:17 +0800)]
Merge pull request #14260 from dmick/wip-workunit-clone-with-branch

workunit: request branch when cloning

Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agotasks/workunit.py: specify the branch name when cloning a branch 14260/head
Kefu Chai [Thu, 30 Mar 2017 04:37:01 +0000 (12:37 +0800)]
tasks/workunit.py: specify the branch name when cloning a branch

c1309fb failed to specify a branch when cloning using --depth=1, which
by default clones the HEAD. and we can not "git checkout" a specific
sha1 if it is not HEAD, after cloning using '--depth=1', so in this
change, we dispatch "tag", "branch", "HEAD" using three Refspec classes.

Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Dan Mick <dan.mick@redhat.com>
8 years agoMerge pull request #14219 from ShiqiCooperation/master
Sage Weil [Thu, 30 Mar 2017 22:23:09 +0000 (17:23 -0500)]
Merge pull request #14219 from ShiqiCooperation/master

os/bluestore: clean up Invalid return value judgment

Reviewed-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #14228 from ifed01/wip-bluestore-fix-store-test
Sage Weil [Thu, 30 Mar 2017 22:21:55 +0000 (17:21 -0500)]
Merge pull request #14228 from ifed01/wip-bluestore-fix-store-test

test/store_test: fix bluestore test cases disablement

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
8 years agoMerge pull request #13617 from liewegas/wip-mgr-commands
Sage Weil [Thu, 30 Mar 2017 22:12:00 +0000 (17:12 -0500)]
Merge pull request #13617 from liewegas/wip-mgr-commands

mon,mgr: tag some commands for ceph-mgr

Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agomon/ConfigKeyService: wait for quorum 13617/head
Sage Weil [Thu, 30 Mar 2017 16:42:31 +0000 (12:42 -0400)]
mon/ConfigKeyService: wait for quorum

Among other things, this prevents a mgr activation stall if it
happens to request config-keys from a mon that is out of
quorum.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/MgrMonitor: show delta
Sage Weil [Thu, 30 Mar 2017 16:31:35 +0000 (12:31 -0400)]
mon/MgrMonitor: show delta

This is mostly because I couldn't debug a weird state where
it kept updating but it appeared the addr was not changing
(always '-').

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/MgrMap: implement dump, add to ceph-dencoder
Sage Weil [Thu, 30 Mar 2017 16:19:41 +0000 (12:19 -0400)]
mon/MgrMap: implement dump, add to ceph-dencoder

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/MgrMonitor: print MgrMap to log on each change
Sage Weil [Thu, 30 Mar 2017 16:06:43 +0000 (12:06 -0400)]
mon/MgrMonitor: print MgrMap to log on each change

The other services do this.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/MgrMonitor: health warn/err if no active mgr
Sage Weil [Thu, 30 Mar 2017 14:40:23 +0000 (10:40 -0400)]
mon/MgrMonitor: health warn/err if no active mgr

Start warning once mons are luminous; start erroring once
require_luminous is set in osdmap.  Allow a grace period for
mgr to restart or standby to take over before we turn a warning
into an error.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #14183 from joscollin/wip-rgw-cleanup-removeunwantedheaders
Orit Wasserman [Thu, 30 Mar 2017 17:44:12 +0000 (20:44 +0300)]
Merge pull request #14183 from joscollin/wip-rgw-cleanup-removeunwantedheaders

rgw: Removed Unwanted headers
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
8 years agoMerge pull request #14194 from joscollin/wip-rgw_rados-warning
Yehuda Sadeh [Thu, 30 Mar 2017 17:43:37 +0000 (10:43 -0700)]
Merge pull request #14194 from joscollin/wip-rgw_rados-warning

rgw: warning, output may be truncated before the last format character

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
8 years agoMerge pull request #14253 from liupan1111/wip-remove-debug-message
Mykola Golub [Thu, 30 Mar 2017 17:24:03 +0000 (20:24 +0300)]
Merge pull request #14253 from liupan1111/wip-remove-debug-message

rbd-nbd: remove debug messages from do_unmap

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
8 years agoMerge pull request #13999 from tchaikov/wip-extract-creating-pgs
Kefu Chai [Thu, 30 Mar 2017 16:35:45 +0000 (00:35 +0800)]
Merge pull request #13999 from tchaikov/wip-extract-creating-pgs

mon,osd: decouple creating pgs from pgmap

Reviewed-by: Sage Weil <sage@redhat.com>
8 years agorbd-nbd: remove debug message from do_unmap 14253/head
Pan Liu [Thu, 30 Mar 2017 16:23:12 +0000 (00:23 +0800)]
rbd-nbd: remove debug message from do_unmap

Global context is not initialized when do_unmap is called.

Signed-off-by: Pan Liu <liupan1111@gmail.com>
8 years agotools/ceph-objectstore-tool: always set first_committed 13999/head
Kefu Chai [Wed, 29 Mar 2017 08:34:26 +0000 (16:34 +0800)]
tools/ceph-objectstore-tool: always set first_committed

otherwise the workaround of 7fb3804fb is triggered. we need to remove
that workaround later on.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon: switch to osdmon when handling osd_pg_creates subs
Kefu Chai [Mon, 27 Mar 2017 03:12:09 +0000 (11:12 +0800)]
mon: switch to osdmon when handling osd_pg_creates subs

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon/OSDMonitor: avoid search and lookup anti-pattern
Kefu Chai [Sun, 26 Mar 2017 04:12:43 +0000 (12:12 +0800)]
mon/OSDMonitor: avoid search and lookup anti-pattern

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon/OSDMonitor: pass by reference not pointer of const param
Kefu Chai [Sun, 26 Mar 2017 04:05:12 +0000 (12:05 +0800)]
mon/OSDMonitor: pass by reference not pointer of const param

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon/OSDMonitor: switch to the new creating_pgs
Kefu Chai [Tue, 14 Mar 2017 12:03:59 +0000 (20:03 +0800)]
mon/OSDMonitor: switch to the new creating_pgs

* prime_pg_temp(): switch to the new creating_pgs
* get_trim_to(): switch to the new creating_pgs

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon: handle MOSDPGCreated messages
Kefu Chai [Mon, 13 Mar 2017 07:50:17 +0000 (15:50 +0800)]
mon: handle MOSDPGCreated messages

MOSDPGCreated messages are used to prune the creating_pgs_by_osd_epoch
and creating_pgs, by updating created_pools. as once a pool is created
we will not send MOSDPGCreate to its acting_primary OSD anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agoosd: send pg-created message if any pg is newly created
Kefu Chai [Mon, 13 Mar 2017 07:13:03 +0000 (15:13 +0800)]
osd: send pg-created message if any pg is newly created

add an option named "osd_created_report_interval" to specify the
interval to check and send the "pg_created" mesages to mon

because pg could update its state when it is still in the pg_stat_queue,
for example, to change its state to PG_STATE_CLEAN, we cannot tell if we
have sent a "pg-created" message for it or not without introducing a new
member variable in PG.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomessages/MPGCreated: add MPGCreated
Kefu Chai [Sat, 11 Mar 2017 14:50:50 +0000 (22:50 +0800)]
messages/MPGCreated: add MPGCreated

add a new message type MPGCreated. osd is supposed to send this message
to monitor to inform that any pg(s) is created and activated.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon/OSDMonitor: add send_pg_create() to OSDMonitor
Kefu Chai [Thu, 9 Mar 2017 04:08:29 +0000 (12:08 +0800)]
mon/OSDMonitor: add send_pg_create() to OSDMonitor

OSDMonitor will handle the pg-create subscriptions after luminous.
1. scan new pools to get the pgs to be created
2. send pg creates using the collected pgs
3. trim the creating_pgs using the "created!" messages from OSD.

please note that we need to wait for the OSDMonitor::mapping to be fully
populated, so we cannot scan the incrementa map for creating pgs until
it is applied and accepted by other monitors.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon: acquire lock when accessing mon->session_map
Kefu Chai [Tue, 28 Mar 2017 03:29:20 +0000 (11:29 +0800)]
mon: acquire lock when accessing mon->session_map

we will access the mon->session_map for sending the osd-pg-creates
messages when finishing osdmapping in OSDMonitor, this could happen in
another thread without the protection of Monitor::lock, or in the same
thread already guarded by Monitor::lock. so instead of changing
Monitor::lock to a recursive lock, a new lock is introduced to protect
session_map.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon/OSDMonitor: run mapping on peons also
Kefu Chai [Sun, 19 Mar 2017 06:02:15 +0000 (14:02 +0800)]
mon/OSDMonitor: run mapping on peons also

otherwise subcriptions on peons won't get the creating_pgs notification
mapping updated. we want to send the notification from peons also. and
the notifications should be updated with the updated pg mapping.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon/OSDMonitor: mapping is not optional anymore
Kefu Chai [Thu, 16 Mar 2017 09:43:19 +0000 (17:43 +0800)]
mon/OSDMonitor: mapping is not optional anymore

as pg_creatings needs mapping to get the acting_primary osd of the
creating pg, so we can send the pg-create message to it if it subscribes
to this information, mapping should always be available now.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon: dispatch osd_beacon message to OSDMonitor
Kefu Chai [Thu, 9 Mar 2017 08:25:59 +0000 (16:25 +0800)]
mon: dispatch osd_beacon message to OSDMonitor

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agoosd: send osd-beacon to mon periodically
Kefu Chai [Sat, 11 Mar 2017 09:51:13 +0000 (17:51 +0800)]
osd: send osd-beacon to mon periodically

add an option named "osd_beacon_report_interval" to specify the interval
to send osd-beacon.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomessages/MOSDBeacon: add beacon msg
Kefu Chai [Fri, 10 Mar 2017 17:27:59 +0000 (01:27 +0800)]
messages/MOSDBeacon: add beacon msg

osd will send beacon message to monitor periodically to inform it that
"i am still alive!", previously, monitor use the pg-stats to check the
status of OSD, but since osd will only send pg stat to mgr after
luminous, we use a dedicated msg for this purpose.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon/OSDMonitor: s/check_sub/check_osdmap_sub/
Kefu Chai [Thu, 9 Mar 2017 02:27:43 +0000 (10:27 +0800)]
mon/OSDMonitor: s/check_sub/check_osdmap_sub/

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon/OSDMonitor: update comment in update_from_paxos()
Kefu Chai [Thu, 9 Mar 2017 14:14:41 +0000 (22:14 +0800)]
mon/OSDMonitor: update comment in update_from_paxos()

this change updates the comment for 7fb3804fb97462a3 and e807770,
to reflect the reason why we need to fix latest_full in current code.
as the fix is not a workaround for cuttlefish anymore, it resolves the
issue where

0. mon.c has a latest_full of 5
1. mon.c is shutdown and out of sync with the quorum
2. mon.c starts sync
3. mon.c now has osdmap[31..50], and the latest_full is still 5.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon/PGMonitor: remove unused variable
Kefu Chai [Mon, 6 Mar 2017 06:01:51 +0000 (14:01 +0800)]
mon/PGMonitor: remove unused variable

last_pg_scan is not used in PGMonitor::update_from_paxos(), so remove
it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon/PGmonitor: remove unused last_sent_pg_create
Kefu Chai [Mon, 6 Mar 2017 02:31:07 +0000 (10:31 +0800)]
mon/PGmonitor: remove unused last_sent_pg_create

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agomon: pass const variables by const ref not pointer
Kefu Chai [Fri, 24 Feb 2017 12:38:03 +0000 (20:38 +0800)]
mon: pass const variables by const ref not pointer

* PGMapUpdater::check_down_pgs(): pass a const reference to pgmap
  instead of a pointer
* PGMapUpdater::register_new_pgs(): pass a const reference to pgmap
  instead of a pointer

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #14250 from Adirl/fix_last_poll_dev
Haomai Wang [Thu, 30 Mar 2017 10:37:39 +0000 (18:37 +0800)]
Merge pull request #14250 from Adirl/fix_last_poll_dev

msg/async/rdma: Device::last_poll_dev must be positive

Reviewed-by: Haomai Wang <haomai@xsky.com>
8 years agomsg/async/rdma: Device::last_poll_dev must be positive 14250/head
Amir Vadai [Sun, 26 Mar 2017 10:24:19 +0000 (13:24 +0300)]
msg/async/rdma: Device::last_poll_dev must be positive

Make Device::last_poll_dev `unsigned` - it could overlap and should not
be negative.
Also, add missing initialization.

Change-Id: I558f02292ae4f5d1ce48d9bcda5047d382604237
Signed-off-by: Amir Vadai <amir@vadai.me>
8 years agoMerge pull request #14249 from Adirl/rdma-cm-4_1
Haomai Wang [Thu, 30 Mar 2017 09:40:49 +0000 (17:40 +0800)]
Merge pull request #14249 from Adirl/rdma-cm-4_1

msg/async/rdma: Debug prints for ibv_*

Reviewed-by: Haomai Wang <haomai@xsky.com>
8 years agomsg/async/rdma: Debug prints for ibv_* 14249/head
Amir Vadai [Tue, 31 Jan 2017 08:05:15 +0000 (10:05 +0200)]
msg/async/rdma: Debug prints for ibv_*

Setting RDMA_DEBUG to 1, will enable debug prints for every ibv_*
function called.
This makes it easier to debug RDMA issues.

Issue: 995322
Change-Id: I49d327d5d4386b44264f5619d50f2dbc7d76dcae
Signed-off-by: Amir Vadai <amir@vadai.me>
8 years agoos/bluestore: clean up Invalid return value judgment 14219/head
shiqi [Wed, 29 Mar 2017 06:33:55 +0000 (14:33 +0800)]
os/bluestore: clean up Invalid return value judgment

Signed-off-by: shiqi <1454927420@qq.com>
8 years agoMerge pull request #14245 from tchaikov/wip-revert-14201
Haomai Wang [Thu, 30 Mar 2017 05:21:36 +0000 (13:21 +0800)]
Merge pull request #14245 from tchaikov/wip-revert-14201

Revert "msg/async/rdma: Debug prints for ibv_*"

8 years agoRevert "msg/async/rdma: Debug prints for ibv_*" 14244/head 14245/head
Kefu Chai [Thu, 30 Mar 2017 04:57:58 +0000 (12:57 +0800)]
Revert "msg/async/rdma: Debug prints for ibv_*"

This reverts commit 7d1475f6274531988854cf62f6056f9cfd13ff29.

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #14201 from Adirl/rdma-cm-4
Haomai Wang [Thu, 30 Mar 2017 00:00:40 +0000 (08:00 +0800)]
Merge pull request #14201 from Adirl/rdma-cm-4

msg/async/rdma: Introduce RDMAConnMgr + Debug prints

Reviewed-by: Haomai Wang <haomai@xsky.com>
8 years agoMerge pull request #14214 from dmick/wip-workunit-shallow-clone
Dan Mick [Wed, 29 Mar 2017 18:36:05 +0000 (11:36 -0700)]
Merge pull request #14214 from dmick/wip-workunit-shallow-clone

tasks/workunit.py: when cloning, use --depth=1

Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #14202 from tchaikov/wip-cast-size_t-arm32
Jason Dillaman [Wed, 29 Mar 2017 17:33:49 +0000 (13:33 -0400)]
Merge pull request #14202 from tchaikov/wip-cast-size_t-arm32

rbd: use min<uint64_t>() explicitly

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
8 years agotest/store_test: fix bluestore test cases disablement 14228/head
Igor Fedotov [Wed, 29 Mar 2017 16:34:00 +0000 (16:34 +0000)]
test/store_test: fix bluestore test cases disablement

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
8 years agomon/PGMap: set initial pg timestamp as osdmap modified stamp
Sage Weil [Wed, 22 Mar 2017 18:21:46 +0000 (13:21 -0500)]
mon/PGMap: set initial pg timestamp as osdmap modified stamp

Currently the PGMap may register the new pg in multiple places: the
mgr or mon, and the timestamp is when the mon or mgr gets around to
recording it into its PGMap.  Make this deterministic by using the OSDMap
mtime (which is when the PG was *actually* created).

This fixes a problem where the pg create command has one timestamp (from
the mon) and the pgmap on the mgr has another, so an observer will see the
last_scrub_stamp (and other timestamps) change when nothing has actually
happened.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/MgrMonitor: do not tick() if not active or leader
Sage Weil [Wed, 22 Mar 2017 16:41:11 +0000 (11:41 -0500)]
mon/MgrMonitor: do not tick() if not active or leader

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/MgrClient: assume missing MgrMap means no acces to mgr at all
Sage Weil [Wed, 22 Mar 2017 16:36:01 +0000 (11:36 -0500)]
mgr/MgrClient: assume missing MgrMap means no acces to mgr at all

If we get as far as authenticating and have no MgrMap that implies the
mon didn't provide us one (despite our request) and we have no access to
the mgr at all.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agolibrados: return error from mgr start_command
Sage Weil [Wed, 22 Mar 2017 16:34:52 +0000 (11:34 -0500)]
librados: return error from mgr start_command

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoqa/tasks/dump_stuck.py: stop making assertions about 'health' report
Sage Weil [Wed, 22 Mar 2017 16:16:23 +0000 (11:16 -0500)]
qa/tasks/dump_stuck.py: stop making assertions about 'health' report

Health comes from teh mon, while the pg stats come from teh mgr, so they
may be out of sync.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/DaemonServer: log commands to cluster + audit logs
Sage Weil [Tue, 14 Mar 2017 13:57:17 +0000 (09:57 -0400)]
mgr/DaemonServer: log commands to cluster + audit logs

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/MgrStandby: add LogClient
Sage Weil [Wed, 22 Mar 2017 01:24:24 +0000 (20:24 -0500)]
mgr/MgrStandby: add LogClient

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/DaemonServer: debug on shutdown
Sage Weil [Wed, 22 Mar 2017 01:05:47 +0000 (20:05 -0500)]
mgr/DaemonServer: debug on shutdown

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/DaemonServer: whitespace
Sage Weil [Tue, 14 Mar 2017 13:57:26 +0000 (09:57 -0400)]
mgr/DaemonServer: whitespace

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/MgrClient: cope with disappearing perf_counters
Sage Weil [Fri, 10 Mar 2017 22:14:24 +0000 (17:14 -0500)]
mgr/MgrClient: cope with disappearing perf_counters

Perfcounters can go away; deal with it.  This collapses
into a single loop, but it means that the mgr might
stop getting certain counters without explicit
notification.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoqa/suites/upgrade/jewel-x: don't initially start mgr daemons
Sage Weil [Sat, 18 Mar 2017 19:02:16 +0000 (15:02 -0400)]
qa/suites/upgrade/jewel-x: don't initially start mgr daemons

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoqa/releases/luminous.yaml: set up mgr key; start mgr
Sage Weil [Mon, 13 Mar 2017 12:28:28 +0000 (08:28 -0400)]
qa/releases/luminous.yaml: set up mgr key; start mgr

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoqa/suites/rados/upgrade: don't initially start mgr daemon
Sage Weil [Fri, 10 Mar 2017 22:25:47 +0000 (17:25 -0500)]
qa/suites/rados/upgrade: don't initially start mgr daemon

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoqa/tasks/ceph.py: add 'skip_mgr_daemons' option
Sage Weil [Fri, 10 Mar 2017 21:57:51 +0000 (16:57 -0500)]
qa/tasks/ceph.py: add 'skip_mgr_daemons' option

For upgrades

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoqa/tasks/ceph.py: give everyone mgr caps
Sage Weil [Fri, 10 Mar 2017 19:15:46 +0000 (14:15 -0500)]
qa/tasks/ceph.py: give everyone mgr caps

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr: do not crash if FSMap doesn't have 'addr' metadata
Sage Weil [Fri, 17 Mar 2017 20:42:31 +0000 (16:42 -0400)]
mgr: do not crash if FSMap doesn't have 'addr' metadata

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/MgrClient: do not assert on control-c
Sage Weil [Tue, 14 Mar 2017 14:02:38 +0000 (10:02 -0400)]
mgr/MgrClient: do not assert on control-c

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/Session: keep inst, not addr
Sage Weil [Tue, 14 Mar 2017 13:56:56 +0000 (09:56 -0400)]
mgr/Session: keep inst, not addr

For parity with log messages from other daemons etc.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr: move MgrSession to its own header
Sage Weil [Tue, 14 Mar 2017 13:26:51 +0000 (09:26 -0400)]
mgr: move MgrSession to its own header

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/AuthMonitor: fix mgr mon caps to 'allow profile mgr'
Sage Weil [Tue, 14 Mar 2017 02:41:37 +0000 (22:41 -0400)]
mon/AuthMonitor: fix mgr mon caps to 'allow profile mgr'

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agosystemd/ceph-mgr@.service: fix mgr mon cap
Sage Weil [Tue, 14 Mar 2017 02:37:29 +0000 (22:37 -0400)]
systemd/ceph-mgr@.service: fix mgr mon cap

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agovstart.sh: fix mgr caps
Sage Weil [Mon, 13 Mar 2017 18:00:06 +0000 (14:00 -0400)]
vstart.sh: fix mgr caps

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/AuthMonitor: add 'mgr' caps to keyring on upgrade
Sage Weil [Mon, 13 Mar 2017 12:28:17 +0000 (08:28 -0400)]
mon/AuthMonitor: add 'mgr' caps to keyring on upgrade

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/MonCap: add bootstrap-mgr profile
Sage Weil [Mon, 13 Mar 2017 12:22:42 +0000 (08:22 -0400)]
mon/MonCap: add bootstrap-mgr profile

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoceph-authtool: check 'mgr' section too
Sage Weil [Fri, 10 Mar 2017 21:58:00 +0000 (16:58 -0500)]
ceph-authtool: check 'mgr' section too

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/MgrClient: fix uninitialize variable
Sage Weil [Fri, 10 Mar 2017 22:18:01 +0000 (17:18 -0500)]
mgr/MgrClient: fix uninitialize variable

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/MgrClient: move lock init into .h
Sage Weil [Fri, 10 Mar 2017 22:17:54 +0000 (17:17 -0500)]
mgr/MgrClient: move lock init into .h

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/Mgr: less noisy about ms_dispatch
Sage Weil [Fri, 10 Mar 2017 20:41:16 +0000 (15:41 -0500)]
mgr/Mgr: less noisy about ms_dispatch

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoqa/suites: run mgr daemon(s)
Sage Weil [Fri, 10 Mar 2017 18:48:19 +0000 (13:48 -0500)]
qa/suites: run mgr daemon(s)

Everything up upgrade/, which will be slightly tricky.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agotest/osd/osd-scrub-repair.sh: cope with mon/mgr asynchrony
Sage Weil [Fri, 10 Mar 2017 04:17:20 +0000 (23:17 -0500)]
test/osd/osd-scrub-repair.sh: cope with mon/mgr asynchrony

Need to wait for mon to reflect pg state as reported by
mgr.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/MgrClient: throttle connection attempts
Sage Weil [Wed, 8 Mar 2017 22:01:31 +0000 (17:01 -0500)]
mgr/MgrClient: throttle connection attempts

Max of 1 per second.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoqa/workunits/cephtool/test.sh: test_auth_profiles must include mgr
Sage Weil [Wed, 8 Mar 2017 18:49:55 +0000 (13:49 -0500)]
qa/workunits/cephtool/test.sh: test_auth_profiles must include mgr

For 'pg ...' commands

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/MonCap: pass entity type (mgr, mon) to is_capable
Sage Weil [Tue, 7 Mar 2017 21:28:24 +0000 (16:28 -0500)]
mon/MonCap: pass entity type (mgr, mon) to is_capable

This lets us define different meanings for profiles on
the mon and mgr.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/MgrMonitor: enforce mgr caps
Sage Weil [Tue, 7 Mar 2017 21:12:22 +0000 (16:12 -0500)]
mon/MgrMonitor: enforce mgr caps

Require 'allow x' for mgr beacon.  Verify fsid.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr: include cluster fsid in MMgrBeacon
Sage Weil [Tue, 7 Mar 2017 21:10:54 +0000 (16:10 -0500)]
mgr: include cluster fsid in MMgrBeacon

Prevent ceph-mgr from talking to the wrong cluster!

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/MonCap: expand 'profile mgr' caps
Sage Weil [Tue, 7 Mar 2017 20:58:27 +0000 (15:58 -0500)]
mon/MonCap: expand 'profile mgr' caps

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/DaemonServer: enforce caps
Sage Weil [Tue, 7 Mar 2017 20:36:36 +0000 (15:36 -0500)]
mgr/DaemonServer: enforce caps

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/DaemonServer: attach MgrSession to connections
Sage Weil [Tue, 7 Mar 2017 19:09:20 +0000 (14:09 -0500)]
mgr/DaemonServer: attach MgrSession to connections

Reuse MonCap; it is suitably generic.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agovstart.sh: debug mgrc
Sage Weil [Wed, 8 Mar 2017 22:31:10 +0000 (17:31 -0500)]
vstart.sh: debug mgrc

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agovstart.sh: give client.admin mgr 'allow *'
Sage Weil [Tue, 7 Mar 2017 20:35:26 +0000 (15:35 -0500)]
vstart.sh: give client.admin mgr 'allow *'

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agovstart.sh: give osd mgr = 'allow profile osd'
Sage Weil [Tue, 7 Mar 2017 20:35:17 +0000 (15:35 -0500)]
vstart.sh: give osd mgr = 'allow profile osd'

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agovstart.sh: pass ceph.conf to ceph-mgr
Sage Weil [Tue, 7 Mar 2017 16:46:12 +0000 (11:46 -0500)]
vstart.sh: pass ceph.conf to ceph-mgr

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agotest/osd/osd-*.sh: run mgr daemon for tests
Sage Weil [Mon, 6 Mar 2017 23:47:11 +0000 (18:47 -0500)]
test/osd/osd-*.sh: run mgr daemon for tests

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoqa/workunits/ceph-helpers: start and stop mgr daemons
Sage Weil [Mon, 6 Mar 2017 23:07:22 +0000 (18:07 -0500)]
qa/workunits/ceph-helpers: start and stop mgr daemons

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoceph-mgr: threads after fork
Sage Weil [Mon, 6 Mar 2017 23:07:09 +0000 (18:07 -0500)]
ceph-mgr: threads after fork

MgrStandby contains an Objecter with a ceph_timer and
associated thread.  Create it after we fork.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon: forward mgr commands; cap them
Sage Weil [Sun, 26 Feb 2017 19:17:38 +0000 (14:17 -0500)]
mon: forward mgr commands; cap them

Put the completions on a finisher to avoid deadlock.
(MgrClient lock is inside mon_lock due to start_command;
completion cannot retake mon_lock while holding MgrClient's
internal lock.)

The mon has a cap on the nubmer of client message bytes it hold
in memory.  We do not want to eat those up and DOS the mon
because the mgr is not available and all mgr commands are
blocked.

Define the limit as a fraction of mon_client_bytes to avoid user
misconfiguration.

Return EAGAIN if we hit the limit.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon: add a finisher
Sage Weil [Sun, 26 Feb 2017 19:16:13 +0000 (14:16 -0500)]
mon: add a finisher

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon/MgrMonitor: feed our MgrClient MgrMaps
Sage Weil [Sat, 25 Feb 2017 03:28:25 +0000 (22:28 -0500)]
mon/MgrMonitor: feed our MgrClient MgrMaps

We don't have a MonClient so we don't subscribe to these in the
usual way.  This will do.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon: add a MgrClient
Sage Weil [Sun, 26 Feb 2017 19:15:17 +0000 (14:15 -0500)]
mon: add a MgrClient

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomon: generate tickets for mgr service
Sage Weil [Sun, 26 Feb 2017 19:14:15 +0000 (14:14 -0500)]
mon: generate tickets for mgr service

This is kludgey because the mon is 'special' when it comes to
auth, but it works!

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/MgrClient: remove unused cond signal helpers
Sage Weil [Tue, 28 Feb 2017 15:34:33 +0000 (09:34 -0600)]
mgr/MgrClient: remove unused cond signal helpers

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/MgrClient: don't block command submission if no session yet
Sage Weil [Sun, 26 Feb 2017 19:09:33 +0000 (14:09 -0500)]
mgr/MgrClient: don't block command submission if no session yet

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomgr/MgrClient: resend pending commands on reconnect
Sage Weil [Sun, 26 Feb 2017 19:09:18 +0000 (14:09 -0500)]
mgr/MgrClient: resend pending commands on reconnect

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