]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agoqa: Fix a few mgr/volume test cases 39437/head
Kotresh HR [Fri, 5 Feb 2021 18:05:22 +0000 (23:35 +0530)]
qa: Fix a few mgr/volume test cases

Recovering dirty auth metadata file might not retain the order,
fixed the comparison in 'test_recover_auth_metadata_during_authorize'
and 'test_recover_auth_metadata_during_deauthorize'.

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

4 years agoMerge pull request #39272 from jan--f/wip-49142-pacific
Guillaume Abrioux [Thu, 11 Feb 2021 07:49:03 +0000 (08:49 +0100)]
Merge pull request #39272 from jan--f/wip-49142-pacific

pacific: ceph-volume: add some flexibility to bytes_to_extents

4 years agoMerge pull request #39403 from neha-ojha/wip-49228-pacific
Neha Ojha [Thu, 11 Feb 2021 02:06:18 +0000 (18:06 -0800)]
Merge pull request #39403 from neha-ojha/wip-49228-pacific

pacific: Revert "qa/tasks/cephadm: use cluster.sh and remote.sh for better readibility"

Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoRevert "qa/tasks/cephadm: use cluster.sh and remote.sh for better readibility" 39403/head
Neha Ojha [Tue, 9 Feb 2021 22:10:19 +0000 (22:10 +0000)]
Revert "qa/tasks/cephadm: use cluster.sh and remote.sh for better readibility"

This reverts commit 6d7ba1180e66df2d6dee3a01fe3e12cafaa6fe8c.

Fixes: https://tracker.ceph.com/issues/49228
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 3ced450cdd7a1f4083a19dd29b2d27e03883ab52)

4 years agoMerge pull request #39309 from liewegas/pr-39150-pacific
Sebastian Wagner [Wed, 10 Feb 2021 11:33:38 +0000 (12:33 +0100)]
Merge pull request #39309 from liewegas/pr-39150-pacific

pacific: qa/suites/rados/cephadm/thrash: add cephadm thrashing test

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #39181 from liewegas/pr-39039-pacific
Sebastian Wagner [Wed, 10 Feb 2021 11:32:54 +0000 (12:32 +0100)]
Merge pull request #39181 from liewegas/pr-39039-pacific

pacific: quincy feature, custom git_url for cephadm_branch

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #39190 from liewegas/pr-39097-pacific
Sebastian Wagner [Wed, 10 Feb 2021 11:31:35 +0000 (12:31 +0100)]
Merge pull request #39190 from liewegas/pr-39097-pacific

pacific: qa/workunits/cephadm/test_cephadm: fixes and cleanup

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #39252 from sebastian-philipp/pacific-cephadm-daemon-base-devel...
Sebastian Wagner [Wed, 10 Feb 2021 11:31:07 +0000 (12:31 +0100)]
Merge pull request #39252 from sebastian-philipp/pacific-cephadm-daemon-base-devel-pacific

pacific: cephadm: use ceph/daemon-base:latest-pacific-devel image

Reviewed-by: Dimitri Savineau <dsavinea@redhat.com>
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
4 years agoMerge pull request #39038 from kotreshhr/fix-test-idempotency-test
Ramana Raja [Mon, 8 Feb 2021 20:16:18 +0000 (15:16 -0500)]
Merge pull request #39038 from kotreshhr/fix-test-idempotency-test

pacific: pybind/ceph_volume_client: Fix test_idempotency test failure

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoMerge pull request #39109 from kotreshhr/wip-49027-pacific
Ramana Raja [Mon, 8 Feb 2021 20:14:44 +0000 (15:14 -0500)]
Merge pull request #39109 from kotreshhr/wip-49027-pacific

pacific: mgr/volumes: Evict clients based on auth-IDs and subvolume path

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoMerge pull request #39284 from neha-ojha/wip-49145-pacific
Yuri Weinstein [Mon, 8 Feb 2021 18:31:57 +0000 (10:31 -0800)]
Merge pull request #39284 from neha-ojha/wip-49145-pacific

pacific: osd: fix the scrubber behavior on multiple preemption attempts

Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
4 years agoMerge pull request #39264 from neha-ojha/wip-49134-pacific
Yuri Weinstein [Mon, 8 Feb 2021 18:31:06 +0000 (10:31 -0800)]
Merge pull request #39264 from neha-ojha/wip-49134-pacific

pacific: qa/*/test_envlibrados_for_rocksdb: use osd_client_message_cap to prevent slow requests

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #39257 from ifed01/wip-ifed-fsck-spanning-blobs-pac
Yuri Weinstein [Mon, 8 Feb 2021 18:30:39 +0000 (10:30 -0800)]
Merge pull request #39257 from ifed01/wip-ifed-fsck-spanning-blobs-pac

pacific: os/bluestore: detect and fix "zombie" spanning blobs using fsck.

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
4 years agoMerge pull request #39247 from kamoltat/wip-ksirivad-pacific-backports
Yuri Weinstein [Mon, 8 Feb 2021 18:29:46 +0000 (10:29 -0800)]
Merge pull request #39247 from kamoltat/wip-ksirivad-pacific-backports

pacific: mgr/pg_autoscaler: avoid scale-down until there is pressure

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #39237 from liewegas/pr-39206-pacific
Yuri Weinstein [Mon, 8 Feb 2021 18:28:51 +0000 (10:28 -0800)]
Merge pull request #39237 from liewegas/pr-39206-pacific

pacific: mgr/MetricTypes: condition encoding on feature bits

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #39102 from k0ste/wip-49021-pacific
Ernesto Puerta [Mon, 8 Feb 2021 18:01:25 +0000 (19:01 +0100)]
Merge pull request #39102 from k0ste/wip-49021-pacific

pacific: mgr/dashboard: trigger alert if some nodes have a MTU different than the median value

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #39026 from rhcs-dashboard/wip-48962-pacific
Ernesto Puerta [Mon, 8 Feb 2021 18:00:22 +0000 (19:00 +0100)]
Merge pull request #39026 from rhcs-dashboard/wip-48962-pacific

pacific: mgr/dashboard: Fix for incorrect validation in rgw user form

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
4 years agocephadm: use ceph/daemon-base:latest-pacific-devel image 39252/head
Sebastian Wagner [Wed, 3 Feb 2021 11:34:49 +0000 (12:34 +0100)]
cephadm: use ceph/daemon-base:latest-pacific-devel image

Fixes: https://tracker.ceph.com/issues/49041
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #39050 from vshankar/wip-mgr-mirroring-interface-pacific
Venky Shankar [Fri, 5 Feb 2021 10:57:35 +0000 (16:27 +0530)]
Merge pull request #39050 from vshankar/wip-mgr-mirroring-interface-pacific

pacific: pybind/mgr/mirroring: directory snapshot mirror support

4 years agoMerge pull request #39045 from smithfarm/wip-48970-pacific
Jason Dillaman [Fri, 5 Feb 2021 00:23:18 +0000 (19:23 -0500)]
Merge pull request #39045 from smithfarm/wip-48970-pacific

pacific: ocf: add support for mapping images within an RBD namespace

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #39177 from cbodley/wip-qa-rgw-pacific-branches
Yuri Weinstein [Thu, 4 Feb 2021 19:43:19 +0000 (11:43 -0800)]
Merge pull request #39177 from cbodley/wip-qa-rgw-pacific-branches

pacific: qa: rgw tests target ceph-pacific branches instead of ceph-master

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
4 years agoqa/suites/rados/cephadm/thrash: add cephadm thrashing test 39309/head
Sage Weil [Mon, 25 Jan 2021 15:19:01 +0000 (09:19 -0600)]
qa/suites/rados/cephadm/thrash: add cephadm thrashing test

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit cc6412c99127c05dda639ff753cb1102bdb995bb)

4 years agodoc: cleanup cephfs-mirroring document 39050/head
Venky Shankar [Wed, 3 Feb 2021 05:11:59 +0000 (00:11 -0500)]
doc: cleanup cephfs-mirroring document

Remove references to in-progress feature, remove internal interfaces
section and minor cleanups.

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

4 years agotest: cephfs-mirror teuthology task and test yamls
Venky Shankar [Tue, 4 Aug 2020 09:05:51 +0000 (05:05 -0400)]
test: cephfs-mirror teuthology task and test yamls

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

4 years agotest: add tests for mirroring module w/ daemon verification
Venky Shankar [Tue, 18 Aug 2020 09:33:33 +0000 (05:33 -0400)]
test: add tests for mirroring module w/ daemon verification

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

4 years agotest: optionally create a backup filesystem on startup
Venky Shankar [Tue, 18 Aug 2020 09:32:38 +0000 (05:32 -0400)]
test: optionally create a backup filesystem on startup

Also filter out client-id's starting with "mirror" when
cleaning leftover auth-ids since teuthology would be
configured to create client.mirror and client.mirror_remote
clients before executing mirroring tests.

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

4 years agopybind/mgr/mirroring: interface to mirror CephFS directory snapshots
Venky Shankar [Thu, 9 Jul 2020 10:43:47 +0000 (06:43 -0400)]
pybind/mgr/mirroring: interface to mirror CephFS directory snapshots

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

4 years agopybind/mgr/mgr_util: make RTimer calss reusable
Venky Shankar [Thu, 9 Jul 2020 10:43:04 +0000 (06:43 -0400)]
pybind/mgr/mgr_util: make RTimer calss reusable

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

4 years agoosd: fix the scrubber behavior on multiple preemption attempts 39284/head
Ronen Friedman [Thu, 28 Jan 2021 17:04:35 +0000 (19:04 +0200)]
osd: fix the scrubber behavior on multiple preemption attempts

Latest scrub code creates a time window in which a specific scrub
is marked as "preempted", but future preemptions are prohibited.
Write operations handled are then blocked but not restarted on time.

Fixes: https://tracker.ceph.com/issues/48793
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit 4cdb293e08f0ea066511c9e33f48635d20d58dd9)

4 years agoosd: replacing list::size() with list::empty() in some scrub code
Ronen Friedman [Thu, 28 Jan 2021 14:28:15 +0000 (16:28 +0200)]
osd: replacing list::size() with list::empty() in some scrub code

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit f100f2f7f4e332ac784db44a35bf23cf53a43dff)

4 years agoMerge pull request #39280 from neha-ojha/wip-49139-pacific
Neha Ojha [Wed, 3 Feb 2021 23:00:28 +0000 (15:00 -0800)]
Merge pull request #39280 from neha-ojha/wip-49139-pacific

pacific: qa/suites/rados/perf: pin to 18.04

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoqa/suites/perf-basic: pin to 18.04 39280/head
Neha Ojha [Wed, 3 Feb 2021 18:57:50 +0000 (18:57 +0000)]
qa/suites/perf-basic: pin to 18.04

This will have same problems as https://tracker.ceph.com/issues/49139

Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit e5895dd8012f646ae9d67b9d1b331e7c06fe89d3)

4 years agoqa/suites/rados/perf: pin to 18.04
Neha Ojha [Wed, 3 Feb 2021 17:29:59 +0000 (17:29 +0000)]
qa/suites/rados/perf: pin to 18.04

Caused by a07ca4c5c0f04c43c71231a898c2a89e99a80606

Fixes: https://tracker.ceph.com/issues/49139
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 6a03b4cec9be39b2c3217e5f28372e1db3999781)

4 years agoMerge pull request #39165 from sebastian-philipp/pacific-backport-39035-38935-39028...
Yuri Weinstein [Wed, 3 Feb 2021 18:14:56 +0000 (10:14 -0800)]
Merge pull request #39165 from sebastian-philipp/pacific-backport-39035-38935-39028-39087-38998-38854-38982-39101-39043-39113-

pacific: cephadm: Batch backport January (2)

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
4 years agoceph-volume: mock VGs with string properties in tests 39272/head
Jan Fajerski [Tue, 22 Dec 2020 14:44:10 +0000 (15:44 +0100)]
ceph-volume: mock VGs with string properties in tests

The real things uses string properties as well.

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

4 years agoceph-volume: add some flexibility to bytes_to_extents
Jan Fajerski [Tue, 22 Dec 2020 13:29:02 +0000 (14:29 +0100)]
ceph-volume: add some flexibility to bytes_to_extents

For batch we want to report the projected sizes before creating any LVM
structures, we use the device size for that. This means we pass this
projected size to lvm/api.py::create_lv. This could result in situations
where we request more extents for the new LV than are actually
available, as LVM takes up some available space on the block device
(plus alignment).
We fix this by adjusting the extent count downwards if its less than 1% off the
requested value.

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

4 years agoqa/*/test_envlibrados_for_rocksdb: use osd_client_message_cap to prevent slow requests 39264/head
Neha Ojha [Tue, 2 Feb 2021 17:43:56 +0000 (17:43 +0000)]
qa/*/test_envlibrados_for_rocksdb: use osd_client_message_cap to prevent slow requests

EnvLibradosMutipoolTest.DBBulkLoadKeysInRandomOrder can overload OSDs and cause
heartbeat timeouts. Tests in test_envlibrados_for_rocksdb also generate slow
requests on OSDs. Use osd_client_message_cap to prevent this.
Since this option is disabled by default, this may be a good way to exercise it.

Fixes: https://tracker.ceph.com/issues/49064
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit f02cd4d8b0c9f1566462b7b950f121a44efc1d06)

4 years agoMerge pull request #39233 from idryomov/wip-unbreak-rbd-task-pacific
Ilya Dryomov [Wed, 3 Feb 2021 09:36:17 +0000 (10:36 +0100)]
Merge pull request #39233 from idryomov/wip-unbreak-rbd-task-pacific

pacific: qa/tasks/rbd: fix regressions introduced with rbd encryption support

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agomgr/pg_autoscaler: avoid scale-down until there is pressure 39247/head
Kamoltat [Thu, 7 Jan 2021 15:39:19 +0000 (15:39 +0000)]
mgr/pg_autoscaler: avoid scale-down until there is pressure

The autoscaler will start out with scaling each
pools to have a full complements of pgs from the start
and will only decrease it when pools need more due to
increased usage.

Introduced a unit test that tests only the
function get_final_pg_target_and_ratio() which
deals with the distrubtion of pgs amongst the
pools

Edited workunit script to reflect the change
of how pgs are calculated and distrubted.

Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit daeb6f6ac0c8f77ae07147f9d1e2ed18d6d8e4cc)

4 years agomgr/MetricTypes: condition encoding on feature bits 39237/head
Sage Weil [Sun, 31 Jan 2021 16:29:51 +0000 (10:29 -0600)]
mgr/MetricTypes: condition encoding on feature bits

Do not encode new metric|config types for older peers.

The combination of boost::optional and boost::variant make this super
awkward to condition on the features. :(

Fixes: https://tracker.ceph.com/issues/49069
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 5cf13459813228a2b8d78bba2d28a10528490c1f)

4 years agoqa/tasks/rbd: don't wait for krbd symlink to be created/removed 39233/head
Ilya Dryomov [Sun, 31 Jan 2021 14:24:32 +0000 (15:24 +0100)]
qa/tasks/rbd: don't wait for krbd symlink to be created/removed

Commit 3754c665a11e (":qa/tasks/rbd: test qemu on top of rbd
encryption") broke dev_create() for krbd by messing up the "wait
for the symlink to be created by udev" loop.  The rbd tool has been
synchronizing with udev internally since 2014, so rather than fixing
let's just drop it.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit d89613f52dee83c308a2b169ba1c2869c16ac9d7)

4 years agoqa/tasks/rbd: dev_create() expects a properties dict
Ilya Dryomov [Sun, 31 Jan 2021 13:27:52 +0000 (14:27 +0100)]
qa/tasks/rbd: dev_create() expects a properties dict

In order to add encryption_format property, commit 3754c665a11e
(":qa/tasks/rbd: test qemu on top of rbd encryption") changed the
dev_create() contract.  It now expects a properties dict, but the
main task routine wasn't updated and still passes role_images.

On top of that, role_images itself got broken.  It is supposed
to be a mapping from role to a corresponding image name, not to
a dict with an image_name key.  This affected generic_mount().

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 0357c0215b2fbbf7fa801331df1f92b101ad9d5e)

4 years agoos/bluestore: detect and fix "zombie" spanning blobs using fsck. 39257/head
Igor Fedotov [Thu, 12 Nov 2020 17:04:45 +0000 (20:04 +0300)]
os/bluestore: detect and fix "zombie" spanning blobs using fsck.

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

4 years agoqa/workunits/cephadm/test_cephadm: fix argument 39190/head
Sage Weil [Fri, 29 Jan 2021 15:07:15 +0000 (09:07 -0600)]
qa/workunits/cephadm/test_cephadm: fix argument

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 8c625c077b067380acbe005c2db818322011f56e)

4 years agoqa/workunits/cephadm/test_cephadm: show exporter output
Sage Weil [Thu, 28 Jan 2021 21:15:02 +0000 (15:15 -0600)]
qa/workunits/cephadm/test_cephadm: show exporter output

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit a78dab9e53ea19488a7c8719852a46311841ae75)

4 years agoqa/workunits/cephadm/test_cephadm: don't bother pulling octopus
Sage Weil [Wed, 27 Jan 2021 03:46:24 +0000 (21:46 -0600)]
qa/workunits/cephadm/test_cephadm: don't bother pulling octopus

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit f394eafd647fa6117aa93379464a089b8b5a2261)

4 years agoqa/workunits/cephadm/test_cephadm: behave on terminal
Sage Weil [Wed, 27 Jan 2021 03:46:09 +0000 (21:46 -0600)]
qa/workunits/cephadm/test_cephadm: behave on terminal

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit c82770f77c77a14334dab668a1e0e2c992974849)

4 years agoqa/workunits/cepham/test_cephadm: pull only recent images, from quay.ceph.io
Sage Weil [Tue, 26 Jan 2021 16:19:53 +0000 (10:19 -0600)]
qa/workunits/cepham/test_cephadm: pull only recent images, from quay.ceph.io

No reason to pull nautilus/mimic, which don't even support cephadm.

This test will mostly run in the sepia lab, so pull from there.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 1dccdd2fa182dcf666829a54bc6bc599a1f9da69)

4 years agoqa/workunits/cephadm/test_cephadm: don't respawn for python versions
Sage Weil [Tue, 26 Jan 2021 16:19:20 +0000 (10:19 -0600)]
qa/workunits/cephadm/test_cephadm: don't respawn for python versions

We aren't supporting python2 anymore.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 90676eb9b1a6e1593c37d158b8592e94ae30d655)

4 years agoqa/tasks/cephadm: allow custom git_url for cephadm_branch pull 39181/head
Sage Weil [Fri, 29 Jan 2021 20:03:43 +0000 (14:03 -0600)]
qa/tasks/cephadm: allow custom git_url for cephadm_branch pull

Normally the git_url is git://git.ceph.com/ceph-ci.git, which mirrors
upstream ceph-ci.git.  However, the release branches aren't present there.
Allow a custom git_url so we can pull these from the main ceph.git.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 5842058d128d48495285242b46e41eba18916084)

# Conflicts:
# qa/suites/upgrade/pacific-x/parallel/1-tasks.yaml

4 years agoqa: rgw tests target ceph-pacific branches instead of ceph-master 39177/head
Casey Bodley [Fri, 29 Jan 2021 17:13:45 +0000 (12:13 -0500)]
qa: rgw tests target ceph-pacific branches instead of ceph-master

s3test and ragweed tests now use ceph-pacific branch. this commit
diverges from master, so is applied directly to the pacific branch

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agocmake: install rook-client-python using ExternalProject 39165/head
Kefu Chai [Thu, 28 Jan 2021 12:35:36 +0000 (20:35 +0800)]
cmake: install rook-client-python using ExternalProject

so we don't need to rerun the generate_rook_ceph_client.sh script
everytime when building the script. cmake creates a stamp file for
tracking the dependencies and the time of modification of dependencies.

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

4 years agopython-common: fix test_datetime_to_str_2 on non-UTC hosts
Sage Weil [Wed, 27 Jan 2021 21:44:21 +0000 (15:44 -0600)]
python-common: fix test_datetime_to_str_2 on non-UTC hosts

The old test parsed to a datetime without a tz, which was interpreted as
the local time zone when rendering back to a string.  Specify that it's a
UTC datetime so that behavior is consistent regardless of the test host
timezone.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 78aca4db249c409d0cd5a24bfae81e55cf930bc3)

4 years agocephadm:add missing kernel_security property
Paul Cuzner [Wed, 27 Jan 2021 20:40:58 +0000 (09:40 +1300)]
cephadm:add missing kernel_security property

The propery decorator had gone missing which meant
the dump of host facts was missing the kernel security
(LSM) settings. This patch just adds the @property
decorator back

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
(cherry picked from commit 1bc953cfbfe015d3eccf9ead002b9eb0253a6825)

4 years agocephadm: refactor call() using asyncio.asyncio.StreamReader
Kefu Chai [Sun, 24 Jan 2021 06:58:51 +0000 (14:58 +0800)]
cephadm: refactor call() using asyncio.asyncio.StreamReader

simpler this way, also fix a couple issues:

* create a child watcher explicitly, see
  https://bugs.python.org/issue35621
* use StringIO for collecting outputs for better performance,
  instead of appending the lines to an existing str
* catch ValueError when reading from the stream reader,
  because StreamReader.readline() could raise ValueError when
  it reaches the buffer limit while looking for a separator.
  in this case, we should try again, in hope that the spawned
  process can feed the reader with more data which contains
  the separator (i.e., b'\n').
* backport ThreadedChildWatcher from Python 3.8 so we can
  run create_subprocess_exec() in non-main threads.

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

4 years agomgr/cephadm: Fix wrong argument type to HandleCommandResult
Sebastian Wagner [Wed, 27 Jan 2021 12:15:47 +0000 (13:15 +0100)]
mgr/cephadm: Fix wrong argument type to HandleCommandResult

the argument must be a string

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit 677b3d1b0f925cd36fccbdf9fb12251b77afd030)

4 years agocephadm: Fix iscsi client caps (allow mgr <service status> calls)
Juan Miguel Olmo Martínez [Wed, 20 Jan 2021 09:36:30 +0000 (10:36 +0100)]
cephadm: Fix iscsi client caps (allow mgr <service status> calls)

iSCSI daemons need to execute <ceph service status> command

Fixes: https://tracker.ceph.com/issues/48925
Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
(cherry picked from commit 9b9934f75b648a9ee01848710a6f7150a371e26e)

4 years agomgr/cephadm: force flag for ok-to-stop and ok-to-stop for monitoring stack
Adam King [Mon, 11 Jan 2021 18:23:04 +0000 (13:23 -0500)]
mgr/cephadm: force flag for ok-to-stop and ok-to-stop for monitoring stack

Daemons that could cause data loss when stopped will always block.

Daemons that will only cause loss in availability should block but have
a workaround in the form of a force flag if the user is okay with the service
being down.

Also implements ok-to-stop for monitoring stack daemons that uses this system
of blocking on availability loss unless force flag is provided

Signed-off-by: Adam King <adking@redhat.com>
Signed-off-by: Daniel-Pivonka <dpivonka@redhat.com>
(cherry picked from commit aeeffb07f1bb226b64a362de4eecd7d63fc0b0d1)

4 years agomgr/cephadm: minor pep8 fixes
Sebastian Wagner [Fri, 22 Jan 2021 09:19:03 +0000 (10:19 +0100)]
mgr/cephadm: minor pep8 fixes

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit 4ca11ae50d734c1d059d88b8b14a3318f11f4eea)

4 years agomgr/cephadm: Properly handle JSON Decode error
Sebastian Wagner [Thu, 21 Jan 2021 11:10:34 +0000 (12:10 +0100)]
mgr/cephadm: Properly handle JSON Decode error

Fixes 6d759fb5deac0c52b3c738a2e695738228749420

I.e. don't use `out`, until it is acutally defined

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit eb1a40c3ea8e19259d8ab68a6eeb16d27e4cdbda)

4 years agoqa/suites/rados/cephadm: drop 20.04 podman
Sage Weil [Tue, 26 Jan 2021 15:14:09 +0000 (09:14 -0600)]
qa/suites/rados/cephadm: drop 20.04 podman

This version is also affected

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit dccd5861733144514cb28b3325f2d5ed6c56a67e)

4 years agoqa/suites/rados/cephadm: stop testing 18.04 + podman
Sage Weil [Mon, 25 Jan 2021 21:32:33 +0000 (15:32 -0600)]
qa/suites/rados/cephadm: stop testing 18.04 + podman

The current bionice version triggers a podman/conmon bug that
truncates output, affecting both cephadm bootstrap when 'mgr dump' is
large, and teuthology 'pg dump' when it is large.

See https://tracker.ceph.com/issues/48993

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit e5e4710990e19625a074f6ad9ab13003fbaccba1)

4 years agocephadm: retry for 30s instead of 10s
Sage Weil [Fri, 22 Jan 2021 15:09:17 +0000 (09:09 -0600)]
cephadm: retry for 30s instead of 10s

No real reason not to wait longer, and I'm worried about things not coming
up quickly enough on slower or loady machines.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 963f54aebf151ea4624063d930ab85f0a2b1fa79)

4 years agocephadm: try 'mgr stat' before 'mgr dump' to get the epoch
Sage Weil [Fri, 22 Jan 2021 15:06:44 +0000 (09:06 -0600)]
cephadm: try 'mgr stat' before 'mgr dump' to get the epoch

This is less noise in the debug log.  (Also, there seems to be a problem
when the mgr stat output gets too big.)

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit c1cee0a9526b21c848e8eff2bed585ee856e4497)

4 years agomon: add 'mgr stat' command
Sage Weil [Thu, 21 Jan 2021 23:51:39 +0000 (17:51 -0600)]
mon: add 'mgr stat' command

This is analogous to 'osd stat' and 'mds stat'.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit bb702eda199cf2def81e8277d0a222daafe9df28)

4 years agopybind/mgr/cephadm: return -ENOENT if self.ssh_user is None
Kefu Chai [Thu, 21 Jan 2021 16:11:39 +0000 (00:11 +0800)]
pybind/mgr/cephadm: return -ENOENT if self.ssh_user is None

there is chance that self.ssh_user is None when handling "cephadm
get-user" command, so return -ENOENT and error messages in that case.

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

4 years agopybind/mgr/dashboard: use _get_localized_key for composing store key
Kefu Chai [Tue, 19 Jan 2021 17:56:02 +0000 (01:56 +0800)]
pybind/mgr/dashboard: use _get_localized_key for composing store key

Just for keeping this 'encapsulated', there's _get_localized_key helper
in mgr_module (there's also a set_localized_store but it only deals with
the active manager)

As suggested by Ernesto Puerta <epuertat@redhat.com>

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

4 years agopybind/mgr/prometheus: add assert to appease mypy
Kefu Chai [Tue, 19 Jan 2021 17:28:20 +0000 (01:28 +0800)]
pybind/mgr/prometheus: add assert to appease mypy

self.get_osd_perf_counters() might return None, add assert() to assure
mypy that it does not return None here.

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

4 years agopybind/mgr/cephadm/serve: add assert to appease mypy
Kefu Chai [Tue, 19 Jan 2021 17:26:06 +0000 (01:26 +0800)]
pybind/mgr/cephadm/serve: add assert to appease mypy

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

4 years agopybind/mgr/cephadm/module: assure self.ssh_user is not None
Kefu Chai [Tue, 19 Jan 2021 17:25:10 +0000 (01:25 +0800)]
pybind/mgr/cephadm/module: assure self.ssh_user is not None

to appease mypy

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

4 years agopybind/mgr/cephadm/inventory: cast variable to expected type
Kefu Chai [Tue, 19 Jan 2021 17:24:01 +0000 (01:24 +0800)]
pybind/mgr/cephadm/inventory: cast variable to expected type

to silence mypy warnings like:

cephadm/module.py:55: note: In module imported here,
cephadm/__init__.py:6: note: ... from here:
cephadm/inventory.py: note: In member "load" of class "SpecStore":
cephadm/inventory.py:130: error: Invalid index type "str" for "str"; expected type "Union[int, slice]"
cephadm/inventory.py:131: error: Invalid index type "str" for "str"; expected type "Union[int, slice]"

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

4 years agotools/setup-virtualenv.sh: do not pass --use-feature=2020-resolver to pip
Kefu Chai [Tue, 19 Jan 2021 12:12:22 +0000 (20:12 +0800)]
tools/setup-virtualenv.sh: do not pass --use-feature=2020-resolver to pip

pip use the new resolver by default now. so no need to pass this option
to it anymore.

This reverts commit fa9e2bfd4b3648f08ed3a88ce737d432ab97cce1.

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

4 years agopybind/mgr/mgr_module: annotate variable type
Kefu Chai [Tue, 19 Jan 2021 09:34:43 +0000 (17:34 +0800)]
pybind/mgr/mgr_module: annotate variable type

to silence following mypy error:

cephadm/module.py:1155: error: Incompatible types in assignment
(expression has type "None", variable has type "str")

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

4 years agopybind/mgr/cephadm: rename variables to avoid name reuse
Kefu Chai [Tue, 19 Jan 2021 09:20:29 +0000 (17:20 +0800)]
pybind/mgr/cephadm: rename variables to avoid name reuse

to applease mypy, otherwise, for instance, "err" would be reused for
holding the return value of self.mgr.check_mon_command(...)

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

4 years agopybind/mgr: annotate OSDMap and friends
Kefu Chai [Tue, 19 Jan 2021 06:53:11 +0000 (14:53 +0800)]
pybind/mgr: annotate OSDMap and friends

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

4 years agopybind/mgr: correct annotation for BasePyOSDMap._apply_incremental()
Kefu Chai [Tue, 19 Jan 2021 06:49:07 +0000 (14:49 +0800)]
pybind/mgr: correct annotation for BasePyOSDMap._apply_incremental()

it's incorrect. as the underlying C implementation,
"osdmap_apply_incremental()", actually expects an instance of
`BasePyOSDMapIncrementalType`. which is mapped to
`BasePyOSDMapIncremental` in Python. and this class is wrapped using
`OSDMapIncremental` in mgr_module.py.

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

4 years agopybind/mgr: define HandleCommandResult using NamedTuple
Kefu Chai [Tue, 19 Jan 2021 06:08:39 +0000 (14:08 +0800)]
pybind/mgr: define HandleCommandResult using NamedTuple

simpler this way, so we don't need to define __new__

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

4 years agopybind/mgr: use numeric values of logging level for index
Kefu Chai [Tue, 19 Jan 2021 04:16:12 +0000 (12:16 +0800)]
pybind/mgr: use numeric values of logging level for index

less magic values in code this way

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

4 years agomgr/cephadm: use dict instead of defaultdict to silence mypy warning
Kefu Chai [Sun, 17 Jan 2021 08:36:35 +0000 (16:36 +0800)]
mgr/cephadm: use dict instead of defaultdict to silence mypy warning

otherwise we have:

1: cephadm/module.py:30: note: In module imported here:
1: cephadm/serve.py: note: In member "_check_for_strays" of class "CephadmServe":
1: cephadm/serve.py:395: error: Argument "default" to "get_metadata" of "MgrModule" has incompatible type "defaultdict[str, None]"; expected "Optional[Dict[str, str]]"

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

4 years agomgr/rook: handle the case where given osd is not found
Kefu Chai [Sun, 17 Jan 2021 08:29:37 +0000 (16:29 +0800)]
mgr/rook: handle the case where given osd is not found

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

4 years agomgr/dashboard: pass str as the 2nd param of set_store()
Kefu Chai [Sun, 17 Jan 2021 08:09:36 +0000 (16:09 +0800)]
mgr/dashboard: pass str as the 2nd param of set_store()

MgrModule.set_store() only accepts str or None as its second
parameter.

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

4 years agomgr/progress: pass a str as the value of option to set_module_option()
Kefu Chai [Sun, 17 Jan 2021 08:02:30 +0000 (16:02 +0800)]
mgr/progress: pass a str as the value of option to set_module_option()

MgrModule.set_module_option() only accepts str or None as its second
parameter.

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

4 years agomgr/progress: pass id to constructor of Event
Kefu Chai [Sun, 17 Jan 2021 07:29:33 +0000 (15:29 +0800)]
mgr/progress: pass id to constructor of Event

to assure that the self.id is always valid, it helps to silence the
warnings from mypy like:

progress/module.py: note: In member "_refresh" of class "Event":
progress/module.py:46: error: Argument 1 to "update_progress_event" of "MgrModule" has incompatible type "Optional[str]"; expected "str"

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

4 years agopybind/mgr/insights: be PEP8 compliant
Kefu Chai [Sun, 17 Jan 2021 02:41:58 +0000 (10:41 +0800)]
pybind/mgr/insights: be PEP8 compliant

to applease flake8

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

4 years agopybind/mgr/insights: use CLICommand to define command
Kefu Chai [Sun, 17 Jan 2021 02:37:40 +0000 (10:37 +0800)]
pybind/mgr/insights: use CLICommand to define command

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

4 years agopybind/mgr/iostat: minor cleanups
Kefu Chai [Sun, 17 Jan 2021 02:19:53 +0000 (10:19 +0800)]
pybind/mgr/iostat: minor cleanups

* do not pass typename and self to super()
* do not add parentheses around condition expression

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

4 years agopybind/mgr/iostat: use correct types
Kefu Chai [Sun, 17 Jan 2021 01:35:36 +0000 (09:35 +0800)]
pybind/mgr/iostat: use correct types

for better readability and for the sake of correctness.

* do not cast denominator to float before diving by it
* use '//' for divding an int
* cast int to str as it will be used as an element in a list of str

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

4 years agomgr/iostat: use CLICommand to define command
Kefu Chai [Sun, 17 Jan 2021 01:29:20 +0000 (09:29 +0800)]
mgr/iostat: use CLICommand to define command

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

4 years agopybind/mgr/mgr_module: annotate more methods
Kefu Chai [Sat, 16 Jan 2021 15:14:07 +0000 (23:14 +0800)]
pybind/mgr/mgr_module: annotate more methods

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

4 years agopybind/mgr: define CLUSTER_LOG_PRIO* using enum.IntEnum
Kefu Chai [Sat, 16 Jan 2021 15:30:30 +0000 (23:30 +0800)]
pybind/mgr: define CLUSTER_LOG_PRIO* using enum.IntEnum

so the clog type / prio can be typed.

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

4 years agopybind/mgr/mgr_module: add poll param to CLICommand
Kefu Chai [Sat, 16 Jan 2021 14:54:51 +0000 (22:54 +0800)]
pybind/mgr/mgr_module: add poll param to CLICommand

and add it to the output of dump_cmd() call, if "poll" is missing
in the output of dump_cmd() call, ceph CLI consider the it as False.

but it'd be better to be explicit. so this field is always set.

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

4 years agomgr,pybind/mgr: use bool for poll in COMMANDS
Kefu Chai [Sun, 17 Jan 2021 01:16:36 +0000 (09:16 +0800)]
mgr,pybind/mgr: use bool for poll in COMMANDS

use correctly typed variable helps with readability and less
error-prone.

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

4 years agopybind/mgr/mgr_module: flake8 fixes
Kefu Chai [Sat, 16 Jan 2021 14:47:02 +0000 (22:47 +0800)]
pybind/mgr/mgr_module: flake8 fixes

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

4 years agodoc: Applied text as suggested by @zdover23
Michael Wodniok [Wed, 27 Jan 2021 07:19:06 +0000 (08:19 +0100)]
doc: Applied text as suggested by @zdover23

Signed-off-by: Michael Wodniok <wodniok@wor.net>
(cherry picked from commit f857bcd622f90d05d026bc5f219b37f71ab90d4e)

4 years agodoc: changed commands as suggested by @sebastian-philipp
Michael Wodniok [Tue, 19 Jan 2021 12:15:32 +0000 (13:15 +0100)]
doc: changed commands as suggested by @sebastian-philipp

Signed-off-by: Michael Wodniok <wodniok@wor.net>
Co-authored-by: Sebastian Wagner <sebastian@spawnhost.de>
(cherry picked from commit d97731969ab384909e64afd60d766e5cb06e4b5e)

4 years agodoc: added internal link
Michael Wodniok [Tue, 19 Jan 2021 12:12:57 +0000 (13:12 +0100)]
doc: added internal link

Linked from Service Status to retrieval of specificaton section as
`ceph orch ls --export` is also mentioned there.

Signed-off-by: Michael Wodniok <wodniok@wor.net>
(cherry picked from commit a9553061996967e0f57d70e15f2586f90f4d2f29)

4 years agodoc: added section about retival of Service Spec.
Michael Wodniok [Tue, 22 Dec 2020 09:46:54 +0000 (10:46 +0100)]
doc: added section about retival of Service Spec.

Signed-off-by: Michael Wodniok <wodniok@wor.net>
(cherry picked from commit 84bdafe0e36e11fb8b57065625a5ecb49fd3c248)

4 years agospec, debian: recommend podman >= 2.0.2
Michael Fritch [Mon, 25 Jan 2021 23:09:07 +0000 (16:09 -0700)]
spec, debian: recommend podman >= 2.0.2

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit a89922789562bec731525dff65759061fcd07085)

4 years agocephadm: partal revert of 253968a2baf
Michael Fritch [Mon, 25 Jan 2021 23:08:51 +0000 (16:08 -0700)]
cephadm: partal revert of 253968a2baf

remove technical debt related to podman < 2.0.0

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 90f9899cc12c76a7957429150928b23703ecd950)

4 years agocephadm: require podman >= 2.0.2
Michael Fritch [Mon, 25 Jan 2021 23:08:41 +0000 (16:08 -0700)]
cephadm: require podman >= 2.0.2

Fixes: https://tracker.ceph.com/issues/47139
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 8b7047b6144084107e516cd9dadeeb29ebdbfead)