Commit Graph

70288 Commits

Author SHA1 Message Date
Kefu Chai
e5ea630e9f 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>
2017-03-30 20:21:17 +08:00
Kefu Chai
43ded67243 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>
2017-03-30 20:21:17 +08:00
Kefu Chai
df6dafe1bb 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>
2017-03-30 20:21:17 +08:00
Kefu Chai
11f82480a0 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>
2017-03-30 20:21:17 +08:00
Kefu Chai
19f8db9692 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>
2017-03-30 20:21:17 +08:00
Kefu Chai
472c64268d mon: dispatch osd_beacon message to OSDMonitor
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-03-30 20:21:17 +08:00
Kefu Chai
78484dc71b 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>
2017-03-30 20:21:17 +08:00
Kefu Chai
8f3432d5b6 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>
2017-03-30 20:21:17 +08:00
Kefu Chai
20900e41fb mon/OSDMonitor: s/check_sub/check_osdmap_sub/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-03-30 20:21:17 +08:00
Kefu Chai
738f947aa9 mon/OSDMonitor: update comment in update_from_paxos()
this change updates the comment for 7fb3804fb, 97462a3 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>
2017-03-30 20:21:17 +08:00
Kefu Chai
89810eeb31 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>
2017-03-30 20:21:17 +08:00
Kefu Chai
d86f15ca65 mon/PGmonitor: remove unused last_sent_pg_create
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-03-30 20:21:17 +08:00
Kefu Chai
454da5e7b2 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>
2017-03-30 20:21:17 +08:00
Haomai Wang
1f6750063a 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>
2017-03-30 18:37:39 +08:00
Amir Vadai
fb7787dd58 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>
2017-03-30 13:29:08 +03:00
Haomai Wang
20bbdb93a2 Merge pull request #14249 from Adirl/rdma-cm-4_1
msg/async/rdma: Debug prints for ibv_*

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-03-30 17:40:49 +08:00
Amir Vadai
42078045bc 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>
2017-03-30 11:42:19 +03:00
Sébastien Han
205cff12b3 systemd: remove all occurence of ceph-create-keys
ceph-create-keys unit file does not exist anymore so there is no need to
call it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-03-30 09:32:31 +02:00
shiqi
27b100baa4 os/bluestore: clean up Invalid return value judgment
Signed-off-by: shiqi <1454927420@qq.com>
2017-03-30 14:33:53 +08:00
Haomai Wang
5d23e6431c Merge pull request #14245 from tchaikov/wip-revert-14201
Revert "msg/async/rdma: Debug prints for ibv_*"
2017-03-30 13:21:36 +08:00
Kefu Chai
7e0f0748ef Revert "msg/async/rdma: Debug prints for ibv_*"
This reverts commit 7d1475f627.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-03-30 12:58:48 +08:00
Haomai Wang
4100803cfe Merge pull request #14201 from Adirl/rdma-cm-4
msg/async/rdma: Introduce RDMAConnMgr + Debug prints

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-03-30 08:00:40 +08:00
Dan Mick
b227a70e53 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>
2017-03-29 11:36:05 -07:00
Jason Dillaman
49366c20de Merge pull request #14202 from tchaikov/wip-cast-size_t-arm32
rbd: use min<uint64_t>() explicitly

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-03-29 13:33:49 -04:00
Vasu Kulkarni
1947648669 Fix distro's, point to latest version
Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
2017-03-29 10:30:59 -07:00
Vasu Kulkarni
7b587304a5 Add reboot case for systemd test
test systemd units restart after reboot

Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
2017-03-29 10:30:49 -07:00
Igor Fedotov
51542d9acd test/store_test: fix bluestore test cases disablement
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
2017-03-29 16:34:00 +00:00
Sage Weil
cc51f56bb2 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>
2017-03-29 11:39:27 -04:00
Sage Weil
79bf5547cc mon/MgrMonitor: do not tick() if not active or leader
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:27 -04:00
Sage Weil
3015f304db 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>
2017-03-29 11:39:27 -04:00
Sage Weil
24b53524d2 librados: return error from mgr start_command
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:27 -04:00
Sage Weil
5dc9b8d026 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>
2017-03-29 11:39:27 -04:00
Sage Weil
4085eb4753 mgr/DaemonServer: log commands to cluster + audit logs
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:27 -04:00
Sage Weil
d3a10d3512 mgr/MgrStandby: add LogClient
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:27 -04:00
Sage Weil
2072fd9737 mgr/DaemonServer: debug on shutdown
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:27 -04:00
Sage Weil
69a4a8f616 mgr/DaemonServer: whitespace
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:27 -04:00
Sage Weil
a46690c623 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>
2017-03-29 11:39:27 -04:00
Sage Weil
8e61e1cfcf qa/suites/upgrade/jewel-x: don't initially start mgr daemons
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
2a073941a8 qa/releases/luminous.yaml: set up mgr key; start mgr
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
d403d42ac8 qa/suites/rados/upgrade: don't initially start mgr daemon
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
fa0b2164ad qa/tasks/ceph.py: add 'skip_mgr_daemons' option
For upgrades

Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
7edca203d8 qa/tasks/ceph.py: give everyone mgr caps
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
a6fab0825f mgr: do not crash if FSMap doesn't have 'addr' metadata
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
8ca982f403 mgr/MgrClient: do not assert on control-c
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
21297a65a5 mgr/Session: keep inst, not addr
For parity with log messages from other daemons etc.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
6a314cf420 mgr: move MgrSession to its own header
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
880dc2d8d3 mon/AuthMonitor: fix mgr mon caps to 'allow profile mgr'
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
6625fcd8fd systemd/ceph-mgr@.service: fix mgr mon cap
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
5906e359bd vstart.sh: fix mgr caps
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
dcfb54fd2d mon/AuthMonitor: add 'mgr' caps to keyring on upgrade
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00