xie xingguo [Sat, 12 Jan 2019 07:01:54 +0000 (15:01 +0800)]
osd/OSDMap: potential access violation fix
Seems we'll continue to access the iterator after it is invalidated
by the __erase__ method.
Also this is more efficient considering there could be some extreme
ec-pool (e.g., 8 + 2) consumers..
Sage Weil [Sat, 12 Jan 2019 16:26:32 +0000 (10:26 -0600)]
Merge PR #25902 into master
* refs/pull/25902/head:
qa/standalone/mon/mon-handle-forward: fix grep path and check return results
mon/MonClient: be less aggressive/paranoid about reopening mon connections
Sage Weil [Sat, 12 Jan 2019 11:44:00 +0000 (05:44 -0600)]
Merge PR #25886 into master
* refs/pull/25886/head:
qa/tasks/rebuild_mondb: use monmap to properly name the mons
ceph-monstore-tool: add --monmap <path> argument to rebuild command
ceph-mon: dump monmap to debug logs
Revert "mon/MonMap: no noname- mon name prefix when for_mkfs"
mon/MonMap: improve/fix initial monmap generation for mkfs
ceph-mon: make membership check with public_addr more robust
ceph-mon: make mkfs check whether I am in monmap more robust
Sage Weil [Wed, 9 Jan 2019 22:05:40 +0000 (16:05 -0600)]
qa/tasks/rebuild_mondb: use monmap to properly name the mons
We used to rely on the monmap bootstrap code to magically create a valid
monmap with named mons because our old-style ceph.conf had mon_addr
values in each mon.foo section. Instead, just feed it a real monmap
from pre-destruction.
In practice, a user can manually generate this monmap, or rename the
mons after the fact with --inject-monmap, or whatever. Out of scope
for this test, so we just do the simplest thing to make the rebuild test
work.
Stephan Müller [Thu, 10 Jan 2019 13:58:39 +0000 (14:58 +0100)]
mgr/dashboard: Render all objects in KV-table
The problem was that the key value table didn't render all objects in
the given object, even if 'renderObjects' was set to true.
For example you give it an object with 2 attributes each of them holds a
non empty object, this will result in a table data that is not fully
converted to key value objects, which will result as text '[Object
object]' in the table view.
Now every object will be rendered and the key value array will be sorted
by key.
Fixes: https://tracker.ceph.com/issues/37859 Signed-off-by: Stephan Müller <smueller@suse.com>
The ceph_mon.cc bootstrap code expects a noname- prefix to identify which
unamed mons (i.e., generated from mon_host) in the initial monmap can be
taken over as itself.
At the same time, the mon recovery code needs a way to know how to name
the monitors.
Sage Weil [Fri, 11 Jan 2019 00:12:47 +0000 (18:12 -0600)]
Merge PR #25755 into master
* refs/pull/25755/head:
msg/async/Protocol*: bump global_seq when retrying connection
msg/async/Protocol*: unregister con from accept vs mark_down race
Reviewed-by: Ricardo Dias <rdias@suse.com> Reviewed-by: Gregory Farnum <gfarnum@redhat.com> Reviewed-by: Haomai Wang <haomai@xsky.com>
Sage Weil [Thu, 10 Jan 2019 23:17:24 +0000 (17:17 -0600)]
mon/MonClient: be less aggressive/paranoid about reopening mon connections
Previously we were reopening any time the name of our mon changed. That
was pretty much every time, since we started out with names from the
seed monmap like 'noname-[abc]' that never match the real mons.
Instead, only reopen if the addr we are connecting to is no longer in the
monmap. We don't actually care about the mon's name.
Fixes: http://tracker.ceph.com/issues/37868 Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 10 Jan 2019 22:50:38 +0000 (16:50 -0600)]
Merge PR #25792 into master
* refs/pull/25792/head:
common/numa: remove unused _mask variants
osd: support osd_numa_node, osd_numa_auto_affinity, osd_numa_prefer_iface
mon/OSDMonitor: add 'osd numa-status' command
osd: report numa node for network interface(s)
common/pick_address: get numa node info for a interface
os/bluestore: report numa node info for storage
os/bluestore/KernelDevice: report numa info for each device
os/bluestore: allow get_devices() to run without bluestore started
common/blkdev: query numa info
common/numa: cpu_set helpers and numa helpers
common/blkdev: drop debug statements
Sage Weil [Mon, 7 Jan 2019 14:34:18 +0000 (08:34 -0600)]
msg/async/Protocol*: bump global_seq when retrying connection
In the top connect retry in particular we do not bump connect_seq, so it
is critical that we bump global_seq so that the two connection attempts
are distinguishable at the peer.
Jason Dillaman [Wed, 9 Jan 2019 19:46:49 +0000 (14:46 -0500)]
librbd: keep access/modified timestamp updates out of IO path
If the cache is enabled, it was possible for the timestamp updates
to cause race conditions with librbd clients (e.g. rbd export)
that had data corrupting effects since callbacks were expected to
be serialized.
Fixes: http://tracker.ceph.com/issues/37745 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* TableKeyValueComponent:
Bugfix in method: _insertFlattenObjects
* Updated jest global mock:
Now window.getComputedStyle returns an object
that has getPropertyValue defined
(otherwise jest pool tests involving chart.js threw error). See:
https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle
Fixes: https://tracker.ceph.com/issues/37717 Fixes: https://tracker.ceph.com/issues/34320 Signed-off-by: Alfonso Martínez <almartin@redhat.com>
xie xingguo [Tue, 8 Jan 2019 10:38:45 +0000 (18:38 +0800)]
msg/async: do not force updating rotating keys inline
We found quite a few OSDs were unable to re-join the cluster
after the updation of the core switch was done.
The symptoms are similar - all these OSDs are complaining about not
being able to renew rotating keys, which are necessary
for authorized entities to talk with each other.
The root cause is that a specific OSD would keep hunting a reachable Mon,
and if unavailable, the hunting process would reboot every __timeout__ seconds,
causing the async-connection in progress torn down and re-created.
However the underlying thread in charge of the hunting process could be
blocked if there were hundreds of async-connections which were also waiting
for new rotating keys, e.g.:
```
2018-12-29 16:35:19.210884 7f416d6ee700 0 -- 172.18.35.6:6808/1036230 >> 172.18.35.4:6810/1037600 conn(0x7f41d9e3c000 :6808 s=STATE_CONNECTING_WAIT_CONNECT_REPLY_AUTH
pgs=293 cs=25 l=0).handle_connect_reply connect got BADAUTHORIZER
2018-12-29 16:35:19.210891 7f416d6ee700 10 monclient(hunting): wait_auth_rotating waiting (until 2018-12-29 16:35:29.210889)
2018-12-29 16:35:29.210947 7f416d6ee700 0 monclient(hunting): wait_auth_rotating timed out after 10
2018-12-29 16:35:29.211101 7f416d6ee700 0 -- 172.18.35.6:6808/1036230 >> 172.18.35.4:6824/1028882 conn(0x7f418195d000 :-1 s=STATE_CONNECTING_WAIT_CONNECT_REPLY_AUTH p
gs=1433 cs=8 l=0).handle_connect_reply connect got BADAUTHORIZER
2018-12-29 16:35:29.211108 7f416d6ee700 10 monclient(hunting): wait_auth_rotating waiting (until 2018-12-29 16:35:39.211108)
2018-12-29 16:35:39.211167 7f416d6ee700 0 monclient(hunting): wait_auth_rotating timed out after 10
```
which as a result causes the corresponding OSD being stuck at hunting forever.
Fix by avoiding updating rotating keys on the messenger level and
making monclient do it instead. On detecting a bad or an outdated
rotating key, we could simply backoff and restart the connecting
procedure.
* refs/pull/25621/head:
mds: allow boot on read-only
mds: setup readonly mode for PurgeQueue
mds: return string_view for type str
mds: add missing locks for PurgeQueue methods
mds: delete on_error context on des