Sage Weil [Fri, 4 Jan 2019 18:11:04 +0000 (12:11 -0600)]
osd: support osd_numa_node, osd_numa_auto_affinity, osd_numa_prefer_iface
- osd_numa_node manually specifies a numa node.
- osd_numa_prefer_iface makes us prefer IPs in public_network that are
on the same numa node as the storage
- osd_numa_auto_affinity will set affinity to a numa node when both the
store and network(s) are on the same numa node.
These options are all flagged as 'startup', although osd_numa_node and
osd_numa_auto_affinity takes effect when the OSD is marked up, so doing
'ceph osd down ...' is sufficient to induce an update.
Sage Weil [Thu, 3 Jan 2019 17:59:36 +0000 (11:59 -0600)]
common/numa: cpu_set helpers and numa helpers
Note: the mask variants assume num_cpus is a factor of 4. Not sure
what local_cpus looks like when that is not the case... we'll use the
local_cpulist style instead.
Sage Weil [Fri, 4 Jan 2019 02:38:14 +0000 (20:38 -0600)]
Merge PR #25623 into master
* refs/pull/25623/head:
common/ceph_time: 'mo' for month
common/options: use new parse_timespan
common/ceph_time: add parse_timespan
common/config_proxy: pass err_ss through on set_val
common/ceph_time: add exact_timespan_str
Sage Weil [Fri, 4 Jan 2019 02:11:11 +0000 (20:11 -0600)]
Merge PR #25672 into master
* refs/pull/25672/head:
osd: OSD device smart data include additional nvme data
common/blkdev: add missing get_device_id impl
os/bluestore,filestore: use get_raw_devices
osd: update metadata and smart code to report get_device_id errors
mon: update metadata and smart commands to use get_raw_devices
common/blkdev: add get_raw_devices helper
common/blkdev: fix BlkDev::get_devid when we got a devname, not fd
common/blkdev: return optional error string from get_device_id
common/blkdev: refactor to add block_device_get_metrics returning json
hsiang41 [Fri, 28 Dec 2018 09:07:32 +0000 (17:07 +0800)]
osd: OSD device smart data include additional nvme data
Add nvme addition data into the deveh health data. That use nvme tool
and command syntax "nvme <vendor> smart-log-add <dev> -json". The nvme
json output append in the dev smart "nvme_smart_health_information_add_log".
- made run_smartctl static/private
- changed get_metrics to take a const string, not c str
Signed-off-by: Rick Chen <rick.chen@prophetstor.com> Signed-off-by: Sage Weil <sage@redhat.com>
ningtao [Thu, 3 Jan 2019 15:20:12 +0000 (23:20 +0800)]
mon: shutdown messenger early to avoid accessing deleted logger
In the monitor shutdown process, the MSG thread exits after the logger is released,
causing the null pointer to be accessed. So move the logger release to the MSG thread after it exits
Sage Weil [Thu, 3 Jan 2019 15:03:39 +0000 (09:03 -0600)]
Merge PR #25736 into master
* refs/pull/25736/head:
common/options: document some osd/rados options
unittest_osdmap: feed options as defaults
mon/OSDMonitor: allow osd_pool_default_pgp_num to be 0
Volker Theile [Thu, 3 Jan 2019 13:58:55 +0000 (14:58 +0100)]
mgr/telemetry: Fix various issues
- Set module config type to ``str``, otherwise default values are ``'None'`` (str) instead of ``None`` which will cause ``init_module_config`` to fail.
- RuntimeError does not format strings.
Kefu Chai [Thu, 3 Jan 2019 11:00:19 +0000 (19:00 +0800)]
pybind/rgw: pass the flags to callback function
before this change, the `flags` parameter passed to `LibRGWFS.readdir()`
will be dropped on the floor and ignored.
after this change, it will be passed to the specified callback function.
Yingxin [Mon, 17 Dec 2018 13:51:49 +0000 (21:51 +0800)]
crimson/net: fix address learning during banner exchange
* Don't store my_addr in `Connection`, because my_addr can be learned
and thus changed.
* Support nonce in SocketMessenger.
* Always set nonce when set_myaddr().
* Add learned_addr() for SocketMessenger.
* Add side_t and socket_port to show the real connecting
ports of the SocketConnection.
* Fix bannder exchange logic for addresses, including nonce, type, ip,
port, socket_port for my_addr and peer_addr.
* Add more detailed logging prefixes for SocketConnection.
Jianpeng Ma [Thu, 3 Jan 2019 06:34:43 +0000 (14:34 +0800)]
ceph_argparse: make command ceph acceph SIGINT.
If no --connect-timeout point and there is no ceph.conf, the command
'ceph -s' can't stop by ctrl+c.
This introduced by commit 4d8fc26c8 Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Kefu Chai [Thu, 20 Dec 2018 03:24:28 +0000 (11:24 +0800)]
cls/rbd: init local var with known value
DirectoryState does not have an "invalid" enum so far, since it's
defined using `enum class`, init a value of this type with a known value
could be a better choice even it is always initialized before being read.
this silences the GCC warning of:
src/cls/rbd/cls_rbd.cc:3147:3: warning: ‘on_disk_directory_state’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
if (directory_state != on_disk_directory_state) {
^~
The stats entries for rgw buckets has a category, which used a
combination of uint8_t and enum RGWObjClass. Clean this up by
converting RGWObjClass to an enum class and using that
throughout. This provides type safety and better code clarity. Also,
add some source code documentation.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
Kefu Chai [Wed, 2 Jan 2019 16:20:13 +0000 (00:20 +0800)]
osd/OSDMap: set pg_autoscale_mode with setting from conf
* update build_simple_optioned() to set pg_autoscale_mode with the setting
read from conf, otherwise it will be a random value in heap.
* update cli test accordingly, otherwise we will have
Venky Shankar [Mon, 5 Nov 2018 05:51:53 +0000 (00:51 -0500)]
mds: dump scrub formatted output when context completion
Include scrub tag as part of the output and move the
formatting in context completion to support scrub opeation
triggered via tell interface (introduced later).
Venky Shankar [Mon, 5 Nov 2018 05:49:44 +0000 (00:49 -0500)]
mds: generate random scrub tag when empty
With this, scrub operations are tagged with a random
uuid if tag is unspecified. This also helps to show
in-progress scrub operations via "scrub status" command
(introduced in later commits).
Venky Shankar [Mon, 5 Nov 2018 05:10:15 +0000 (00:10 -0500)]
mds: introduce C_ExecAndReply context completion class
Tell commands that need to asynchronous reply back can
subclass C_ExecAndReply() and implement exec() virtual
function to support asynchronous execution of the command
(via finisher thread).