xie xingguo [Tue, 15 Jan 2019 08:23:26 +0000 (16:23 +0800)]
crush: fix memory leak
If we remove the last item of bucket, there should still be
one final entry in the __weights__ field of __weight_set__.
Free the corresponding memory before we __null__ the pointer.
Patrick Donnelly [Mon, 14 Jan 2019 23:40:30 +0000 (15:40 -0800)]
Merge PR #25879 into master
* refs/pull/25879/head:
client: define template to declare ref
client: use message smart ptr instead of raw ptr
client: make map lookup optimizations
client: do not clear message payload
client: clean up variable name
*: use std::string_view instead of char ptr
Patrick Donnelly [Mon, 14 Jan 2019 19:32:01 +0000 (11:32 -0800)]
Merge PR #25633 into master
* refs/pull/25633/head:
mgr/rook: allow service describe and service ls to display nfs services
mgr/rook: add support for adding NFS gateways
mgr/orchestrator_cli: add support for adding NFS gateways
mgr/orchestrator_cli: convert service add/rm commands to be type-specific
mgr/rook: add decorator for add_stateless_service
mgr/rook: add a context manager instead of open-coding exception handling
Reviewed-by: Ricardo Dias <rdias@suse.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Sebastian Wagner <swagner@suse.com>
Sage Weil [Sat, 12 Jan 2019 11:32:54 +0000 (05:32 -0600)]
qa/tasks/ceph: stop any split/merge activity before scrubbing
If there are leftover merges at the end of the run they can take a long
time to get through, blowing our timeout for (waiting for pgs to become
active and to stop splitting/merge) and scrubbing pgs. Stop all of that
at the end of the run so that we don't have to wait so long.
Jeff Layton [Thu, 15 Nov 2018 17:22:38 +0000 (12:22 -0500)]
mgr/orchestrator_cli: add support for adding NFS gateways
Add necessary commands to orchestrator_cli to allow it to deploy a
cluster of NFS servers. Note that we have to be able to specify the pool
and an optional namespace for the recovery backend objects.
Jeff Layton [Thu, 20 Dec 2018 11:56:01 +0000 (06:56 -0500)]
mgr/orchestrator_cli: convert service add/rm commands to be type-specific
When adding services, we often need different sets of arguments
depending on the service type. Convert the "service add" and "service
rm" commands into separate commands for each service type.
Sebastian Wagner [Mon, 14 Jan 2019 11:03:33 +0000 (12:03 +0100)]
Merge pull request #25492 from sebastian-philipp/orchestrator-common-metaclass
pybind/mgr: Unified bits of volumes and orchestrator
Reviewed-by: Jan Fajerski <jfajerski@suse.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Tim Serong <tserong@suse.com>
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>
Zhi Zhang [Fri, 11 Jan 2019 04:58:34 +0000 (12:58 +0800)]
common/HeartbeatMap: no health check if heartbeat_file is empty
CephContext service thread will also do health check. But if
heartbeat_file is empty, this health check is useless. So try to check
heartbeat_file first and then do health check.
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