Commit Graph

93650 Commits

Author SHA1 Message Date
Kefu Chai
d1f15e5ee8
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>
2019-01-03 14:12:02 +08:00
Kefu Chai
00865b89de
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>
2019-01-03 14:10:15 +08:00
Kefu Chai
705d29b422
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>
2019-01-03 14:09:20 +08:00
Kefu Chai
b0a83097eb 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>
2019-01-03 11:01:04 +08:00
Kefu Chai
75c2d63c31 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>
2019-01-03 10:19:02 +08:00
Sage Weil
387c81b9cf mon/PGMap: show pg state age instead of stamp
Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-02 19:56:37 -06:00
Kefu Chai
0e1cdcd949
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>
2019-01-03 09:41:46 +08:00
Greg Farnum
71a8605762 doc: warn about how 'rados put' works in the manpage
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-01-02 15:00:25 -08:00
Gregory Farnum
8e3da9b2d8
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>
2019-01-02 14:21:28 -08:00
Patrick Donnelly
c7ce967b77
mds: allow boot on read-only
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-01-02 14:17:14 -08:00
Patrick Donnelly
4cccc4dffb
mds: setup readonly mode for PurgeQueue
If the PQ faces an error, it should go read-only along with the MDS rank.

Fixes: http://tracker.ceph.com/issues/37543
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-01-02 14:17:11 -08:00
Patrick Donnelly
e540028cba
mds: return string_view for type str
This is a cheap refactor.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-01-02 14:12:22 -08:00
Patrick Donnelly
c7350ac23c
mds: add missing locks for PurgeQueue methods
These could race with the asynchronous workings of the PQ.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-01-02 14:12:22 -08:00
Patrick Donnelly
33279822ea
mds: delete on_error context on des
Otherwise it leaks.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-01-02 14:12:22 -08:00
J. Eric Ivancich
090b52ec25
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>
2019-01-02 17:00:28 -05:00
J. Eric Ivancich
f600e08605 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>
2019-01-02 15:45:19 -05:00
J. Eric Ivancich
c52636c84f 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>
2019-01-02 15:45:19 -05:00
Alfredo Deza
91bc3a1479 ceph-volume tests.util ensure ints and strings with commas can be converted to ints
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2019-01-02 14:19:00 -05:00
Alfredo Deza
818902e568 ceph-volume test verify strings with a comma can be converted to ints
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2019-01-02 14:18:59 -05:00
Alfredo Deza
aa5323fbcf ceph-volume util normalize comma with dot for str-to-int conversion
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2019-01-02 14:18:59 -05:00
Alfredo Deza
6c211d691e
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>
2019-01-02 13:23:21 -05:00
Sage Weil
9a1c487375 common/options: document some osd/rados options
Many of these are actually on the mon.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-02 11:43:15 -06:00
Sage Weil
71cb37b83a 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>
2019-01-02 11:40:45 -06:00
Kefu Chai
7fc7a7d167 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>
2019-01-03 01:40:28 +08:00
Kefu Chai
2538c2e18c
Merge pull request #25441 from theanalyst/decode-refcount-types
cls: refcount: add obj_refcount to ceph-dencoder

Reviewed-By: Casey Bodley <cbodley@redhat.com>
2019-01-03 00:45:50 +08:00
Jonas Jelten
3333304147 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>
2019-01-02 16:52:34 +01:00
Kefu Chai
253c1db393 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>
2019-01-02 22:19:50 +08:00
Venky Shankar
869b13c1a5 test: add scrub control command tests
Fixes: http://tracker.ceph.com/issues/12282
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2019-01-02 08:51:00 -05:00
Venky Shankar
b9153d14ee mds: scrub abort/pause/resume/status control commands
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2019-01-02 08:51:00 -05:00
Venky Shankar
1eb33745a8 test: switch using "scrub start" tell interface to initiate scrub
... and fixup doc too.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
2019-01-02 08:51:00 -05:00
Venky Shankar
15d8f7b419 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>
2019-01-02 08:51:00 -05:00
Venky Shankar
0f001a8e0c 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>
2019-01-02 08:51:00 -05:00
Venky Shankar
17045c4388 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>
2019-01-02 08:51:00 -05:00
Venky Shankar
9ac1c28b13 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>
2019-01-02 08:51:00 -05:00
Venky Shankar
9dfcc2287b mds: use CInode::scrub_is_in_progress() wherever required
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2019-01-02 08:51:00 -05:00
Abhishek L
5c71f5421c
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>
2019-01-02 13:56:37 +01:00
Kefu Chai
5757477dbc
Merge pull request #25731 from liewegas/wip-37775
osd: reliably send pg_created messages to the mon

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-01-02 18:41:01 +08:00
Jos Collin
47b3a47205
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>
2019-01-02 14:48:06 +05:30
Yan, Zheng
75a872734c mds: remove wrong assertion in Locker::snapflush_nudge
head inode gets unpinned when snapflush starts. It might get trimmed
before snapflush finishes.

Fixes: http://tracker.ceph.com/issues/37721
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2019-01-02 16:30:49 +08:00
Sage Weil
0ff1ef3de7 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>
2019-01-01 16:23:11 -06:00
Willem Jan Withagen
b15d2cc963 bluestore: Only use WRITE_LIFE_ when available
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2019-01-01 18:04:36 +01:00
Sage Weil
ff80e7ff5f common/blkdev: fix BlkDev::get_devid when we got a devname, not fd
Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-01 10:59:36 -06:00
Sage Weil
8e5e2ceaf4 common/blkdev: return optional error string from get_device_id
Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-01 10:59:36 -06:00
Sage Weil
841dede148 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>
2019-01-01 10:59:36 -06:00
Sage Weil
a27e596493 mon/Monitor: quorum_age in JSON output as int, not string
Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-01 10:53:09 -06:00
Kefu Chai
b02f198fd8
Merge pull request #25732 from liewegas/wip-37776
qa/workunits/rados/test_health_warnings: prevent out osds

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-01-02 00:04:39 +08:00
Kefu Chai
953abf78e7
Merge pull request #25726 from tchaikov/wip-37751
osd: unlock osd_lock when tweaking osd settings

Reviewed-by: Sage Weil <sage@redhat.com>
2019-01-01 23:49:27 +08:00
Kefu Chai
edfc199473
Merge pull request #25733 from tchaikov/wip-37719-workaround
librbd: workaround an ICE of GCC

Reviewed-by: Sage Weil <sage@redhat.com>
2019-01-01 23:44:23 +08:00
Kefu Chai
98a7674369 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>
2019-01-01 16:38:16 +08:00
Kefu Chai
17849cac84 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>
2019-01-01 16:26:08 +08:00