]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
6 years agocommon/blkdev.h: use std::string 25783/head
Neha Ojha [Fri, 4 Jan 2019 02:57:28 +0000 (18:57 -0800)]
common/blkdev.h: use std::string

Signed-off-by: Neha Ojha <nojha@redhat.com>
6 years agoMerge PR #24159 into master
Sage Weil [Fri, 4 Jan 2019 02:38:30 +0000 (20:38 -0600)]
Merge PR #24159 into master

* refs/pull/24159/head:
mon/PGMap: show pg state age instead of stamp

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
6 years agoMerge PR #25623 into master
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

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge PR #25756 into master
Sage Weil [Fri, 4 Jan 2019 02:37:54 +0000 (20:37 -0600)]
Merge PR #25756 into master

* refs/pull/25756/head:
vstart.sh: force setting dashboard options before first mgr starts
mon/ConfigMonitor: add --force flag to 'config set'

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge PR #25763 into master
Sage Weil [Fri, 4 Jan 2019 02:37:38 +0000 (20:37 -0600)]
Merge PR #25763 into master

* refs/pull/25763/head:
ceph_argparse: make command ceph acceph SIGINT.

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge PR #25672 into master
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

Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agoMerge PR #25593 into master
Patrick Donnelly [Fri, 4 Jan 2019 01:40:53 +0000 (17:40 -0800)]
Merge PR #25593 into master

* refs/pull/25593/head:
mds: create heartbeat grace config option

Reviewed-by: Zheng Yan <zyan@redhat.com>
6 years agoosd: OSD device smart data include additional nvme data 25672/head
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>
6 years agocommon/blkdev: add missing get_device_id impl
Sage Weil [Tue, 1 Jan 2019 16:58:56 +0000 (10:58 -0600)]
common/blkdev: add missing get_device_id impl

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoos/bluestore,filestore: use get_raw_devices
Sage Weil [Fri, 21 Dec 2018 17:21:32 +0000 (11:21 -0600)]
os/bluestore,filestore: use get_raw_devices

There is a minor change here: before the devices list would include
e.g. 'sda2' and 'sda', and now it will only include 'sda'.

Fixes: http://tracker.ceph.com/issues/37542
Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd: update metadata and smart code to report get_device_id errors
Sage Weil [Fri, 21 Dec 2018 17:22:17 +0000 (11:22 -0600)]
osd: update metadata and smart code to report get_device_id errors

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon: update metadata and smart commands to use get_raw_devices
Sage Weil [Fri, 21 Dec 2018 17:21:57 +0000 (11:21 -0600)]
mon: update metadata and smart commands to use get_raw_devices

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocommon/blkdev: add get_raw_devices helper
Sage Weil [Fri, 21 Dec 2018 17:20:34 +0000 (11:20 -0600)]
common/blkdev: add get_raw_devices helper

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25674 from alfredodeza/wip-rm37442
Alfredo Deza [Thu, 3 Jan 2019 18:44:06 +0000 (13:44 -0500)]
Merge pull request #25674 from alfredodeza/wip-rm37442

ceph-volume normalize comma to dot for string to int conversions

Reviewed-by: Andrew Schoen <aschoen@redhat.com>
6 years agoMerge PR #24635 into master
Patrick Donnelly [Thu, 3 Jan 2019 18:15:31 +0000 (10:15 -0800)]
Merge PR #24635 into master

* refs/pull/24635/head:
test: add scrub control command tests
mds: scrub abort/pause/resume/status control commands
test: switch using "scrub start" tell interface to initiate scrub
mds: introduce "scrub start" tell interface to initiate scrub
mds: dump scrub formatted output when context completion
mds: generate random scrub tag when empty
mds: introduce C_ExecAndReply context completion class
mds: use CInode::scrub_is_in_progress() wherever required

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zheng Yan <zyan@redhat.com>
6 years agoMerge pull request #25473 from theanalyst/rgw/version-copy-fix
Matt Benjamin [Thu, 3 Jan 2019 15:42:31 +0000 (10:42 -0500)]
Merge pull request #25473 from theanalyst/rgw/version-copy-fix

rgw: fix versioned obj copy generating tags

6 years agocommon/ceph_time: 'mo' for month 25623/head
Sage Weil [Fri, 21 Dec 2018 16:19:16 +0000 (10:19 -0600)]
common/ceph_time: 'mo' for month

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25761 from tchaikov/wip-qa-health-schema
Kefu Chai [Thu, 3 Jan 2019 15:15:45 +0000 (23:15 +0800)]
Merge pull request #25761 from tchaikov/wip-qa-health-schema

mgr/dashboard: updated API test to reflect changes in ModuleInfo

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge PR #25736 into master
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

Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agoMerge pull request #25766 from tchaikov/wip-rgw-readdir-flags
Kefu Chai [Thu, 3 Jan 2019 15:01:29 +0000 (23:01 +0800)]
Merge pull request #25766 from tchaikov/wip-rgw-readdir-flags

pybind/rgw: pass the flags to callback function

Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
6 years agoMerge pull request #25635 from rhcs-dashboard/36740-pool-stats-disabled-by-default
Kefu Chai [Thu, 3 Jan 2019 14:45:54 +0000 (22:45 +0800)]
Merge pull request #25635 from rhcs-dashboard/36740-pool-stats-disabled-by-default

mgr/dashboard: pool stats not returned by default

Reviewed-by: Volker Theile <vtheile@suse.com>
6 years agoMerge PR #25528 into master
Patrick Donnelly [Thu, 3 Jan 2019 14:43:29 +0000 (06:43 -0800)]
Merge PR #25528 into master

* refs/pull/25528/head:
mds: log evicted clients to clog/dbg

Reviewed-by: Zheng Yan <zyan@redhat.com>
6 years agoMerge pull request #24845 from pritha-srivastava/wip-rgw-assume-role-fixes
Casey Bodley [Thu, 3 Jan 2019 14:24:58 +0000 (09:24 -0500)]
Merge pull request #24845 from pritha-srivastava/wip-rgw-assume-role-fixes

rgw: Minor fixes to AssumeRole for boto compliance.

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
6 years agoMerge pull request #25180 from pritha-srivastava/wip-rgw-user-policy-fixes
Casey Bodley [Thu, 3 Jan 2019 14:22:36 +0000 (09:22 -0500)]
Merge pull request #25180 from pritha-srivastava/wip-rgw-user-policy-fixes

rgw: Fixes to permission evaluation related to user policies.

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
6 years agoMerge pull request #25659 from Linbing/wip-fixup-read-deadlock
Kefu Chai [Thu, 3 Jan 2019 14:06:27 +0000 (22:06 +0800)]
Merge pull request #25659 from Linbing/wip-fixup-read-deadlock

os/bluestore: fixup access a destroy cond cause deadlock or undefine behavior

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge PR #25673 into master
Sage Weil [Thu, 3 Jan 2019 13:23:57 +0000 (07:23 -0600)]
Merge PR #25673 into master

* refs/pull/25673/head:
mon/Monitor: quorum_age in JSON output as int, not string

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agocommon/options: use new parse_timespan
Sage Weil [Wed, 19 Dec 2018 19:24:06 +0000 (13:24 -0600)]
common/options: use new parse_timespan

It's more complete and robust, and lives in ceph_time.h where it probably
belongs.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocommon/ceph_time: add parse_timespan
Sage Weil [Wed, 19 Dec 2018 19:23:42 +0000 (13:23 -0600)]
common/ceph_time: add parse_timespan

Make it understand units like 'hours', 'minute', 'm', 'w', etc.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agovstart.sh: force setting dashboard options before first mgr starts 25756/head
Sage Weil [Wed, 2 Jan 2019 22:29:44 +0000 (16:29 -0600)]
vstart.sh: force setting dashboard options before first mgr starts

These options are unknown before the mgr first starts and registers them.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/ConfigMonitor: add --force flag to 'config set'
Sage Weil [Wed, 2 Jan 2019 22:29:17 +0000 (16:29 -0600)]
mon/ConfigMonitor: add --force flag to 'config set'

Add a force flag to override option and/or value checks.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/mgr: add "module_options" to module_info_schema 25761/head
Kefu Chai [Thu, 3 Jan 2019 03:02:26 +0000 (11:02 +0800)]
qa/mgr: add "module_options" to module_info_schema

it was introduced in 280c23ba. so update the schema test accordingly

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agopybind/rgw: pass the flags to callback function 25766/head
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.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25580 from cyx1231st/wip-crimson-msgr-logging
Kefu Chai [Thu, 3 Jan 2019 09:09:09 +0000 (17:09 +0800)]
Merge pull request #25580 from cyx1231st/wip-crimson-msgr-logging

crimson/net: fix addresses during banner exchange

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agocrimson/net: fix address learning during banner exchange 25580/head
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.

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
6 years agocrimson/net: add logic_name to indicate the msgr role for debugging
Yingxin [Tue, 25 Dec 2018 06:02:56 +0000 (14:02 +0800)]
crimson/net: add logic_name to indicate the msgr role for debugging

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
6 years agocrimson/net: add basic loggings for SocketConnection
Yingxin [Tue, 25 Dec 2018 06:01:54 +0000 (14:01 +0800)]
crimson/net: add basic loggings for SocketConnection

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
6 years agoceph_argparse: make command ceph acceph SIGINT. 25763/head
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>
6 years agoMerge pull request #25757 from gregsfortytwo/wip-doc-put-warning
Kefu Chai [Thu, 3 Jan 2019 06:21:00 +0000 (14:21 +0800)]
Merge pull request #25757 from gregsfortytwo/wip-doc-put-warning

doc: warn about how 'rados put' works in the manpage

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25706 from joscollin/wip-build-doc-librados
Kefu Chai [Thu, 3 Jan 2019 06:18:42 +0000 (14:18 +0800)]
Merge pull request #25706 from joscollin/wip-build-doc-librados

librados: fix admin/build-doc warning

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25734 from tchaikov/wip-mgr-default-options
Kefu Chai [Thu, 3 Jan 2019 06:12:54 +0000 (14:12 +0800)]
Merge pull request #25734 from tchaikov/wip-mgr-default-options

mgr: define option defaults for MgrStandbyModule as well

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25735 from wjwithagen/wjw-fix-WRITE_LIFE
Kefu Chai [Thu, 3 Jan 2019 06:12:02 +0000 (14:12 +0800)]
Merge pull request #25735 from wjwithagen/wjw-fix-WRITE_LIFE

os/bluestore: Only use WRITE_LIFE_ when available

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25746 from tchaikov/wip-pg-autoscale-mode
Kefu Chai [Thu, 3 Jan 2019 06:10:15 +0000 (14:10 +0800)]
Merge pull request #25746 from tchaikov/wip-pg-autoscale-mode

osd/OSDMap: set pg_autoscale_mode with setting from conf

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25588 from tchaikov/wip-auth-silence-gcc-warning
Kefu Chai [Thu, 3 Jan 2019 06:09:20 +0000 (14:09 +0800)]
Merge pull request #25588 from tchaikov/wip-auth-silence-gcc-warning

cls/rbd: init local var with known value

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-By: Casey Bodley <cbodley@redhat.com>
6 years agoqa/mgr: extract module_info_schema and reused it
Kefu Chai [Thu, 3 Jan 2019 03:00:31 +0000 (11:00 +0800)]
qa/mgr: extract module_info_schema and reused it

both standby mgr and active mgr have this sub-schema. so extract it out
and reuse it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agocls/rbd: init local var with known value 25588/head
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) {
   ^~

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agomon/PGMap: show pg state age instead of stamp 24159/head
Sage Weil [Thu, 20 Sep 2018 21:58:31 +0000 (16:58 -0500)]
mon/PGMap: show pg state age instead of stamp

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25687 from tchaikov/wip-pg-stats
Kefu Chai [Thu, 3 Jan 2019 01:41:46 +0000 (09:41 +0800)]
Merge pull request #25687 from tchaikov/wip-pg-stats

osd/PrimaryLogPG: do not count failed read in delta_stats

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agodoc: warn about how 'rados put' works in the manpage 25757/head
Greg Farnum [Wed, 2 Jan 2019 23:00:25 +0000 (15:00 -0800)]
doc: warn about how 'rados put' works in the manpage

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
6 years agoMerge pull request #25705 from joscollin/wip-doc-common
Gregory Farnum [Wed, 2 Jan 2019 22:21:28 +0000 (14:21 -0800)]
Merge pull request #25705 from joscollin/wip-doc-common

doc: Fix Create a Cluster url in Running Multiple Clusters

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
6 years agoMerge pull request #25450 from ivancich/wip-rgw-category-cleanup
J. Eric Ivancich [Wed, 2 Jan 2019 22:00:28 +0000 (17:00 -0500)]
Merge pull request #25450 from ivancich/wip-rgw-category-cleanup

rgw: clean-up -- use enum class for stats category

Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
6 years agorgw: clean-up -- remove unnessary "struct"s 25450/head
J. Eric Ivancich [Thu, 13 Dec 2018 20:55:20 +0000 (15:55 -0500)]
rgw: clean-up -- remove unnessary "struct"s

In C++ "struct" is unnecessary when referencing a defined
struct. Clean up all uses in src/cls/rgw source files.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
6 years agorgw: clean-up use enum class for stats category
J. Eric Ivancich [Wed, 5 Dec 2018 15:18:22 +0000 (10:18 -0500)]
rgw: clean-up use enum class for stats category

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>
6 years agoceph-volume tests.util ensure ints and strings with commas can be converted to ints 25674/head
Alfredo Deza [Wed, 2 Jan 2019 19:18:14 +0000 (14:18 -0500)]
ceph-volume tests.util ensure ints and strings with commas can be converted to ints

Signed-off-by: Alfredo Deza <adeza@redhat.com>
6 years agoceph-volume test verify strings with a comma can be converted to ints
Alfredo Deza [Fri, 21 Dec 2018 20:26:39 +0000 (15:26 -0500)]
ceph-volume test verify strings with a comma can be converted to ints

Signed-off-by: Alfredo Deza <adeza@redhat.com>
6 years agoceph-volume util normalize comma with dot for str-to-int conversion
Alfredo Deza [Fri, 21 Dec 2018 20:24:25 +0000 (15:24 -0500)]
ceph-volume util normalize comma with dot for str-to-int conversion

Signed-off-by: Alfredo Deza <adeza@redhat.com>
6 years agoMerge pull request #24676 from TheJJ/cryptsetup-allow-discards
Alfredo Deza [Wed, 2 Jan 2019 18:23:21 +0000 (13:23 -0500)]
Merge pull request #24676 from TheJJ/cryptsetup-allow-discards

ceph-volume: enable device discards

Reviewed-by: Alfredo Deza <adeza@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
6 years agocommon/options: document some osd/rados options 25736/head
Sage Weil [Tue, 1 Jan 2019 22:37:04 +0000 (16:37 -0600)]
common/options: document some osd/rados options

Many of these are actually on the mon.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agounittest_osdmap: feed options as defaults
Sage Weil [Wed, 2 Jan 2019 17:40:22 +0000 (11:40 -0600)]
unittest_osdmap: feed options as defaults

We can't change some of these at runtime due to FLAG_CREATE.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd/OSDMap: set pg_autoscale_mode with setting from conf 25746/head
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

/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/cli/osdmaptool/create-racks.t:
failed
---
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/cli/osdmaptool/create-racks.t
+++
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/cli/osdmaptool/create-racks.t.err
@@ -796,7 +796,7 @@
   nearfull_ratio 0
   min_compat_client jewel

-  pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash
rjenkins pg_num 15296 pgp_num 15296 last_change 0 flags hashpspool
stripe_width 0 application rbd
+  pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash
rjenkins pg_num 15296 pgp_num 15296 autoscale_mode ??? last_change 0
flags hashpspool stripe_width 0 application rbd

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25441 from theanalyst/decode-refcount-types
Kefu Chai [Wed, 2 Jan 2019 16:45:50 +0000 (00:45 +0800)]
Merge pull request #25441 from theanalyst/decode-refcount-types

cls: refcount: add obj_refcount to ceph-dencoder

Reviewed-By: Casey Bodley <cbodley@redhat.com>
6 years agoceph-volume: enable device discards 24676/head
Jonas Jelten [Fri, 19 Oct 2018 13:15:03 +0000 (15:15 +0200)]
ceph-volume: enable device discards

When using SSDs as encrypted OSD device, discards do not pass the
encryption layer. This option activates discard requests.

Signed-off-by: Jonas Jelten <jj@stusta.net>
6 years agomgr: define option defaults for MgrStandbyModule as well 25734/head
Kefu Chai [Tue, 1 Jan 2019 15:39:57 +0000 (23:39 +0800)]
mgr: define option defaults for MgrStandbyModule as well

in 0f814f38, we are using self.MODULE_OPTION_DEFAULTS as a fallback, but
the MgrStandbyModule does not have it defined. in this change,

* apply 0f814f38 to MgrStandbyModule
* apply 0228bd79 to MgrStandbyModule

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agotest: add scrub control command tests 24635/head
Venky Shankar [Tue, 18 Dec 2018 13:35:21 +0000 (08:35 -0500)]
test: add scrub control command tests

Fixes: http://tracker.ceph.com/issues/12282
Signed-off-by: Venky Shankar <vshankar@redhat.com>
6 years agomds: scrub abort/pause/resume/status control commands
Venky Shankar [Mon, 5 Nov 2018 06:24:39 +0000 (01:24 -0500)]
mds: scrub abort/pause/resume/status control commands

Signed-off-by: Venky Shankar <vshankar@redhat.com>
6 years agotest: switch using "scrub start" tell interface to initiate scrub
Venky Shankar [Tue, 18 Dec 2018 13:29:41 +0000 (08:29 -0500)]
test: switch using "scrub start" tell interface to initiate scrub

... and fixup doc too.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
6 years agomds: introduce "scrub start" tell interface to initiate scrub
Venky Shankar [Mon, 5 Nov 2018 05:54:24 +0000 (00:54 -0500)]
mds: introduce "scrub start" tell interface to initiate scrub

This should be preferred over the traditional asok interface
which would probably get deprecated (soon).

Signed-off-by: Venky Shankar <vshankar@redhat.com>
6 years agomds: dump scrub formatted output when context completion
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).

Signed-off-by: Venky Shankar <vshankar@redhat.com>
6 years agomds: generate random scrub tag when empty
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).

Signed-off-by: Venky Shankar <vshankar@redhat.com>
6 years agomds: introduce C_ExecAndReply context completion class
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).

Signed-off-by: Venky Shankar <vshankar@redhat.com>
6 years agomds: use CInode::scrub_is_in_progress() wherever required
Venky Shankar [Wed, 29 Aug 2018 09:08:09 +0000 (05:08 -0400)]
mds: use CInode::scrub_is_in_progress() wherever required

Signed-off-by: Venky Shankar <vshankar@redhat.com>
6 years agoMerge pull request #25541 from theanalyst/wip-es-log-fixes
Abhishek L [Wed, 2 Jan 2019 12:56:37 +0000 (13:56 +0100)]
Merge pull request #25541 from theanalyst/wip-es-log-fixes

rgw: sync module: avoid printing attrs of objects in log

Reviewed-By: Casey Bodley <cbodley@redhat.com>
6 years agoMerge pull request #25731 from liewegas/wip-37775
Kefu Chai [Wed, 2 Jan 2019 10:41:01 +0000 (18:41 +0800)]
Merge pull request #25731 from liewegas/wip-37775

osd: reliably send pg_created messages to the mon

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agolibrados: fix admin/build-doc warning 25706/head
Jos Collin [Wed, 26 Dec 2018 06:28:06 +0000 (11:58 +0530)]
librados: fix admin/build-doc warning

Fixed warning: librados.h:321: warning: Member compressed_bytes_alloc
(variable) of class rados_pool_stat_t is not documented.

Signed-off-by: Jos Collin <jcollin@redhat.com>
6 years agomon/OSDMonitor: allow osd_pool_default_pgp_num to be 0
Sage Weil [Tue, 1 Jan 2019 22:23:11 +0000 (16:23 -0600)]
mon/OSDMonitor: allow osd_pool_default_pgp_num to be 0

If it's 0, use the pg_num value.  This lets you adjust the
osd_pool_default_pg_num option without also adjusting the pgp_num one.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agobluestore: Only use WRITE_LIFE_ when available 25735/head
Willem Jan Withagen [Tue, 1 Jan 2019 17:00:22 +0000 (18:00 +0100)]
bluestore: Only use WRITE_LIFE_ when available

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
6 years agocommon/blkdev: fix BlkDev::get_devid when we got a devname, not fd
Sage Weil [Fri, 21 Dec 2018 17:19:38 +0000 (11:19 -0600)]
common/blkdev: fix BlkDev::get_devid when we got a devname, not fd

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocommon/blkdev: return optional error string from get_device_id
Sage Weil [Fri, 21 Dec 2018 16:43:38 +0000 (10:43 -0600)]
common/blkdev: return optional error string from get_device_id

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocommon/blkdev: refactor to add block_device_get_metrics returning json
Sage Weil [Fri, 21 Dec 2018 03:48:42 +0000 (21:48 -0600)]
common/blkdev: refactor to add block_device_get_metrics returning json

Refactor block_device_run_smartctl into a helper that returns JSON.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/Monitor: quorum_age in JSON output as int, not string 25673/head
Sage Weil [Fri, 21 Dec 2018 18:56:21 +0000 (12:56 -0600)]
mon/Monitor: quorum_age in JSON output as int, not string

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25732 from liewegas/wip-37776
Kefu Chai [Tue, 1 Jan 2019 16:04:39 +0000 (00:04 +0800)]
Merge pull request #25732 from liewegas/wip-37776

qa/workunits/rados/test_health_warnings: prevent out osds

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25726 from tchaikov/wip-37751
Kefu Chai [Tue, 1 Jan 2019 15:49:27 +0000 (23:49 +0800)]
Merge pull request #25726 from tchaikov/wip-37751

osd: unlock osd_lock when tweaking osd settings

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25733 from tchaikov/wip-37719-workaround
Kefu Chai [Tue, 1 Jan 2019 15:44:23 +0000 (23:44 +0800)]
Merge pull request #25733 from tchaikov/wip-37719-workaround

librbd: workaround an ICE of GCC

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agocrimson: workaround an ICE of GCC 25733/head
Kefu Chai [Tue, 1 Jan 2019 08:38:15 +0000 (16:38 +0800)]
crimson: workaround an ICE of GCC

this change works around the FTBFS on arm64:

/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/crimson/common/config_proxy.h:74:13:
internal compiler error: in tsubst_decomp_names, at cp/pt.c:16537
             for (auto& [obs, keys] : rev_obs) {
             ^~~
Please submit a full bug report,
with preprocessed source if appropriate.

it seems that this issue is a dup of
https://bugzilla.redhat.com/show_bug.cgi?id=1639019 .

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agolibrbd: workaround an ICE of GCC
Kefu Chai [Tue, 1 Jan 2019 07:49:05 +0000 (15:49 +0800)]
librbd: workaround an ICE of GCC

GCC is somehow annoyed at seeing the combination of decltype and
initializer_list in this place. i tried to remove the `if` clause, and
only left the `else` block, GCC was happy with that change. i also tried
to pass an empty `{}` to `decltype(reply.lockers)`, and GCC was also
happy with that. so i guess there are multiple factors taking effect in
this problem. probably any of them could be the last straw that breaks
GCC.

but we cannot have a minimal reproducer for this issue here without more
efforts. and `reply.lockers` is empty after `reply` is constructed, so
it would be simpler if we just add the locker info to it instead of
assigning a newly constructed `map` to it.

Fixes: http://tracker.ceph.com/issues/37719
Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25640 from joscollin/wip-mon-parse
Kefu Chai [Tue, 1 Jan 2019 06:39:59 +0000 (14:39 +0800)]
Merge pull request #25640 from joscollin/wip-mon-parse

mon,osd: avoid str copy in parse

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25534 from trociny/wip-36244
Kefu Chai [Tue, 1 Jan 2019 06:12:23 +0000 (14:12 +0800)]
Merge pull request #25534 from trociny/wip-36244

mgr: fix crash due to multiple sessions from daemons with same name

Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge PR #25597 into master
Sage Weil [Tue, 1 Jan 2019 04:31:18 +0000 (22:31 -0600)]
Merge PR #25597 into master

* refs/pull/25597/head:
mgr/hello: define some module options
pybind/mgr/mgr_module: normalize defaults to str when type is missing
mgr/telegraf: specify option types
mgr/telemetry: specify option types
mgr/zabbix: specify option types
mgr/localpool: document options and specify in native types
mgr/devicehealth: document options and specify in native types
mgr/balancer: document and specify options
common/options: make runtime vs not runtime explicit, not type-dependent
mon/MgrMonitor: mark module options with FLAG_MGR
mon/MgrMonitor: make find_module_option handle localized option names
pybind/mgr/mgr_module: set values as string
mgr: return options as appropriate python type
mgr/PythonCompat: python 3 cludges
pybind/mgr/mgr_module: make use of defined default value
mgr/PyModule: populate ModuleOptions and expose to mon
mon/ConfigMonitor: unify module options with built-in options
mon/MgrMonitor: populate options
mon/MgrMap: define ModuleOptions and include in map
common/options: expand type helpers and make them static
common/options: pin enums to values

Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
6 years agoMerge PR #25652 into master
Sage Weil [Tue, 1 Jan 2019 04:30:40 +0000 (22:30 -0600)]
Merge PR #25652 into master

* refs/pull/25652/head:
osd/OSDMap: disallow new upmaps on pgs that are pending merge
osd/PG: align past_intervals and last_epoch_clean for fabricated merge target

Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agoMerge PR #25730 into master
Sage Weil [Tue, 1 Jan 2019 04:30:03 +0000 (22:30 -0600)]
Merge PR #25730 into master

* refs/pull/25730/head:
Revert "os/objectstore: add new op OP_CREATE for create a new object."

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge PR #25670 into master
Sage Weil [Tue, 1 Jan 2019 04:28:47 +0000 (22:28 -0600)]
Merge PR #25670 into master

* refs/pull/25670/head:
os/bluestore: KernelDevice::read() does the EIO mapping now.

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge PR #25408 into master
Sage Weil [Mon, 31 Dec 2018 21:24:26 +0000 (15:24 -0600)]
Merge PR #25408 into master

* refs/pull/25408/head:
mgr/hello: Make use of `HandleCommandResult`.

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoqa/workunits/rados/test_health_warnings: prevent out osds 25732/head
Sage Weil [Mon, 31 Dec 2018 17:18:05 +0000 (11:18 -0600)]
qa/workunits/rados/test_health_warnings: prevent out osds

Fixes: http://tracker.ceph.com/issues/37776
Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd: reliably send pg_created messages to the mon 25731/head
Sage Weil [Mon, 31 Dec 2018 17:05:03 +0000 (11:05 -0600)]
osd: reliably send pg_created messages to the mon

The OSD has to reliably deliver a pg_created message to the mon in order
for the mon to clear the pool's CREATING flag.  Previously, a mon
connection reset would drop the message.

Restructure this to:

- queue a message any time a PG peers and the pool as the CREATING flag
- track pending messages in OSDService
- resend on mon connect
- prune messages for pools that no longer have the CREATING flag

This new strategy can result in resends of these messages to the mon in
cases where the mon already knows the PG was created.  However, pool
creation is rare, and these extra messages are cheap.  And we can avoid
this overhead if we like by limiting the number of PGs that the mon can
create explicitly if we choose (by lowering mon_osd_max_initial_pgs).

Fixes: http://tracker.ceph.com/issues/37775
Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25437 from Aran85/fix-objecter-reset
Kefu Chai [Mon, 31 Dec 2018 16:56:52 +0000 (00:56 +0800)]
Merge pull request #25437 from Aran85/fix-objecter-reset

objecter: avoid race when reset down osd's session

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
6 years agoMerge pull request #21138 from zouaiguo/fix_mgr_restful_osd_error
Kefu Chai [Mon, 31 Dec 2018 16:52:38 +0000 (00:52 +0800)]
Merge pull request #21138 from zouaiguo/fix_mgr_restful_osd_error

mgr/restful: fix py got exception when get osd info

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoRevert "os/objectstore: add new op OP_CREATE for create a new object." 25730/head
Kefu Chai [Mon, 31 Dec 2018 15:04:20 +0000 (23:04 +0800)]
Revert "os/objectstore: add new op OP_CREATE for create a new object."

This reverts commit 22f73ba62eb1fe337622ea2aefdcd829f8def851.

Fixes: http://tracker.ceph.com/issues/37774
Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #22385 from majianpeng/touch-omit-kvdb
Kefu Chai [Mon, 31 Dec 2018 14:35:09 +0000 (22:35 +0800)]
Merge pull request #22385 from majianpeng/touch-omit-kvdb

os/objectstore: add a new op OP_CREATE.

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25653 from rhcs-dashboard/37717-update-health-test
Kefu Chai [Mon, 31 Dec 2018 14:30:13 +0000 (22:30 +0800)]
Merge pull request #25653 from rhcs-dashboard/37717-update-health-test

mgr/dashboard: updated API test

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoosd: unlock osd_lock when tweaking osd settings 25726/head
Kefu Chai [Sun, 30 Dec 2018 13:57:04 +0000 (21:57 +0800)]
osd: unlock osd_lock when tweaking osd settings

unlock osd_lock when serving "debug kick_recovery_wq" command

we need to unlock osd_lock temporarily when updating the osd settings,
otherwise we will run into assert failure. because
OSD::handle_conf_change() acquires the osd_lock which is not a recursive
lock.

Fixes: http://tracker.ceph.com/issues/37751
Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoosd: use unlock_guard for unlock osd temporarily
Kefu Chai [Sun, 30 Dec 2018 13:46:55 +0000 (21:46 +0800)]
osd: use unlock_guard for unlock osd temporarily

when OSD::do_command() gets called, osd_lock is acquired. but when
serving some of these commands, we need to call methods which also
acquire the osd_lock by themselves. for instance,
OSD::handle_conf_change() gets called by cct->_conf.apply_changes().
to allow them to do so, we unlock osd_lock before calling those methods,
and re-lock it after done with them.

unlock_guard is introduced to unlock and re-lock the lock in a RAII style.

Signed-off-by: Kefu Chai <kchai@redhat.com>