]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
5 years agoradosgw-admin: fix infinite loop in 'datalog list' 35001/head
Casey Bodley [Tue, 24 Mar 2020 19:01:31 +0000 (15:01 -0400)]
radosgw-admin: fix infinite loop in 'datalog list'

affects datalog shards with more than 1000 entries

Fixes: https://tracker.ceph.com/issues/44751
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 166f38fe70e6afd2831bdb87a27c8fe757899b95)

Conflicts:
src/rgw/rgw_admin.cc
- nautilus has "log->list_entries" where master has
  "datalog_svc->list_entries"

5 years agoMerge pull request #34767 from smithfarm/wip-45212-nautilus
Yuri Weinstein [Mon, 11 May 2020 14:54:51 +0000 (07:54 -0700)]
Merge pull request #34767 from smithfarm/wip-45212-nautilus

nautilus: client: reset requested_max_size if file write is not wanted

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
5 years agoMerge pull request #34679 from kotreshhr/nautilus-subvolume-info
Yuri Weinstein [Mon, 11 May 2020 14:53:39 +0000 (07:53 -0700)]
Merge pull request #34679 from kotreshhr/nautilus-subvolume-info

nautilus: mgr/volumes: Add interface to get subvolume metadata

Reviewed-by: Ramana Raja <rraja@redhat.com>
5 years agoMerge pull request #34470 from Vicente-Cheng/wip-44655-nautilus
Yuri Weinstein [Mon, 11 May 2020 14:52:55 +0000 (07:52 -0700)]
Merge pull request #34470 from Vicente-Cheng/wip-44655-nautilus

nautilus: qa: fix various py3 cephfs qa bugs x2

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
5 years agoMerge pull request #34107 from yuvalif/notification-backports-nautilus
Yuri Weinstein [Thu, 7 May 2020 15:58:05 +0000 (08:58 -0700)]
Merge pull request #34107 from yuvalif/notification-backports-nautilus

nautilus: rgw/notifications: backporting features and bug fix

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoMerge pull request #34915 from tchaikov/nautilus-mimic-x-disable-min-pg-per-osd-warning
Yuri Weinstein [Wed, 6 May 2020 22:42:12 +0000 (15:42 -0700)]
Merge pull request #34915 from tchaikov/nautilus-mimic-x-disable-min-pg-per-osd-warning

nautilus: qa/suites/upgrade: disable min pg per osd warning

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
5 years agoMerge pull request #34771 from smithfarm/wip-45210-nautilus
Ramana Raja [Wed, 6 May 2020 17:23:35 +0000 (22:53 +0530)]
Merge pull request #34771 from smithfarm/wip-45210-nautilus

nautilus: ceph-fuse: link to libfuse3 and pass "-o big_writes" to libfuse if libfuse < 3.0.0

Reviewed-by: Zheng Yan <zyan@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
5 years agoMerge pull request #34817 from tchaikov/nautilus-44668
Ramana Raja [Wed, 6 May 2020 08:40:07 +0000 (14:10 +0530)]
Merge pull request #34817 from tchaikov/nautilus-44668

nautilus: qa: use small default pg count for CephFS pools

Reviewed-by: Ramana Raja <rraja@redhat.com>
5 years agoMerge pull request #34563 from Vicente-Cheng/wip-45050-nautilus
Ramana Raja [Wed, 6 May 2020 08:38:56 +0000 (14:08 +0530)]
Merge pull request #34563 from Vicente-Cheng/wip-45050-nautilus

nautilus: mgr: force purge normal ceph entities from service map

Reviewed-by: Ramana Raja <rraja@redhat.com>
5 years agoqa/suites/upgrade: disable min pg per osd warning 34915/head
Kefu Chai [Wed, 6 May 2020 07:48:12 +0000 (15:48 +0800)]
qa/suites/upgrade: disable min pg per osd warning

disable the TOO_FEW_PGS warning, as
1ac34a5ea3d1aca299b02e574b295dd4bf6167f4 is not backported to mimic, we
will have TOO_FEW_PGS warnings when a healthy cluster is expected when
upgrading from mimic.

this change disables this warning by setting "mon_pg_warn_min_per_osd" to
"0".

this change is not cherry-picked from master. as
1ac34a5ea3d1aca299b02e574b295dd4bf6167f4 is already included by master,
and we don't perform upgrade from mimic on master branch.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoqa: fix various py3 cephfs qa bugs x2 34470/head
Patrick Donnelly [Tue, 7 Jan 2020 21:04:32 +0000 (13:04 -0800)]
qa: fix various py3 cephfs qa bugs x2

Fixes: https://tracker.ceph.com/issues/43515
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit ae28ed11d7b9b1dac7dab1e8f5dc0c9643b5de76)

5 years agoqa: fix various py3 cephfs qa bugs
Patrick Donnelly [Fri, 3 Jan 2020 04:41:57 +0000 (20:41 -0800)]
qa: fix various py3 cephfs qa bugs

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 6ea2730ea669b6cf7ac668f606f63628ef8918b7)

Conflicts:
qa/tasks/cephfs/test_pool_perm.py
  - manually modify the py3 compatibility related fix

5 years agoMerge pull request #34833 from smithfarm/wip-44653-nautilus
Yuri Weinstein [Tue, 5 May 2020 15:27:42 +0000 (08:27 -0700)]
Merge pull request #34833 from smithfarm/wip-44653-nautilus

nautilus: rgw: increase log level for same or older period pull msg

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoMerge pull request #34413 from votdev/wip-42151-nautilus
Lenz Grimmer [Tue, 5 May 2020 08:42:31 +0000 (10:42 +0200)]
Merge pull request #34413 from votdev/wip-42151-nautilus

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
5 years agoMerge pull request #34862 from tchaikov/nautilus-el-7.8
Yuri Weinstein [Mon, 4 May 2020 20:45:12 +0000 (13:45 -0700)]
Merge pull request #34862 from tchaikov/nautilus-el-7.8

nautilus: qa/distros: point {centos,rhel}_latest.yaml to 7.8

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
Reviewed-by: David Galloway <dgallowa@redhat.com>
5 years agoMerge pull request #34832 from smithfarm/wip-45330-nautilus
Yuri Weinstein [Mon, 4 May 2020 20:43:35 +0000 (13:43 -0700)]
Merge pull request #34832 from smithfarm/wip-45330-nautilus

nautilus: bluestore/bdev: initialize size when creating object

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
5 years agoMerge pull request #34796 from smithfarm/wip-45045-nautilus
Yuri Weinstein [Mon, 4 May 2020 20:42:55 +0000 (13:42 -0700)]
Merge pull request #34796 from smithfarm/wip-45045-nautilus

nautilus: os/bluestore: Don't pollute old journal when add new device

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
5 years agoMerge pull request #34677 from Vicente-Cheng/wip-44468-nautilus
Yuri Weinstein [Mon, 4 May 2020 20:42:06 +0000 (13:42 -0700)]
Merge pull request #34677 from Vicente-Cheng/wip-44468-nautilus

nautilus: mon: Get session_map_lock before remove_session

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
5 years agoMerge pull request #34611 from ifed01/wip-ifed-beter-bluefs-expand-nautilus
Yuri Weinstein [Mon, 4 May 2020 20:37:38 +0000 (13:37 -0700)]
Merge pull request #34611 from ifed01/wip-ifed-beter-bluefs-expand-nautilus

nautilus: os/bluestore: open DB in read-only when expanding DB/WAL

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
5 years agoMerge pull request #34774 from ajarr/nautilus-fix-45229-45225
Nathan Cutler [Mon, 4 May 2020 17:00:32 +0000 (19:00 +0200)]
Merge pull request #34774 from ajarr/nautilus-fix-45229-45225

nautilus: mon/FSCommands: Fix 'add_data_pool' command and 'fs new' command

Reviewed-by: Nathan Cutler <ncutler@suse.com>
5 years agoMerge pull request #34579 from tchaikov/nautilus-mimic-x
Yuri Weinstein [Fri, 1 May 2020 16:57:47 +0000 (09:57 -0700)]
Merge pull request #34579 from tchaikov/nautilus-mimic-x

nautilus: qa/tasks/ceph_manager: do not cancel pending pg num changes on mimic

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
5 years agoqa/distros: point {centos,rhel}_latest.yaml to 7.8 34862/head
Kefu Chai [Thu, 30 Apr 2020 14:42:46 +0000 (22:42 +0800)]
qa/distros: point {centos,rhel}_latest.yaml to 7.8

this change is not cherry-picked from master, as master is using el8
already

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoqa/tasks: do not cancel pending pg num changes on mimic 34579/head
Kefu Chai [Thu, 16 Apr 2020 03:33:18 +0000 (11:33 +0800)]
qa/tasks: do not cancel pending pg num changes on mimic

mimic does not support auto split/merge, but we do test mimic-x on
nautilus, which ends up with failures like:

ceback (most recent call last):
  File "/home/teuthworker/src/git.ceph.com_git_teuthology_py2/teuthology/contextutil.py", line 34, in nested
    yield vars
  File "/home/teuthworker/src/git.ceph.com_ceph_nautilus/qa/tasks/ceph.py", line 1928, in task
    ctx.managers[config['cluster']].stop_pg_num_changes()
  File "/home/teuthworker/src/git.ceph.com_ceph_nautilus/qa/tasks/ceph_manager.py", line 1806, in stop_pg_num_changes
    if pool['pg_num'] != pool['pg_num_target']:
KeyError: 'pg_num_target'

so we need to skip this if 'pg_num_target' is not in pg_pool_t::dump().

this change is not cherry-picked from master, as we don't test
mimic-x on master.

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agorgw: increase log level for same or older period pull msg 34833/head
Ali Maredia [Tue, 25 Feb 2020 05:29:30 +0000 (00:29 -0500)]
rgw: increase log level for same or older period pull msg

Signed-off-by: Ali Maredia <amaredia@redhat.com>
(cherry picked from commit 90cce10fc1364df16ab12632b2dca403894cbe44)

5 years agobluestore/bdev: initialize size when creating object. 34832/head
Willem Jan Withagen [Wed, 28 Aug 2019 15:19:22 +0000 (17:19 +0200)]
bluestore/bdev: initialize size when creating object.

The other partss of the struct are initialized by their
ctors. Only for unint_64 there is no ctor.

Otherwise ceph-dencoder tests will fail in comparing
the exported output.
[~/master36] wjw@cephdev.digiware.nl> build/bin/ceph-dencoder type bluestore_bdev_label_t select_test 1 encode export /tmp/typ-yFISvjvgj
[~/master36] wjw@cephdev.digiware.nl> hexdump -C !$
hexdump -C /tmp/typ-yFISvjvgj
00000000  62 6c 75 65 73 74 6f 72  65 20 62 6c 6f 63 6b 20 |bluestore block |
00000010  64 65 76 69 63 65 0a 30  30 30 30 30 30 30 30 2d |device.00000000-|
00000020  30 30 30 30 2d 30 30 30  30 2d 30 30 30 30 2d 30 |0000-0000-0000-0|
00000030  30 30 30 30 30 30 30 30  30 30 30 0a 02 01 28 00 |00000000000...(.|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
00000050  00 00 70 74 03 04 00 00  00 00 00 00 00 00 00 00 |..pt............|
00000060  00 00 00 00 00 00 00 00  00 00 |..........|
0000006a

[~/master36] wjw@cephdev.digiware.nl> build/bin/ceph-dencoder type bluestore_bdev_label_t select_test 1 encode decode encode export /tmp/typ-MjWXdCpzJ
[~/master36] wjw@cephdev.digiware.nl> hexdump -C !$
hexdump -C /tmp/typ-MjWXdCpzJ
00000000  62 6c 75 65 73 74 6f 72  65 20 62 6c 6f 63 6b 20 |bluestore block |
00000010  64 65 76 69 63 65 0a 30  30 30 30 30 30 30 30 2d |device.00000000-|
00000020  30 30 30 30 2d 30 30 30  30 2d 30 30 30 30 2d 30 |0000-0000-0000-0|
00000030  30 30 30 30 30 30 30 30  30 30 30 0a 02 01 28 00 |00000000000...(.|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
00000050  00 00 73 64 00 00 00 00  00 00 00 00 00 00 00 00 |..sd............|
00000060  00 00 00 00 00 00 00 00  00 00 |..........|
0000006a

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
(cherry picked from commit d411ee26fb2f6cbe610f8bbc81b777cf28d839c2)

5 years agoqa: use small default pg count for CephFS pools 34817/head
Patrick Donnelly [Wed, 9 Oct 2019 17:41:35 +0000 (10:41 -0700)]
qa: use small default pg count for CephFS pools

The pg count needs to be a power-of-two since
dff5697464edb9931d5dfa08cd4a30f85c1f237e.

Also, mon_pg_warn_min_per_osd is disabled by default now (or set to a
low value in vstart/testing) so there's no need to base the pg count on
this value.

Ideally someday we can remove this so that the default cluster value is
used but we need to keep this for deployments of older versions of Ceph.

Fixes: https://tracker.ceph.com/issues/42228
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit fc88e6c6c55402120a432ea47f05f321ba4c9bb1)

Conflicts:
qa/tasks/cephfs/filesystem.py: this commit was orignally
backported by #34055, but it failed to cherry-pick all necessary
bits. in this change, the missing bit is picked up.

5 years agoMerge pull request #34518 from tchaikov/nautilus-27422
Kefu Chai [Wed, 29 Apr 2020 02:16:07 +0000 (10:16 +0800)]
Merge pull request #34518 from tchaikov/nautilus-27422

nautilus: doc: fix parameter to set pg autoscale mode

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agodoc: fix parameter to set pg autoscale mode 34518/head
Changcheng Liu [Mon, 8 Apr 2019 02:40:47 +0000 (10:40 +0800)]
doc: fix parameter to set pg autoscale mode

osd_pool_default_pg_autoscale_mode is the right parameter to
set placement-group autoscale mode.

Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
(cherry picked from commit c0df98fc7e78bbd366333d810f78ddbeed0e6729)

5 years agoMerge pull request #34736 from smithfarm/wip-44648-nautilus
Yuri Weinstein [Tue, 28 Apr 2020 18:39:31 +0000 (11:39 -0700)]
Merge pull request #34736 from smithfarm/wip-44648-nautilus

nautilus: qa/workunits/rbd: wait for nbd map to close after unmap

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
5 years agoos/bluestore: Don't pollute old journal when add new device 34796/head
Yang Honggang [Thu, 26 Mar 2020 17:11:55 +0000 (17:11 +0000)]
os/bluestore: Don't pollute old journal when add new device

Fixes: https://tracker.ceph.com/issues/44774
Signed-off-by: Yang Honggang <yanghonggang@kuaishou.com>
(cherry picked from commit ade4d46981e660c8d57cec64180b5afa4561b945)

5 years agoMerge pull request #34735 from smithfarm/wip-45260-nautilus
Yuri Weinstein [Tue, 28 Apr 2020 16:09:14 +0000 (09:09 -0700)]
Merge pull request #34735 from smithfarm/wip-45260-nautilus

nautilus: rgw: reshard: skip stale bucket id entries from reshard queue

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoMerge pull request #34628 from shyukri/wip-45070-nautilus
Yuri Weinstein [Mon, 27 Apr 2020 21:33:10 +0000 (14:33 -0700)]
Merge pull request #34628 from shyukri/wip-45070-nautilus

nautilus: mgr/telegraf: catch FileNotFoundError exception

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34512 from Vicente-Cheng/wip-44324-nautilus
Yuri Weinstein [Mon, 27 Apr 2020 21:32:26 +0000 (14:32 -0700)]
Merge pull request #34512 from Vicente-Cheng/wip-44324-nautilus

nautilus: osd/PeeringState.h: ignore RemoteBackfillReserved in WaitLocalBackfillReserved

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: David Zafman <dzafman@redhat.com>
5 years agoMerge pull request #34500 from Vicente-Cheng/wip-44289-nautilus
Yuri Weinstein [Mon, 27 Apr 2020 21:30:46 +0000 (14:30 -0700)]
Merge pull request #34500 from Vicente-Cheng/wip-44289-nautilus

nautilus: mon: stash newer map on bootstrap when addr doesn't match

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge pull request #34419 from votdev/wip-44954-nautilus
Yuri Weinstein [Mon, 27 Apr 2020 21:29:34 +0000 (14:29 -0700)]
Merge pull request #34419 from votdev/wip-44954-nautilus

nautilus: monitoring: root volume full alert fires false positives

Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
5 years agomon/FSCommands: Fix 'fs new' command 34774/head
Ramana Raja [Tue, 14 Apr 2020 11:13:33 +0000 (16:43 +0530)]
mon/FSCommands: Fix 'fs new' command

After creating a filesystem using the 'fs new' command, the value
of the 'data' and 'metadata' key of the datapool and metadatapool's
application tag 'cephfs' should be the filesystem's name. This
didn't happen when the data or metadata pool's application metadata
'cephfs' was enabled before the pool was used in the 'fs new' command.
Fix this during the handling of the 'fs new' command by setting the
value of the key of the pool's application metadata 'cephfs' to the
filesystem's name even when the application metadata 'cephfs' is
already enabled or set.

Fixes: https://tracker.ceph.com/issues/43761
Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit 2f45558eb84782e334d997e2c545fd99ab455783)

5 years agomon/FSCommands: Fix 'add_data_pool' command
Ramana Raja [Sat, 11 Apr 2020 07:15:39 +0000 (12:45 +0530)]
mon/FSCommands: Fix 'add_data_pool' command

After making a RADOS pool a filesystem's data pool using the
'add_data_pool' command, the value of the 'data' key of the pool's
application metadata 'cephfs' should be the filesystem's name. This
didn't happen when the pool's application metadata 'cephfs' was
enabled before the pool was made the data pool. Fix this during the
handling of the 'add_data_pool' command by setting the value of
the 'data' key of the pool's application metadata 'cephfs' to the
filesystem's name even when the application metadata 'cephfs' is
already enabled or set.

Fixes: https://tracker.ceph.com/issues/43061
Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit 3c49092322720b7f1d612f45e73fb26820ff7885)

5 years agocmake: detect fuse3 as well 34771/head
Kefu Chai [Fri, 17 Apr 2020 06:31:15 +0000 (14:31 +0800)]
cmake: detect fuse3 as well

Fixes: https://tracker.ceph.com/issues/44891
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit c9b38a5210954f9fd3d46bc9560f455444f77f50)

5 years agocmake: check for FUSE version
Kefu Chai [Fri, 17 Apr 2020 05:50:16 +0000 (13:50 +0800)]
cmake: check for FUSE version

and refactor FindFUSE.cmake a little bit to conditionalize OSX support

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 220fa91d80175daa045022d9df50a1e44e5aebe9)

5 years agocmake: link against FUSE::FUSE
Kefu Chai [Fri, 17 Apr 2020 05:46:21 +0000 (13:46 +0800)]
cmake: link against FUSE::FUSE

instead of specifying the include directory and linkage separately

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit b823952d245db4967828033003729a643d8e276f)

Conflicts:
src/CMakeLists.txt
- ceph-fuse target_link_libraries call lacks ${EXTRALIBS} parameter in
  nautilus

5 years agocmake: rename Findfuse.cmake to FindFUSE.cmake
Kefu Chai [Fri, 17 Apr 2020 05:02:22 +0000 (13:02 +0800)]
cmake: rename Findfuse.cmake to FindFUSE.cmake

so its name is consistent with upstream name, and with the variables
exposed by FindFUSE.cmake.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 2b3adb5c5ee518cf4f03d1f96256f411aec1def2)

5 years agoceph-fuse: link to libfuse3 if fuse3 is installed
Xiubo Li [Wed, 15 Apr 2020 06:21:44 +0000 (02:21 -0400)]
ceph-fuse: link to libfuse3 if fuse3 is installed

Fixes: https://tracker.ceph.com/issues/44891
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit cb0a600acfca76c5b4653e4c6f34c1712a2da9de)

Conflicts:
src/client/fuse_ll.cc
- nautilus CephFuse::Handle::Handle initializer list has stag_lock

5 years agorbd-fuse: remove FUSE_CAP_BIG_WRITES when linking to libfuse3
Xiubo Li [Fri, 17 Apr 2020 09:46:24 +0000 (05:46 -0400)]
rbd-fuse: remove FUSE_CAP_BIG_WRITES when linking to libfuse3

The big-writes is enabled as default from 3.0.

Fixes: https://tracker.ceph.com/issues/44891
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 32a45b624b5142582f1ef58f87b7442d273b0ce7)

5 years agorbd-fuse: switch to use utimens instead
Xiubo Li [Fri, 17 Apr 2020 09:33:55 +0000 (05:33 -0400)]
rbd-fuse: switch to use utimens instead

The utime is deprecated.

Fixes: https://tracker.ceph.com/issues/44891
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit d5999a9ac44cba09f8b9733260262bce49e659bd)

5 years agoceph-fuse: enable the big writes as default
Xiubo Li [Thu, 16 Apr 2020 10:13:17 +0000 (06:13 -0400)]
ceph-fuse: enable the big writes as default

When the libfuse version < 3, without the big_writes options enabled
the write perf is very poor.

Fixes: https://tracker.ceph.com/issues/44885
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 1c3dd60f217129f6ed718ca40098994a12259262)

5 years agoceph-fuse: don't get mount options from /etc/fstab when doing remount
Yan, Zheng [Tue, 31 Mar 2020 03:29:47 +0000 (11:29 +0800)]
ceph-fuse: don't get mount options from /etc/fstab when doing remount

If there happen to be an kcephfs entry in /etc/fstab for ceph-fuse's
mount point. 'mount -o remount' may get options from that entry. fuse
may not understand some options (E.g name option).

Fixes: https://tracker.ceph.com/issues/44771
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 7aa22fac602b6e1c31943e2de69a2f8e3a3002d0)

5 years agoclient: reset requested_max_size if file write is not wanted 34767/head
Yan, Zheng [Fri, 20 Mar 2020 05:15:45 +0000 (13:15 +0800)]
client: reset requested_max_size if file write is not wanted

write can stuck at waiting for larger max_size in following sequence of
events:

- client opens a file and writes to position 'A' (larger than unit of
  max size increment)
- client closes the file handle and updates wanted caps (not wanting
  file write caps)
- client opens and truncates the file, writes to position 'A' again.

At the 1st event, client set inode's requested_max_size to 'A'. At the
2nd event, mds removes client's writable range, but client does not reset
requested_max_size. At the 3rd event, client does not request max size
because requested_max_size is already larger than 'A'.

Fixes: https://tracker.ceph.com/issues/44801
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 1d676851e3491c26d3bf543bf357731d11d82a85)

5 years agoMerge pull request #34662 from votdev/wip-45157-nautilus
Kefu Chai [Mon, 27 Apr 2020 07:00:16 +0000 (15:00 +0800)]
Merge pull request #34662 from votdev/wip-45157-nautilus

nautilus: mgr/dashboard: Refactor Python unittests and controller

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
5 years agorgw/pubsub: send notifications from multi-delete op 34107/head
Yuval Lifshitz [Tue, 10 Dec 2019 18:22:43 +0000 (20:22 +0200)]
rgw/pubsub: send notifications from multi-delete op

Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
(cherry picked from commit 754f7edbb8156727de45c17c03826c9a0df6dbb8)
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
5 years agorgw/notification: add opaque data
Yuval Lifshitz [Mon, 13 Jan 2020 10:48:24 +0000 (12:48 +0200)]
rgw/notification: add opaque data

opaque data may be set in topic configuration and later on sent inside
nottifications triggered by that topic.

Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
(cherry picked from commit 07630a8759b0836f56d4ee6938e2b711ffb4e169)
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
Conflicts:
src/test/rgw/rgw_multi/tests_ps.py

5 years agorgw/pubsub: notification filtering by object tags
Yuval Lifshitz [Sun, 24 Nov 2019 13:33:00 +0000 (15:33 +0200)]
rgw/pubsub: notification filtering by object tags

Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
(cherry picked from commit d19474f3d7b4e0a16cc2ef55f2bb4e3fd027545c)
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
Conflicts:
doc/radosgw/notifications.rst
examples/boto3/README.md
examples/boto3/notification_filters.py
examples/boto3/service-2.sdk-extras.json
src/common/ceph_json.h
src/rgw/rgw_common.cc
src/rgw/rgw_common.h
src/rgw/rgw_op.cc
src/rgw/rgw_pubsub.h
src/test/rgw/rgw_multi/tests_ps.py

5 years agoMerge pull request #34627 from shyukri/wip-45043-nautilus
Yuri Weinstein [Fri, 24 Apr 2020 18:56:11 +0000 (11:56 -0700)]
Merge pull request #34627 from shyukri/wip-45043-nautilus

nautilus: mgr/PyModule: fix missing tracebacks in handle_pyerror()

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge pull request #34542 from smithfarm/wip-44486-nautilus
Nathan Cutler [Fri, 24 Apr 2020 18:31:05 +0000 (20:31 +0200)]
Merge pull request #34542 from smithfarm/wip-44486-nautilus

nautilus: common/ceph_time: tolerate mono time going backwards

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34539 from smithfarm/wip-45073-nautilus
Yuri Weinstein [Fri, 24 Apr 2020 13:28:42 +0000 (06:28 -0700)]
Merge pull request #34539 from smithfarm/wip-45073-nautilus

nautilus: build/ops: address SElinux denials observed in rgw/multisite test run

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34527 from smithfarm/wip-45035-nautilus
Yuri Weinstein [Fri, 24 Apr 2020 13:27:28 +0000 (06:27 -0700)]
Merge pull request #34527 from smithfarm/wip-45035-nautilus

nautilus: spec: address some warnings raised by RPM 4.15.1

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #34256 from smithfarm/wip-44793-nautilus
Yuri Weinstein [Fri, 24 Apr 2020 13:26:47 +0000 (06:26 -0700)]
Merge pull request #34256 from smithfarm/wip-44793-nautilus

nautilus: tests: qa/tasks/ceph.py: fail if any osd role doesn't get a device

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoqa/workunits/rbd: wait for nbd map to close after unmap 34736/head
Jason Dillaman [Wed, 11 Mar 2020 19:11:10 +0000 (15:11 -0400)]
qa/workunits/rbd: wait for nbd map to close after unmap

The unmap action only sends a signal to the kernel to notify the
rbd-nbd daemon to disconnect. Therefore, it's possible that an
unmap followed by an immediate re-map to the same device might
fail since the unmap is still in-progress.

Fixes: https://tracker.ceph.com/issues/44567
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 80a3f18cafb4add1624cc690bba436a1284dc634)

5 years agorgw: reshard: skip stale bucket id entries from reshard queue 34735/head
Abhishek Lekshmanan [Fri, 17 Apr 2020 15:11:01 +0000 (17:11 +0200)]
rgw: reshard: skip stale bucket id entries from reshard queue

If we encounter a reshard queue entry that has an older ID compared to the
bucket's current ID, it'd mean that some other process or a manual reshard has
already processed this entry, skip processing the entry this time. An
alternative is to verify the num_shards that we have in queue >= the current
shards, but this would mean that we may reshard a recently manual resharded
bucket again which might not be intended

Fixes: https://tracker.ceph.com/issues/45134
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 02664fc091674e28233559cd1c42f954d5776d86)

Conflicts:
src/rgw/rgw_reshard.cc
- immediately preceding "get_bucket_info" call looks different in
  nautilus

5 years agonautilus: mgr/volumes: Add interface to get subvolume metadata 34679/head
Kotresh HR [Thu, 26 Mar 2020 05:00:39 +0000 (10:30 +0530)]
nautilus: mgr/volumes: Add interface to get subvolume metadata

The following interface is added

"ceph fs subvolume info <vol_name> <sub_name> [<group_name>]"

The output is in json format with following fields

1. atime: access time of subvolume path in the format "YYYY-MM-DD HH:MM:SS"
2. mtime: modification time of subvolume path in the format "YYYY-MM-DD HH:MM:SS"
3. ctime: change time of subvolume path in the format "YYYY-MM-DD HH:MM:SS"
4. uid: uid of subvolume path
5. gid: gid of subvolume path
6. mode: mode of subvolume path
7. mon_addrs: list of monitor addresses
8. bytes_pcent: quota used in percentage if quota is set, else displays "undefined"
9. bytes_quota: quota size in bytes if quota is set, else displays "infinite"
10. bytes_used: current used size of the subvolume in bytes
11. created_at: time of creation of subvolume in the format "YYYY-MM-DD HH:MM:SS"
12. data_pool: data pool the subvolume belongs to
13. path: absolute path of a subvolume
14. type: subvolume type indicating whether it's clone or subvolume

Fixes: https://tracker.ceph.com/issues/44277
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 70659ffee19c1ef23314994aa3ecb5fe8027d224)

Conflicts:
   src/pybind/mgr/volumes/fs/volume.py [ context: commit a44de38
      ("mgr_util: add CephfsClient implementation") not in nautilus ]

5 years agoMerge pull request #34551 from tspmelo/wip-45085-nautilus
Lenz Grimmer [Thu, 23 Apr 2020 11:45:17 +0000 (13:45 +0200)]
Merge pull request #34551 from tspmelo/wip-45085-nautilus

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
5 years agoMerge pull request #34550 from tspmelo/wip-45082-nautilus
Lenz Grimmer [Thu, 23 Apr 2020 08:28:35 +0000 (10:28 +0200)]
Merge pull request #34550 from tspmelo/wip-45082-nautilus

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
5 years agoMerge pull request #34497 from votdev/wip-45019-nautilus
Lenz Grimmer [Thu, 23 Apr 2020 08:27:48 +0000 (10:27 +0200)]
Merge pull request #34497 from votdev/wip-45019-nautilus

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
5 years agoMerge pull request #34399 from votdev/wip-44920-nautilus
Lenz Grimmer [Wed, 22 Apr 2020 15:03:02 +0000 (17:03 +0200)]
Merge pull request #34399 from votdev/wip-44920-nautilus

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Sebastian Krah <skrah@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
5 years agomon: Get session_map_lock before remove_session 34677/head
Xiaofei Cui [Tue, 3 Mar 2020 07:58:02 +0000 (15:58 +0800)]
mon: Get session_map_lock before remove_session

Get session_map_lock to prevent race.

Fixes: https://tracker.ceph.com/issues/44407
Signed-off-by: Xiaofei Cui <cuixiaofei@sangfor.com.cn>
(cherry picked from commit c916b8a8156f9855fb74c62508b54308ec5e7b32)

5 years agoMerge pull request #34597 from smithfarm/wip-43134-nautilus
Yuri Weinstein [Tue, 21 Apr 2020 23:44:01 +0000 (16:44 -0700)]
Merge pull request #34597 from smithfarm/wip-43134-nautilus

nautilus: rgw: find oldest period and update RGWMetadataLogHistory()

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoMerge pull request #34585 from smithfarm/wip-45040-nautilus
Yuri Weinstein [Tue, 21 Apr 2020 23:09:42 +0000 (16:09 -0700)]
Merge pull request #34585 from smithfarm/wip-45040-nautilus

nautilus: mon: calculate min_size on osd pool set size

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge pull request #34489 from rhcs-dashboard/nautilus-fix-coverage-path
Yuri Weinstein [Tue, 21 Apr 2020 23:09:18 +0000 (16:09 -0700)]
Merge pull request #34489 from rhcs-dashboard/nautilus-fix-coverage-path

nautilus: mgr/dashboard: fix COVERAGE_PATH in run-backend-api-tests.sh

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
5 years agoMerge pull request #34394 from votdev/wip-44917-nautilus
Yuri Weinstein [Tue, 21 Apr 2020 23:07:13 +0000 (16:07 -0700)]
Merge pull request #34394 from votdev/wip-44917-nautilus

nautilus: monitoring: alert for prediction of disk and pool fill up broken

Reviewed-by: Patrick Seidensal <pnawracay@suse.com>
5 years agoMerge pull request #34392 from tchaikov/nautilus-cbt
Yuri Weinstein [Tue, 21 Apr 2020 20:52:20 +0000 (13:52 -0700)]
Merge pull request #34392 from tchaikov/nautilus-cbt

nautilus: qa/suites: use "nautilus" branch for cbt based testing

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
5 years agoMerge pull request #34609 from smithfarm/wip-44267-nautilus
Yuri Weinstein [Tue, 21 Apr 2020 18:30:05 +0000 (11:30 -0700)]
Merge pull request #34609 from smithfarm/wip-44267-nautilus

nautilus: rgw: fix bug with (un)ordered bucket listing and marker w/ namespace

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoMerge pull request #34599 from smithfarm/wip-44232-nautilus
Yuri Weinstein [Tue, 21 Apr 2020 18:29:40 +0000 (11:29 -0700)]
Merge pull request #34599 from smithfarm/wip-44232-nautilus

nautilus: rgw: ReplaceKeyPrefixWith and ReplaceKeyWith can not set at the same …

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoMerge pull request #34598 from smithfarm/wip-44136-nautilus
Yuri Weinstein [Tue, 21 Apr 2020 18:29:00 +0000 (11:29 -0700)]
Merge pull request #34598 from smithfarm/wip-44136-nautilus

nautilus: rgw: set bucket attr twice when delete lifecycle config.

Reviewed-by: Casey Bodley <cbodley@redhat.com>
5 years agoqa: whitelist cluster warning message for removed MDS 34563/head
Venky Shankar [Tue, 31 Mar 2020 04:21:37 +0000 (00:21 -0400)]
qa: whitelist cluster warning message for removed MDS

Fixes: http://tracker.ceph.com/issues/44677
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 3c531197a6070917206a4fbe31d7291019ca57b1)

5 years agomgr: force purge normal ceph entities from service map
Venky Shankar [Fri, 27 Mar 2020 04:00:08 +0000 (00:00 -0400)]
mgr: force purge normal ceph entities from service map

Normal ceph services can send task status updates to manager.
Task status is tracked in service map implying that normal
ceph services have entries in service map and daemon tracking
index (daemon state). But the manager prunes entries from daemon
state when it receives an updated map (fs, mon, etc...). This
causes periodic pruning of service map entries to fail for normal
ceph services (those which send task status updates) since it
expects a corresponding entry in daemon state.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit bccbf1fa03ed2fb02ad2e50e6aaf963b36d8bd30)

5 years agoMerge pull request #34278 from jan--f/wip-44688-nautilus
Jan Fajerski [Tue, 21 Apr 2020 13:50:12 +0000 (15:50 +0200)]
Merge pull request #34278 from jan--f/wip-44688-nautilus

nautilus: ceph-volume: prepare: use *-slots arguments for implicit sizing

5 years agoMerge pull request #34478 from jan--f/wip-44998-nautilus
Jan Fajerski [Tue, 21 Apr 2020 13:49:29 +0000 (15:49 +0200)]
Merge pull request #34478 from jan--f/wip-44998-nautilus

nautilus: ceph-volume/batch: return success when all devices are filtered

5 years agoMerge pull request #34481 from jan--f/wip-45002-nautilus
Jan Fajerski [Tue, 21 Apr 2020 11:30:06 +0000 (13:30 +0200)]
Merge pull request #34481 from jan--f/wip-45002-nautilus

nautilus: ceph-volume/batch: check lvs list before access

5 years agoMerge pull request #34445 from jan--f/wip-44974-nautilus
Jan Fajerski [Tue, 21 Apr 2020 11:29:47 +0000 (13:29 +0200)]
Merge pull request #34445 from jan--f/wip-44974-nautilus

nautilus: devices/simple/scan: Fix string in log statement

5 years agoMerge pull request #33616 from jan--f/wip-44325-nautilus
Jan Fajerski [Tue, 21 Apr 2020 11:22:17 +0000 (13:22 +0200)]
Merge pull request #33616 from jan--f/wip-44325-nautilus

nautilus: ceph-volume: lvm: get_device_vgs() filter by provided prefix

5 years agoceph-volume: pass *-slots arguments to LV creation 34278/head
Jan Fajerski [Mon, 2 Mar 2020 14:16:39 +0000 (15:16 +0100)]
ceph-volume: pass *-slots arguments to LV creation

Fixes: https://tracker.ceph.com/issues/44494
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 61f0c3af0b0f36a03748733b16de1b11048342e6)

5 years agouse extent count for slots conversion instead of free count
Jan Fajerski [Wed, 4 Mar 2020 12:28:46 +0000 (13:28 +0100)]
use extent count for slots conversion instead of free count

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 4a81b4a2fbb4cafe45a8fe8cceeece636e51adb6)

5 years agoceph-volume: available_lvm: vg space takes precedence
Jan Fajerski [Wed, 4 Mar 2020 10:39:40 +0000 (11:39 +0100)]
ceph-volume: available_lvm: vg space takes precedence

This changes available_lvm to check for generic reasons only if no VGs
were found. A VG can contain a (mounted) lv, which triggers the
ro/locked test, despite the VG having space available.

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit c6d71eb0022935731bb9380098c975d9c5f27a86)

5 years agomgr/dashboard: Refactor Python unittests 34662/head
Volker Theile [Wed, 6 Nov 2019 14:02:49 +0000 (15:02 +0100)]
mgr/dashboard: Refactor Python unittests

* Make use of the KVStoreMockMixin class to get rid off duplicate code.
* Fake the index.html file to be able to run tests/test_home.py locally without building the frontend in production mode.
* Encapsulate helper functions in controllers/home.py, otherwise tests/test_feature_toggles.py need to fake the filesystem because load_controllers() will load the home.py controller and fail due missing files in the filesystem.

Signed-off-by: Volker Theile <vtheile@suse.com>
(cherry picked from commit e542255b04457df269587bc5639b14a935a125d3)

# Conflicts:
src/pybind/mgr/dashboard/requirements.txt
src/pybind/mgr/dashboard/tests/test_home.py
src/pybind/mgr/dashboard/tests/test_rgw_client.py

5 years agoceph-volume: don't create Volume/VolumeGroup objects with empty name 33616/head
Jan Fajerski [Tue, 25 Feb 2020 15:18:57 +0000 (16:18 +0100)]
ceph-volume: don't create Volume/VolumeGroup objects with empty name

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 235b19eb66b9ba9beab99508f2fdf7b6afe26f31)

5 years agoceph-volume: get_device_lvs filter by provided prefix
Jan Fajerski [Tue, 25 Feb 2020 15:18:24 +0000 (16:18 +0100)]
ceph-volume: get_device_lvs filter by provided prefix

Fixes: https://tracker.ceph.com/issues/44124
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit ac43d37f581510d1854e76afb634a142ad9a0fc0)

5 years agoceph-volume: lvm.get_device_vgs: don't create VolumeGroup with empty name
Jan Fajerski [Tue, 25 Feb 2020 15:27:08 +0000 (16:27 +0100)]
ceph-volume: lvm.get_device_vgs: don't create VolumeGroup with empty name

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 3c4c8c5e4a242985389c8d1c85b45cac89b2dc89)

5 years agoceph-volume: lvm: get_device_vgs() filter by provided prefix
Yehuda Sadeh [Sat, 22 Feb 2020 01:44:11 +0000 (17:44 -0800)]
ceph-volume: lvm: get_device_vgs() filter by provided prefix

Fixes: https://tracker.ceph.com/issues/44246
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit b48caf4873c11690d36a88760504f98b46101995)

5 years agoMerge pull request #34282 from votdev/issue_44809_select_tab
Yuri Weinstein [Mon, 20 Apr 2020 13:48:36 +0000 (06:48 -0700)]
Merge pull request #34282 from votdev/issue_44809_select_tab

nautilus: mgr/dashboard: Tabs does not handle click events

Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
5 years agoMerge pull request #34424 from smithfarm/wip-44838-nautilus
Yuri Weinstein [Mon, 20 Apr 2020 13:25:22 +0000 (06:25 -0700)]
Merge pull request #34424 from smithfarm/wip-44838-nautilus

nautilus: pybind/rbd: ensure image is open before permitting operations

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
5 years agomgr/dashboard: Fix iSCSI's username and password validation 34550/head
Tiago Melo [Mon, 16 Mar 2020 21:23:47 +0000 (20:23 -0100)]
mgr/dashboard: Fix iSCSI's username and password validation

When using regex, instead of strings, angular doesn't assume the pattern must
validate the entire string.

Add validation to the backend.

Fixes: https://tracker.ceph.com/issues/44624
Signed-off-by: Tiago Melo <tmelo@suse.com>
(cherry picked from commit 532b271572f7b6410c099362dc046148f5a686a1)

5 years agoMerge pull request #34618 from neha-ojha/wip-45135-nautilus
Yuri Weinstein [Sat, 18 Apr 2020 16:35:30 +0000 (09:35 -0700)]
Merge pull request #34618 from neha-ojha/wip-45135-nautilus

nautilus: mon: disable min pg per osd warning

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
5 years agomgr/telegraf: catch FileNotFoundError exception 34628/head
Kefu Chai [Wed, 8 Apr 2020 12:21:25 +0000 (20:21 +0800)]
mgr/telegraf: catch FileNotFoundError exception

in tasks/module_selftest.yaml, `TestModuleSelftest.test_telegraf()` is
called. but we fail to prepare a unix domain socket to which the telegraf
module can send stats. and telegraf module does not catch
FileNotFoundError exception, so the exception is populated to ceph-mgr
and is found by the test, hence the test is marked a failure whenever
telegraf is tested.

in this change,

* catch this exception, so it won't be caught by ceph-mgr
* whitelist the error message, so the test can pass

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit f6d028dfa0c24d43c33670f1bb4547a6310963ea)

5 years agomgr/PyModule: fix missing tracebacks in handle_pyerror() 34627/head
Tim Serong [Thu, 2 Apr 2020 05:46:57 +0000 (16:46 +1100)]
mgr/PyModule: fix missing tracebacks in handle_pyerror()

In certain cases, errors raised in mgr modules don't actually result in a
proper traceback in the mgr log; all you see is a message like "'Hello'
object has no a ttribute 'dneasdfasdf'", but you have no idea where that
came from, which is a complete PITA to debug.

Here's what's going on: handle_pyerror() calls PyErr_Fetch() to get
information about the error that occurred, then passes that information
back to python's traceback.format_exception() function to get the traceback.
If we write code in an mgr module that explicitly raises an exception
(e.g.: 'raise RuntimeError("that didn't work")'), the error value returned
by PyErr_Fetch() is of type RuntimeError, and traceback.format_exception()
does the right thing.  If however we accidentally write code that's just
broken (e.g.: 'self.dneasdfasdf += 1'), the error value returned is not
an actual exception, it's just a string.  So traceback.format_exception()
freaks out with something like "'str' object has no attribute '__cause__'"
(which we don't actually ever see in the logs), which in turn dumps us in a
"catch (error_already_set const &)" block, which just prints out the
single line error string.

https://docs.python.org/3/c-api/exceptions.html#c.PyErr_NormalizeException
tells us that "Under certain circumstances, the values returned by
PyErr_Fetch() below can be “unnormalized”, meaning that *exc is a class
object but *val is not an instance of the same class.".  And that's exactly
the problem we're having here.  We're getting a 'str', not an Exception.
Adding a call to PyErr_NormalizeException() turns the value back into a
proper Exception type and traceback.format_exception() now always does the
right thing.

I've also added calls to peek_pyerror() in the catch blocks, so if anything
else ever somehow causes traceback.format_exception to fail, we'll at least
have an idea of what it is in the log.

Fixes: https://tracker.ceph.com/issues/44799
Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit dee598087a37623238c35d7595348a4c674c43f3)

5 years agoMerge pull request #34520 from smithfarm/wip-45060-nautilus
Yuri Weinstein [Fri, 17 Apr 2020 19:12:08 +0000 (12:12 -0700)]
Merge pull request #34520 from smithfarm/wip-45060-nautilus

nautilus: qa/suites/rados/rest: don't pass empty dict as data arg

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
5 years agoMerge pull request #34326 from rzarzynski/wip-bug-24995-nautilus
Yuri Weinstein [Fri, 17 Apr 2020 19:11:21 +0000 (12:11 -0700)]
Merge pull request #34326 from rzarzynski/wip-bug-24995-nautilus

nautilus: mgr: synchronize ClusterState's health and mon_status.

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agomon: disable min pg per osd warning 34618/head
Sage Weil [Wed, 11 Sep 2019 22:26:52 +0000 (17:26 -0500)]
mon: disable min pg per osd warning

Now that the pg_autoscaler is on by default, it is "normal" (and okay) to
have a small number of PGs in the cluster if the overall cluster usage is
also low.  This setting just results in a health warning out of the box
when you create a pool and haven't written any data yet.

Fixes: https://tracker.ceph.com/issues/41735
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 1ac34a5ea3d1aca299b02e574b295dd4bf6167f4)

5 years agorgw: fix bug with (un)ordered bucket listing and marker w/ namespace 34609/head
J. Eric Ivancich [Fri, 31 Jan 2020 20:01:40 +0000 (15:01 -0500)]
rgw: fix bug with (un)ordered bucket listing and marker w/ namespace

When listing without specifying a namespace, the returned entries
could be in one or more namespaces. The marker used to continue the
listing may therefore contain a namespace, and that needs to be
preserved. This fixes a bug in both ordered and unordered listings
where it was not preserved.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 9457abb729754458aafc07a9ee514407906a1011)

Conflicts:
src/rgw/rgw_rados.cc
- trivial (nautilus is missing some whitespace-finessing that happened in master)

5 years agoos/bluestore: avoid bluefs log compaction when doing cold_close 34611/head
Igor Fedotov [Wed, 18 Mar 2020 11:51:47 +0000 (14:51 +0300)]
os/bluestore: avoid bluefs log compaction when doing cold_close

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit db6f3f66fcc28c3db2eba01611664676a820cb90)

 Conflicts:
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h
 Caused by lack of https://github.com/ceph/ceph/pull/30593

5 years agoos/bluestore/BlueFS: replace flush_log with sync_metadata.
Jianpeng Ma [Thu, 9 Jan 2020 04:58:22 +0000 (12:58 +0800)]
os/bluestore/BlueFS: replace flush_log with sync_metadata.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
(cherry picked from commit cdd0e87a73637c25e042caa4bd67497dc72c0386)

5 years agoos/bluestore: modify return type for BlueFS::_get_slow_device_id()
Igor Fedotov [Tue, 17 Mar 2020 18:22:56 +0000 (21:22 +0300)]
os/bluestore: modify return type for BlueFS::_get_slow_device_id()

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit de79da6a065315eb92b203308598d4c452adcc75)