]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agomgr/cephadm: call prepare_create before redeploy
Adam King [Thu, 28 Jan 2021 18:32:01 +0000 (13:32 -0500)]
mgr/cephadm: call prepare_create before redeploy

some services (notably iscsi and ha-rgw currently) rely
on actions in prepare_create to setup their configuration
even when being redeployed. This change makes sure prepare_create
is called before redeploys and reconfigurations the same way it is
done during initial deployment to avoid disrepencies. OSDs are
skipped as they do not have a normal prepare_create

Fixes: https://tracker.ceph.com/issues/48373
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 6fc6db23bf72d5d488fa983a7fd2491c5a9805d3)

4 years agomgr/cephadm: Put together default container images references
Juan Miguel Olmo Martínez [Fri, 12 Feb 2021 13:09:17 +0000 (14:09 +0100)]
mgr/cephadm: Put together default container images references

Placed all in the same location in order to make easy downstream modifications
and future changes

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
(cherry picked from commit ce246479443a64b292c7cff2a662161c8a598e09)

Conflicts:
src/cephadm/cephadm

4 years agocephadm: --orphan-initial-daemons now applies services unmanaged
Sebastian Wagner [Fri, 5 Feb 2021 12:19:21 +0000 (13:19 +0100)]
cephadm: --orphan-initial-daemons now applies services unmanaged

We do not want to have orphaned daemons at all. Thus apply
services as unmanaged in order to run `ceph orch daemon add ...`
later.

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

4 years agomgr/cephadm: purge service: remove `mds_join_fs`
Sebastian Wagner [Fri, 29 Jan 2021 17:49:25 +0000 (18:49 +0100)]
mgr/cephadm: purge service: remove `mds_join_fs`

Also add a unit test

Fixes: https://tracker.ceph.com/issues/48597
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit 30d03ee07c75da87496eae34e2186b5531b4101c)

4 years agomgr/cephadm: Add service deletion timestamp to `orch ls`
Sebastian Wagner [Fri, 29 Jan 2021 17:27:52 +0000 (18:27 +0100)]
mgr/cephadm: Add service deletion timestamp to `orch ls`

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

4 years agomgr/cephadm: mandate the existence of Services for Daemons
Sebastian Wagner [Fri, 29 Jan 2021 16:18:50 +0000 (17:18 +0100)]
mgr/cephadm: mandate the existence of Services for Daemons

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

4 years agomgr/cephadm: Add pytest to verify delayed service deletion
Sebastian Wagner [Fri, 29 Jan 2021 16:16:55 +0000 (17:16 +0100)]
mgr/cephadm: Add pytest to verify delayed service deletion

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

4 years agomgr/cephadm: Purge deleted services
Sebastian Wagner [Wed, 13 Jan 2021 13:12:24 +0000 (14:12 +0100)]
mgr/cephadm: Purge deleted services

If no daemon is deployed for a deleted service,
purge it.

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

4 years agomgr/cephadm: add spec_deleted datetime to spec store
Sebastian Wagner [Wed, 13 Jan 2021 12:40:16 +0000 (13:40 +0100)]
mgr/cephadm: add spec_deleted datetime to spec store

We'd like to keep the spec in the store, while we're cleaning
up all the daemons. Reason is to clean up the
config and config-key store when the last daemon of a
service is deleted.

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

4 years agomgr/cephadm: remove dead code
Sebastian Wagner [Wed, 13 Jan 2021 12:43:21 +0000 (13:43 +0100)]
mgr/cephadm: remove dead code

SpecStore.find is no longer used

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

4 years agomgr/cephadm: enable use_repo_digest by default for pacific
Sebastian Wagner [Mon, 25 Jan 2021 10:54:49 +0000 (11:54 +0100)]
mgr/cephadm: enable use_repo_digest by default for pacific

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

4 years agocephadm: add error messages to log file
Michael Fritch [Tue, 9 Feb 2021 18:12:37 +0000 (11:12 -0700)]
cephadm: add error messages to log file

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

4 years agoqa/suites/rados/cephadm/upgrade: change starting version by distro
Sage Weil [Thu, 11 Feb 2021 19:08:19 +0000 (14:08 -0500)]
qa/suites/rados/cephadm/upgrade: change starting version by distro

centos/rhel have podman 2, which does not like conflicting --cap-add and
--privileged arguments.  cephadm versions prior to 15.2.5 use both args,
however, which means the rhel/centos upgrade test has to start at 15.2.5
to work at all on those distros (with the updated podman).

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

4 years agodoc/dev/cephadm: scalability notes
Sebastian Wagner [Wed, 9 Dec 2020 10:59:59 +0000 (11:59 +0100)]
doc/dev/cephadm: scalability notes

Add a few notes about possible future scalability improvements

Co-authored-by: Joshua Schmid <jschmid@suse.de>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit f82e37434188550d9aadccab872d1356997cf661)

Conflicts:
doc/dev/cephadm/index.rst

4 years agomgr/orch: Fix flake8 error
Sebastian Wagner [Mon, 8 Feb 2021 16:37:52 +0000 (17:37 +0100)]
mgr/orch: Fix flake8 error

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

4 years agocephadm: configure journald as the logdriver
Michael Fritch [Fri, 5 Feb 2021 01:19:25 +0000 (18:19 -0700)]
cephadm: configure journald as the logdriver

Introduced by e6792f306ab4d07251588fdca6ed3876ae3a092a

podman containers running in a detached `-d` state need to have a
configured logdriver for `cephadm logs` to be able to gather the daemon
output from journald

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

4 years agomgr/cephadm: Redefinition of unused name from line n (F811)
Michael Fritch [Wed, 3 Feb 2021 14:06:16 +0000 (07:06 -0700)]
mgr/cephadm: Redefinition of unused name from line n (F811)

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

4 years agomgr/cephadm: Module imported but unused (F401)
Michael Fritch [Wed, 3 Feb 2021 14:06:06 +0000 (07:06 -0700)]
mgr/cephadm: Module imported but unused (F401)

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

4 years agomgr/cephadm: Local variable name is assigned to but never used (F841)
Michael Fritch [Tue, 2 Feb 2021 17:42:44 +0000 (10:42 -0700)]
mgr/cephadm: Local variable name is assigned to but never used (F841)

add error handling when `CompletedProcess` fails during rgw relam,
zongroup create et al.

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

4 years agomgr/cephadm: Local variable name is assigned to but never used (F841)
Michael Fritch [Tue, 2 Feb 2021 17:42:36 +0000 (10:42 -0700)]
mgr/cephadm: Local variable name is assigned to but never used (F841)

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

4 years agomgr/cephadm: Line break occurred after a binary operator (W504)
Michael Fritch [Thu, 28 Jan 2021 20:16:04 +0000 (13:16 -0700)]
mgr/cephadm: Line break occurred after a binary operator (W504)

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

4 years agomgr/cephadm: Trailing whitespace (W291)
Michael Fritch [Thu, 28 Jan 2021 02:42:33 +0000 (19:42 -0700)]
mgr/cephadm: Trailing whitespace (W291)

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

4 years agomgr/cephadm: undefined name 'channel' (F821)
Michael Fritch [Thu, 28 Jan 2021 19:50:42 +0000 (12:50 -0700)]
mgr/cephadm: undefined name 'channel' (F821)

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

4 years agomgr/cephadm: use ==/!= to compare constant literals (F632)
Michael Fritch [Thu, 28 Jan 2021 18:24:57 +0000 (11:24 -0700)]
mgr/cephadm: use ==/!= to compare constant literals (F632)

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

4 years agomgr/cephadm: f-string is missing placeholders (F541)
Michael Fritch [Thu, 28 Jan 2021 19:43:10 +0000 (12:43 -0700)]
mgr/cephadm: f-string is missing placeholders (F541)

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

4 years agomgr/cephadm: Do not use variables named 'I', 'O', or 'l' (E741)
Michael Fritch [Thu, 28 Jan 2021 20:05:56 +0000 (13:05 -0700)]
mgr/cephadm: Do not use variables named 'I', 'O', or 'l' (E741)

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

4 years agomgr/cephadm: Do not assign a lambda expression, use a def (E731)
Michael Fritch [Thu, 28 Jan 2021 19:17:22 +0000 (12:17 -0700)]
mgr/cephadm: Do not assign a lambda expression, use a def (E731)

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

4 years agomgr/cephadm: Do not use bare except, specify exception instead (E722)
Michael Fritch [Thu, 28 Jan 2021 19:13:39 +0000 (12:13 -0700)]
mgr/cephadm: Do not use bare except, specify exception instead (E722)

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

4 years agomgr/cephadm: Comparison to true should be 'if cond is true:' or 'if cond:' (E712)
Michael Fritch [Thu, 28 Jan 2021 18:57:16 +0000 (11:57 -0700)]
mgr/cephadm: Comparison to true should be 'if cond is true:' or 'if cond:' (E712)

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

4 years agomgr/cephadm: Multiple statements on one line (def) (E704)
Michael Fritch [Thu, 28 Jan 2021 03:18:40 +0000 (20:18 -0700)]
mgr/cephadm: Multiple statements on one line (def) (E704)

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

4 years agomgr/cephadm: statement ends with a semicolon (E703)
Michael Fritch [Fri, 5 Feb 2021 18:13:40 +0000 (11:13 -0700)]
mgr/cephadm: statement ends with a semicolon (E703)

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

4 years agomgr/cephadm: Expected 1 blank line before a nested definition (E306)
Michael Fritch [Thu, 28 Jan 2021 03:16:05 +0000 (20:16 -0700)]
mgr/cephadm: Expected 1 blank line before a nested definition (E306)

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

4 years agomgr/cephadm: Expected 2 blank lines, found 0 (E302)
Michael Fritch [Thu, 28 Jan 2021 02:52:03 +0000 (19:52 -0700)]
mgr/cephadm: Expected 2 blank lines, found 0 (E302)

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

4 years agomgr/cephadm: at least two spaces before inline comment (E261)
Michael Fritch [Fri, 5 Feb 2021 18:13:05 +0000 (11:13 -0700)]
mgr/cephadm: at least two spaces before inline comment (E261)

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

4 years agomgr/cephadm: multiple spaces after ':' (E241)
Michael Fritch [Thu, 28 Jan 2021 19:45:10 +0000 (12:45 -0700)]
mgr/cephadm: multiple spaces after ':' (E241)

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

4 years agomgr/cephadm: Missing whitespace after ',', ';', or ':' (E231)
Michael Fritch [Thu, 28 Jan 2021 20:07:58 +0000 (13:07 -0700)]
mgr/cephadm: Missing whitespace after ',', ';', or ':' (E231)

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

4 years agomgr/cephadm: Missing whitespace around arithmetic operator (E226)
Michael Fritch [Thu, 28 Jan 2021 19:23:48 +0000 (12:23 -0700)]
mgr/cephadm: Missing whitespace around arithmetic operator (E226)

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

4 years agomgr/cephadm: Missing whitespace around operator (E225)
Michael Fritch [Thu, 28 Jan 2021 20:09:23 +0000 (13:09 -0700)]
mgr/cephadm: Missing whitespace around operator (E225)

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

4 years agomgr/cephadm: Continuation line under-indented for visual indent (E128)
Michael Fritch [Thu, 28 Jan 2021 18:55:43 +0000 (11:55 -0700)]
mgr/cephadm: Continuation line under-indented for visual indent (E128)

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

4 years agomgr/cephadm: Continuation line over-indented for hanging indent (E126)
Michael Fritch [Thu, 28 Jan 2021 03:15:03 +0000 (20:15 -0700)]
mgr/cephadm: Continuation line over-indented for hanging indent (E126)

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

4 years agomgr/cephadm: closing bracket does not match visual indentation (E124)
Michael Fritch [Thu, 4 Feb 2021 19:52:31 +0000 (12:52 -0700)]
mgr/cephadm: closing bracket does not match visual indentation (E124)

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

4 years agomgr/cephadm: Continuation line missing indentation or outdented (E122)
Michael Fritch [Thu, 28 Jan 2021 03:08:32 +0000 (20:08 -0700)]
mgr/cephadm: Continuation line missing indentation or outdented (E122)

also resolves:
continuation line unaligned for hanging indent (E131)

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

4 years agomgr/cephadm: Continuation line under-indented for hanging indent (E121)
Michael Fritch [Thu, 28 Jan 2021 03:02:27 +0000 (20:02 -0700)]
mgr/cephadm: Continuation line under-indented for hanging indent (E121)

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

4 years agomgr/cephadm: Indentation is not a multiple of four (comment) (E114)
Michael Fritch [Thu, 28 Jan 2021 03:00:16 +0000 (20:00 -0700)]
mgr/cephadm: Indentation is not a multiple of four (comment) (E114)

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

4 years agomgr/cephadm: introduce flake8
Michael Fritch [Tue, 26 Jan 2021 19:02:38 +0000 (12:02 -0700)]
mgr/cephadm: introduce flake8

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

Conflicts:
src/pybind/mgr/tox.ini

4 years agocephadm: do not cast subnet to unicode
Kefu Chai [Mon, 8 Feb 2021 08:27:44 +0000 (16:27 +0800)]
cephadm: do not cast subnet to unicode

this change addresses a regression introduced by
fe4f4402fbcd87667613640f2808d5d0e07e749d, which was tested before
abd9287db0e4f4f7873864119f5ce62519af1d48 got merged. and the former was
merged after abd9287db0e4f4f7873864119f5ce62519af1d48. hence the
regression.

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

4 years agomgr/cephadm: cleanup daemon keyring on failed daemon deploy
Sebastian Wagner [Wed, 3 Feb 2021 15:24:25 +0000 (16:24 +0100)]
mgr/cephadm: cleanup daemon keyring on failed daemon deploy

Fixes: https://tracker.ceph.com/issues/48164
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit f200cb26cc0d796c3af583e1d2bf72ec65213cd6)

4 years agomgr/cephadm:update test_orchestrator func signature
Paul Cuzner [Thu, 4 Feb 2021 23:05:05 +0000 (12:05 +1300)]
mgr/cephadm:update test_orchestrator func signature

The available signature has changed to 3 parms, so this
patch is needed to ensure it conforms.

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

4 years agomgr/cephadm:toleration fix for API consistency in dashboard
Paul Cuzner [Wed, 3 Feb 2021 19:57:16 +0000 (08:57 +1300)]
mgr/cephadm:toleration fix for API consistency in dashboard

The function signatire change to "available" needed a
patch to the dashboard>orchestratior interface. This patch
just tolerates the change - if or how to consume the
additional data from "available" is yet to be deternined.

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

4 years agomgr/cephadm:updates to support orch status changes
Paul Cuzner [Wed, 3 Feb 2021 01:45:15 +0000 (14:45 +1300)]
mgr/cephadm:updates to support orch status changes

The available function definition has been updated in
cephadm/rook and Orchestrator base class to provide a
module specific dictionary holding any specific info that
would be pertinent to share with the user. This in turn
changed the _status method for cephadm, but the UX
remains the same (i.e. admin must use --detail to see
the worker pool size).

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

Conflicts:
src/pybind/mgr/rook/module.py

4 years agomgr/orchestrator: resolve rebase issue
Paul Cuzner [Sun, 24 Jan 2021 21:40:54 +0000 (10:40 +1300)]
mgr/orchestrator: resolve rebase issue

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

4 years agomgr/orchestrator: rebase including the --detail
Paul Cuzner [Mon, 18 Jan 2021 22:01:08 +0000 (11:01 +1300)]
mgr/orchestrator: rebase including the --detail

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

4 years agomgr/orchestrator: removed worker_pool method
Paul Cuzner [Mon, 18 Jan 2021 21:57:14 +0000 (10:57 +1300)]
mgr/orchestrator: removed worker_pool method

The worker_pool_size method has been removed and its
functionality replaced by the cephadm 'available' function to
help keep the interface model generic.

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

4 years agomgr/orchestrator: doc updated to show optional parameter
Paul Cuzner [Mon, 18 Jan 2021 21:54:15 +0000 (10:54 +1300)]
mgr/orchestrator: doc updated to show optional parameter

Updated the orch status document to show the --detail option

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

4 years agomgr/orchestrator: rebase patch
Paul Cuzner [Wed, 23 Dec 2020 04:04:50 +0000 (17:04 +1300)]
mgr/orchestrator: rebase patch

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

4 years agocephadm: drop unicode alias
Kefu Chai [Sun, 31 Jan 2021 03:58:47 +0000 (11:58 +0800)]
cephadm: drop unicode alias

since we've dropped python 2 support

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

4 years agocephadm: drop support for python<3.3
Kefu Chai [Sun, 31 Jan 2021 03:55:25 +0000 (11:55 +0800)]
cephadm: drop support for python<3.3

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

4 years agocephadm: do not install ipaddress
Kefu Chai [Sun, 31 Jan 2021 03:47:07 +0000 (11:47 +0800)]
cephadm: do not install ipaddress

we dropped py2 env from tox in c8649eff0097635ad16778d2194b07d139ce806a

so no need to install ipaddress for python<3.3 anymore

this change also silences the warning like:

Ignoring ipaddress: markers 'python_version < "3.3"' don't match your
environment

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

4 years agomgr/cephadm: ok-to-stop for mgr
Daniel-Pivonka [Wed, 13 Jan 2021 21:40:52 +0000 (16:40 -0500)]
mgr/cephadm: ok-to-stop for mgr

depends on #38854

Signed-off-by: Daniel-Pivonka <dpivonka@redhat.com>
(cherry picked from commit 96dcb1547c77e03c04accd660defa586825d94cc)

4 years agomgr/orchestrator: useful message when no service type in "ceph orch apply"
Adam King [Wed, 3 Feb 2021 13:14:07 +0000 (08:14 -0500)]
mgr/orchestrator: useful message when no service type in "ceph orch apply"

Right now it just gives a traceback. A message telling users they have
not provided a proper service type would be more useful

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

4 years agomgr/cephadm: 'drive group' -> 'service'
Sage Weil [Wed, 3 Feb 2021 18:22:39 +0000 (12:22 -0600)]
mgr/cephadm: 'drive group' -> 'service'

...and add 'osd.' prefix

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

4 years agomgr/cephadm: only reapply osd spec if devices have changed
Sage Weil [Tue, 2 Feb 2021 23:09:15 +0000 (17:09 -0600)]
mgr/cephadm: only reapply osd spec if devices have changed

This avoids a lot of useless work when the devices have not changed.

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

4 years agomgr/cephadm: use datetime_now() for last_facts_update
Sage Weil [Tue, 2 Feb 2021 23:07:36 +0000 (17:07 -0600)]
mgr/cephadm: use datetime_now() for last_facts_update

Be consistent!

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

4 years agomgr/cephadm: track last_device_change
Sage Weil [Tue, 2 Feb 2021 19:46:44 +0000 (13:46 -0600)]
mgr/cephadm: track last_device_change

Keep track of when the device inventory and/or state *changes*.

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

4 years agomgr/cephadm: track last_applied by host for osd specs
Sage Weil [Tue, 2 Feb 2021 18:01:32 +0000 (12:01 -0600)]
mgr/cephadm: track last_applied by host for osd specs

For each host, note when we last applied each osdspec.  Log the start
time, not the end time.

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

4 years agomgr/cephadm: on ssh connection error, advice chmod 0600
Sebastian Wagner [Wed, 3 Feb 2021 12:56:09 +0000 (13:56 +0100)]
mgr/cephadm: on ssh connection error, advice chmod 0600

Fixes: https://tracker.ceph.com/issues/46551
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit e3fa11f40ebc28782c65b4f8ee5d69237eb63d7d)

4 years agoMerge PR #39563 into pacific
Sage Weil [Fri, 19 Feb 2021 21:43:05 +0000 (16:43 -0500)]
Merge PR #39563 into pacific

* refs/pull/39563/head:
qa/valgrind.supp: suppress free[] warnings
qa/suites: do not use notcmalloc flavor

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #39433 from liewegas/pr-39404-pacific
Yuri Weinstein [Fri, 19 Feb 2021 17:04:58 +0000 (09:04 -0800)]
Merge pull request #39433 from liewegas/pr-39404-pacific

pacific: qa/suites/upgrade/octopus-x/stress-split

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
4 years agoqa/valgrind.supp: suppress free[] warnings 39563/head
Sage Weil [Thu, 18 Feb 2021 18:04:16 +0000 (12:04 -0600)]
qa/valgrind.supp: suppress free[] warnings

This is apparently not going to get fixed any time soon.

https://github.com/gperftools/gperftools/issues/792

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

4 years agoqa/suites: do not use notcmalloc flavor
Sage Weil [Thu, 18 Feb 2021 22:00:59 +0000 (16:00 -0600)]
qa/suites: do not use notcmalloc flavor

teuthology now knows how to run valgrind against a tcmalloc binary

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

# Conflicts:
# qa/suites/rgw/verify/validater/valgrind.yaml
 - conflict on commented out line

4 years agoMerge pull request #39442 from rhcs-dashboard/wip-49270-pacific
Ernesto Puerta [Thu, 18 Feb 2021 16:07:47 +0000 (17:07 +0100)]
Merge pull request #39442 from rhcs-dashboard/wip-49270-pacific

pacific: mgr/dashboard: delete EOF when reading passwords from file

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #39485 from liewegas/pr-39282-pacific
Yuri Weinstein [Wed, 17 Feb 2021 20:15:31 +0000 (12:15 -0800)]
Merge pull request #39485 from liewegas/pr-39282-pacific

pacific: osdc,librados: set FULLY_TRY flag by ioctx, not globally

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #39484 from liewegas/pr-39283-pacific
Yuri Weinstein [Wed, 17 Feb 2021 19:50:50 +0000 (11:50 -0800)]
Merge pull request #39484 from liewegas/pr-39283-pacific

pacific: qa/suites/rados/dashboard: whitelist TELEMETRY_CHANGED

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #39500 from liewegas/pr-39496-pacific
Yuri Weinstein [Tue, 16 Feb 2021 22:56:10 +0000 (14:56 -0800)]
Merge pull request #39500 from liewegas/pr-39496-pacific

pacific: mgr/cephadm: fix host refresh

Reviewed-by: David Galloway <dgallowa@redhat.com>
4 years agoMerge pull request #39425 from rhcs-dashboard/wip-49254-pacific
Ernesto Puerta [Tue, 16 Feb 2021 19:49:07 +0000 (20:49 +0100)]
Merge pull request #39425 from rhcs-dashboard/wip-49254-pacific

pacific: mgr/dashboard: Automatically refresh crush map metadata table

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #39310 from liewegas/pr-39213-pacific
Yuri Weinstein [Tue, 16 Feb 2021 19:13:49 +0000 (11:13 -0800)]
Merge pull request #39310 from liewegas/pr-39213-pacific

pacific: qa/suites/upgrade/octopus-x/parallel: include cephfs in upgrade cluster

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
4 years agomgr/cephadm: fix host refresh 39500/head
Sage Weil [Tue, 16 Feb 2021 17:07:08 +0000 (11:07 -0600)]
mgr/cephadm: fix host refresh

Fixes: 01f60cf4e0a751c314120c02956d4ff941eb71b4
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 9df5a6d73ed21b394c01afe6c9800b6e50737c90)

4 years agoMerge PR #39437 into pacific
Patrick Donnelly [Mon, 15 Feb 2021 23:15:35 +0000 (15:15 -0800)]
Merge PR #39437 into pacific

* refs/pull/39437/head:
qa: Fix a few mgr/volume test cases

Reviewed-by: Ramana Raja <rraja@redhat.com>
4 years agoosdc/Objecter: remove pool_full_try interface 39485/head
Sage Weil [Wed, 3 Feb 2021 21:46:22 +0000 (16:46 -0500)]
osdc/Objecter: remove pool_full_try interface

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

4 years agolibrados: set FULL_TRY flag on ioctx, not objecter
Sage Weil [Wed, 3 Feb 2021 21:44:11 +0000 (16:44 -0500)]
librados: set FULL_TRY flag on ioctx, not objecter

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

4 years agolibrados/IoCtxImpl: pass extra_op_flags everywhere
Sage Weil [Wed, 3 Feb 2021 21:43:53 +0000 (16:43 -0500)]
librados/IoCtxImpl: pass extra_op_flags everywhere

Unused, so far...

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

4 years agoqa/suites/rados/dashboard: whitelist TELEMETRY_CHANGED 39484/head
Sage Weil [Wed, 3 Feb 2021 23:36:29 +0000 (17:36 -0600)]
qa/suites/rados/dashboard: whitelist TELEMETRY_CHANGED

test_enable_module_empty_license fiddles with this.

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

4 years agoMerge pull request #39232 from liewegas/pr-39212-pacific
Josh Durgin [Mon, 15 Feb 2021 17:52:46 +0000 (09:52 -0800)]
Merge pull request #39232 from liewegas/pr-39212-pacific

pacific: cpatch: updates

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge PR #39222 into pacific
Jan Fajerski [Mon, 15 Feb 2021 09:14:49 +0000 (10:14 +0100)]
Merge PR #39222 into pacific

* refs/pull/39222/head:
ceph-volume: Fix usage of is_lv

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Dimitri Savineau <dsavinea@redhat.com>
Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoMerge pull request #39179 from neha-ojha/wip-49058-pacific
Yuri Weinstein [Fri, 12 Feb 2021 18:14:48 +0000 (10:14 -0800)]
Merge pull request #39179 from neha-ojha/wip-49058-pacific

pacific: qa/*/thrash_cache_writeback_proxy_none.yaml: disable writeback overlay tests

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #39228 from ifed01/wip-ifed-fix-pin-pacific
Yuri Weinstein [Fri, 12 Feb 2021 16:17:07 +0000 (08:17 -0800)]
Merge pull request #39228 from ifed01/wip-ifed-fix-pin-pacific

pacific: os/bluestore: fix a bug causing unexpected Onode's unpinned state.

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #39218 from k0ste/wip-49006-pacific
Yuri Weinstein [Fri, 12 Feb 2021 16:16:25 +0000 (08:16 -0800)]
Merge pull request #39218 from k0ste/wip-49006-pacific

pacific: mgr: update mon metadata when monmap is updated

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #39214 from neha-ojha/wip-49087-pacific
Yuri Weinstein [Fri, 12 Feb 2021 16:15:31 +0000 (08:15 -0800)]
Merge pull request #39214 from neha-ojha/wip-49087-pacific

pacific: qa/suites/upgrade/nautilus-x-singleton: pin to 18.04

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #39180 from neha-ojha/wip-48986-pacific
Yuri Weinstein [Fri, 12 Feb 2021 16:15:03 +0000 (08:15 -0800)]
Merge pull request #39180 from neha-ojha/wip-48986-pacific

pacific: An empty bucket or OSD is not an error

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
4 years agoMerge pull request #39378 from sebastian-philipp/pacific-backport-39172-39097-39095...
Sebastian Wagner [Fri, 12 Feb 2021 15:20:55 +0000 (16:20 +0100)]
Merge pull request #39378 from sebastian-philipp/pacific-backport-39172-39097-39095-39143-39106-39200-38911-39069-39208-38927-

pacific: cephadm backport February (1)

Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
4 years agomgr/dashboard: delete EOF when reading passwords from file 39442/head
Alfonso Martínez [Tue, 9 Feb 2021 10:17:52 +0000 (11:17 +0100)]
mgr/dashboard: delete EOF when reading passwords from file

Signed-off-by: Alfonso Martínez <almartin@redhat.com>
(cherry picked from commit caeadf1397db00c6b7ba218b1910508099802e39)

4 years agoMerge pull request #39428 from dillaman/wip-49253-pacific
Jason Dillaman [Fri, 12 Feb 2021 13:15:47 +0000 (08:15 -0500)]
Merge pull request #39428 from dillaman/wip-49253-pacific

pacific: librbd: correct incremental deep-copy object-map inconsistencies

Reviewed-by: Mykola Golub <mgolub@suse.com>
4 years agoMerge pull request #39316 from petrutlucian94/wip-49155-pacific
Jason Dillaman [Fri, 12 Feb 2021 13:15:25 +0000 (08:15 -0500)]
Merge pull request #39316 from petrutlucian94/wip-49155-pacific

pacific: Windows RBD fixes

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #39305 from dillaman/wip-librbd-backports-pacific-3
Jason Dillaman [Fri, 12 Feb 2021 13:15:00 +0000 (08:15 -0500)]
Merge pull request #39305 from dillaman/wip-librbd-backports-pacific-3

pacific: librbd: miscellaneous backports

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
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 agoqa/suites/upgrade/octopus-x/stress-split: cephadm-based stress-split upgrade 39433/head
Sage Weil [Thu, 4 Feb 2021 18:56:49 +0000 (12:56 -0600)]
qa/suites/upgrade/octopus-x/stress-split: cephadm-based stress-split upgrade

Apply stress during upgrade, and also pause partway and do some
thrashing.

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

4 years agolibrbd: journal::StandardPolicy template defaults to ImageCtx 39305/head
Ilya Dryomov [Tue, 9 Feb 2021 13:04:39 +0000 (14:04 +0100)]
librbd: journal::StandardPolicy template defaults to ImageCtx

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

4 years agolibrbd: don't hold owner_lock for validate_image_removal()
Ilya Dryomov [Mon, 8 Feb 2021 16:01:47 +0000 (17:01 +0100)]
librbd: don't hold owner_lock for validate_image_removal()

handle_exclusive_lock() and handle_shut_down_exclusive_lock() call
validate_image_removal() without owner_lock held, so holding it in
shut_down_exclusive_lock() appears to be redundant.

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

4 years agolibrbd: treat EROFS as expected in handle_acquire_lock()
Ilya Dryomov [Sun, 7 Feb 2021 14:09:24 +0000 (15:09 +0100)]
librbd: treat EROFS as expected in handle_acquire_lock()

If the peer refuses to release exclusive lock (e.g. in case automatic
exclusive lock transitions are disabled), EROFS is retured.  Suppress
a rather confusing "Read-only file system" error message -- this case
is no different from EBUSY or EAGAIN.

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

4 years agolibrbd: refuse to release exclusive lock when removing
Ilya Dryomov [Sun, 7 Feb 2021 12:46:15 +0000 (13:46 +0100)]
librbd: refuse to release exclusive lock when removing

Commit 25c2ffe145be ("librbd: acquire exclusive lock from peer when
removing") changed PreRemoveRequest to request exclusive lock from the
peer instead of giving up and proceeding without exclusive lock.  This
caused one of the test cases that sometimes runs concurrent "rbd rm"
against the same image to fail intermittently, most often on assert

  ceph_assert(image_ctx.exclusive_lock == nullptr ||
              image_ctx.exclusive_lock->is_lock_owner());

because exclusive lock is now automatically transitioned to another
"rbd rm" on its request.

The root cause is older and probably goes back to when synchronous
librbd::remove() which held owner_lock across all operations including
trim_image() was converted to a set of state machines.  Since then, any
peer that requests exclusive lock (instead of trying once and backing
off) is able to mess with image removal.

Install StandardPolicy to disable automatic exclusive lock transitions
during image removal.

Fixes: https://tracker.ceph.com/issues/49226
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 707907ea3f6ff39968666af4ba718ceef8cd8953)