]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
5 years agomgr/orch: Cleanup python imports of the interface 33914/head
Sebastian Wagner [Thu, 12 Mar 2020 12:03:56 +0000 (13:03 +0100)]
mgr/orch: Cleanup python imports of the interface

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agomgr/orch: Properly handle NotImplementedError
Sebastian Wagner [Thu, 12 Mar 2020 11:58:49 +0000 (12:58 +0100)]
mgr/orch: Properly handle NotImplementedError

They are masked as RuntimeError by the mgr.

Fixes: https://tracker.ceph.com/issues/44569
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agopybind/mgr: Rm PersistentStoreDict
Sebastian Wagner [Thu, 12 Mar 2020 11:50:02 +0000 (12:50 +0100)]
pybind/mgr: Rm PersistentStoreDict

`PersistentStoreDict` works great, except that is
too expensive to be used.

In addition, no one makes use of it.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agoMerge PR #33897 into octopus
Sage Weil [Thu, 12 Mar 2020 12:37:10 +0000 (07:37 -0500)]
Merge PR #33897 into octopus

* refs/pull/33897/head:
mgr/PyModule: initialize options on standby class too
Revert "pybind/mgr/mgr_module: fix standby module logging options"

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
5 years agoMerge PR #33870 into octopus
Sage Weil [Thu, 12 Mar 2020 11:37:19 +0000 (06:37 -0500)]
Merge PR #33870 into octopus

* refs/pull/33870/head:
mgr/cephadm: fix redeploy for the crash daemon
cephadm: prefer config/keyring args
cephadm: raise Error when no config/keyring
cephadm: consolidate logic for reading `config-json`
cephadm: merge `--config-and-keyring` and `--config-json` args

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
5 years agoMerge pull request #33831 from dillaman/wip-44396
Mykola Golub [Thu, 12 Mar 2020 09:53:04 +0000 (11:53 +0200)]
Merge pull request #33831 from dillaman/wip-44396

rbd-mirror: prevent I/O modifications against a non-primary image

Reviewed-by: Mykola Golub <mgolub@suse.com>
5 years agoMerge pull request #32419 from rhcs-dashboard/fix-43419-master
Lenz Grimmer [Thu, 12 Mar 2020 09:17:56 +0000 (10:17 +0100)]
Merge pull request #32419 from rhcs-dashboard/fix-43419-master

mgr/dashboard: add feature toggle for NFS and fix feature toggles regression

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
5 years agomgr/PyModule: initialize options on standby class too 33897/head
Sage Weil [Wed, 11 Mar 2020 17:14:59 +0000 (12:14 -0500)]
mgr/PyModule: initialize options on standby class too

Create a separate callback (_register_options) and call that on both
the regular MgrModule and MgrStandbyModule.

Fixes: https://tracker.ceph.com/issues/44562
Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33817 into octopus
Sage Weil [Thu, 12 Mar 2020 03:39:32 +0000 (22:39 -0500)]
Merge PR #33817 into octopus

* refs/pull/33817/head:
mgr/dashboard: Adapt tests to new DriveGroupSpec
fixup mgr/test_orchestrator: validate drive group matches anything.
mgr/orch: CLI: No Tracebacks for ServiceSpecValidationError
mgr/test_orchestrator: validate drive group matches anything.
python-common: don't run flake8 on tests.
python-common: Add support for legacy serialization format for Drive Groups
doc: Move Move ServiceSpec to python-common
python-common: Add `host_pattern` to `PlacementSpec.from_string()`
cephadm: add host_pattern to supported scheduling
python-common: Joined ServiceSpec and DriveGroupSpec from_json()
python-common: Make DriveGroupSpec a sub type of ServiceSpec
pybind/mgr: Move ServiceSpec to python-common: Fix imports
python-common, orch: Move ServiceSpec to python-common: Fix imports
python-common, orch: Move ServiceSpec tests to python-common
python-common: Move ServiceSpec to python-common: fix linting
python-common, orch: Move ServiceSpec (+deps) to python-common

Reviewed-by: Joshua Schmid <jschmid@suse.de>
5 years agoMerge PR #33895 into octopus
Sage Weil [Thu, 12 Mar 2020 03:39:15 +0000 (22:39 -0500)]
Merge PR #33895 into octopus

* refs/pull/33895/head:
cephadm: update unit.* atomically

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agocephadm: update unit.* atomically 33895/head
Sage Weil [Fri, 6 Mar 2020 23:43:33 +0000 (17:43 -0600)]
cephadm: update unit.* atomically

Some of these are run as bash scripts, which means that updating them
can lead to the running bash picking up at a weird position mid-script
when it goes to the next command.  This produces weird errors like

bash[9321]: /var/lib/ceph/f1758250-639e-11ea-9a42-001a4aab830c/mon.c/unit.run: line 2: -to-stderr=true: command not found

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: fix redeploy for the crash daemon 33870/head
Michael Fritch [Wed, 11 Mar 2020 19:59:24 +0000 (13:59 -0600)]
mgr/cephadm: fix redeploy for the crash daemon

`auth get` was using `crash.<name>` when it should have been
`client.crash.<name>`

Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agocephadm: prefer config/keyring args
Michael Fritch [Wed, 11 Mar 2020 01:28:52 +0000 (19:28 -0600)]
cephadm: prefer config/keyring args

let `--config` or `--keyring` take precedence over the values supplied
via the `--config-json`

Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agocephadm: raise Error when no config/keyring
Michael Fritch [Wed, 11 Mar 2020 01:28:35 +0000 (19:28 -0600)]
cephadm: raise Error when no config/keyring

fixes mypy error:
cephadm:1141: error: Incompatible return value type (got "Tuple[Optional[str], Optional[str]]", expected "Tuple[str, str]")

Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agocephadm: consolidate logic for reading `config-json`
Michael Fritch [Wed, 11 Mar 2020 01:28:30 +0000 (19:28 -0600)]
cephadm: consolidate logic for reading `config-json`

logic for reading `--config-json` from stdin or file was duplicated

Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agocephadm: merge `--config-and-keyring` and `--config-json` args
Michael Fritch [Wed, 11 Mar 2020 01:27:36 +0000 (19:27 -0600)]
cephadm: merge `--config-and-keyring` and `--config-json` args

both are passed via stdin from the mgr in a JSON format

Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agoMerge pull request #33848 from mchangir/octopus-tests-remove-suprious-whitespace 33885/head
Gregory Farnum [Wed, 11 Mar 2020 18:03:49 +0000 (11:03 -0700)]
Merge pull request #33848 from mchangir/octopus-tests-remove-suprious-whitespace

tests: remove spurious whitespace

5 years agoRevert "pybind/mgr/mgr_module: fix standby module logging options"
Sage Weil [Wed, 11 Mar 2020 17:15:19 +0000 (12:15 -0500)]
Revert "pybind/mgr/mgr_module: fix standby module logging options"

This reverts commit abcee7133b87d60c841ad2ed589858e4dd347ed8.

Breaks the reporting of these options up through the mgr daemon,
because PyModule::load_options() happens before the module ctor
excutes.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33746 into octopus
Sage Weil [Wed, 11 Mar 2020 14:41:28 +0000 (09:41 -0500)]
Merge PR #33746 into octopus

* refs/pull/33746/head:
cephadm: add grafana adopt

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agomgr/dashboard: add feature toggle for NFS 32419/head
Ernesto Puerta [Wed, 4 Mar 2020 20:31:50 +0000 (21:31 +0100)]
mgr/dashboard: add feature toggle for NFS

- New NFS feature toggle added.
- Fixed regression which broke FeatureToggles in the main menu.
- Added extensive unit testing to NavigationComponent
- Added ng-mocks to improve test isolation and performance (~7x, 139s to
20s)
- Added ng-bullet package to improve unit testing performance (2x, 20s
to 9s)
- Added Rxjs Schedulers to implement NgZone.runOutsideAngular in a Rxjs
friendly way (based on
    https://stackoverflow.com/questions/43121400/run-ngrx-effect-outside-of-angulars-zone-to-prevent-timeout-in-protractor)

Minor issues found from exhaustive unit testing:
- Missing permissions in Cluster menu:
  - `permissions.log.read` and `permissions.prometheus.read`
- Missing classes:
  - Block -> Images: `tc_submenuitem_block_images`
  - Block -> iSCSI: `tc_submenuitem_block_iscsi`
- Typos:
  - class `tc_submenuitem_hosts` assigned to OSD menu (instead of
      `tc_submenuitem_osd`)
  - `tc_menuitem_cephs` -> `tc_menuitem_cephfs`

Minor changes:
- Previously, Cluster Map -> CRUSH Map required both OSD and Host
permissions. Now it only requires OSD permissions (there are no
references to hosts in CRUSH Map page). Nevertheless, all system roles
setting OSD permission also set Host's, so no impact expected.
- Previously, Cluster -> Monitoring menu was hidden when both Prometheus
or Alertmanager weren't configured. Now it's displayed and when clicked
on it shows the helper banner indicating that further configuration is
required. This change removes the dependency on the PrometheusService.

Fixes: https://tracker.ceph.com/issues/43419
Fixes: https://tracker.ceph.com/issues/43715
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
5 years agoMerge PR #33830 into octopus
Sage Weil [Wed, 11 Mar 2020 13:55:51 +0000 (08:55 -0500)]
Merge PR #33830 into octopus

* refs/pull/33830/head:
qa/tasks/cephadm: no default mon|mgr|crash service specs
qa/suites/rados/cephadm/upgrade: upgrade start point that supports the no-spec option
cephadm: create initial mon and mgr service specs too
cephadm: no need to pregenerate a crash key for the bootstrap host
mgr/cephadm: do not complain when we don't have enough hosts
mgr/cephadm: remove orphan daemons
mgr/cephadm: report size=0 for fabricated ServiceDescription
mgr/cephadm: safety check to prevent removing all mon|mgr daemons
mgr/cephadm: prevent scaling mon|mgr below count=1
mgr/cephadm: do not remove daemons from remove_service

Reviewed-by: Sebastian Wagner <swagner@suse.com>
5 years agoMerge PR #33732 into octopus
Sage Weil [Wed, 11 Mar 2020 12:17:40 +0000 (07:17 -0500)]
Merge PR #33732 into octopus

* refs/pull/33732/head:
mon/MonClient: send logs to mon on separate schedule than pings
mon/MonClient: send logs to mon even if we have no keelalive2

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge PR #33620 into octopus
Sage Weil [Wed, 11 Mar 2020 12:12:11 +0000 (07:12 -0500)]
Merge PR #33620 into octopus

* refs/pull/33620/head:
mgr/dashboard: Crush rule modal
mgr/dashboard: Preserve rule selection on pool type change
mgr/dashboard: Crush rule is only send during replicated pool creation
mgr/dashboard: Explicit returns in pool form
mgr/dashboard: Removes fork join in pool form
mgr/dashboard: Hide ECP actions during ec pool edit
mgr/dashboard: Pool form erasure/replicated boolean
mgr/dashboard: Change pool info API endpoint
mgr/dashboard: Moves ECP info endpoint to UI-API

Reviewed-by: Tiago Melo <tmelo@suse.com>
5 years agotest/rbd: fix test_rbd.test_features_to_string 33831/head
Jason Dillaman [Wed, 11 Mar 2020 12:00:16 +0000 (08:00 -0400)]
test/rbd: fix test_rbd.test_features_to_string

The new RBD_FEATURE_NON_PRIMARY overlaps with the legacy test
for an invalid feature bit.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agoMerge pull request #33876 from tchaikov/octopus-cephadm-mypy
Kefu Chai [Wed, 11 Mar 2020 11:17:25 +0000 (19:17 +0800)]
Merge pull request #33876 from tchaikov/octopus-cephadm-mypy

cephadm: add "assert foo is not None" for mypy check

Reviewed-by: Sebastian Wagner <swagner@suse.com>
5 years agocephadm: add "assert foo is not None" for mypy check 33876/head
Kefu Chai [Wed, 11 Mar 2020 08:08:51 +0000 (16:08 +0800)]
cephadm: add "assert foo is not None" for mypy check

it's legit to pass file objects to fcntl(), but `Popen.stdout` and
`Popen.stderr` properies are not necessarily file objects -- they could be None.
this cannot be deduced at compile-time. even we can ensure this,
as we do pass `subprocess.PIPE` to the constructor. so mypy just
complains at seeing this:

```
cephadm:429: error: Argument 1 to "fcntl" has incompatible type "Optional[IO[Any]]"; expected "Union[int, HasFileno]"
cephadm:430: error: Argument 1 to "fcntl" has incompatible type "Optional[IO[Any]]"; expected "Union[int, HasFileno]"
cephadm:431: error: Argument 1 to "fcntl" has incompatible type "Optional[IO[Any]]"; expected "Union[int, HasFileno]"
cephadm:432: error: Argument 1 to "fcntl" has incompatible type "Optional[IO[Any]]"; expected "Union[int, HasFileno]"
cephadm:455: error: Item "None" of "Optional[IO[Any]]" has no attribute "fileno"
cephadm:465: error: Item "None" of "Optional[IO[Any]]" has no attribute "fileno"
cephadm:475: error: Item "None" of "Optional[IO[Any]]" has no attribute "fileno"
```

to silence this warning, insert `assert process.stdout is not None`
before accessing `process.stdout` to appease the strict optional
checking of mypy.

this is a follow-up fix of ee3fe37158422902162257c123ea234da999c961

Fixes: https://tracker.ceph.com/issues/44557
Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #33067 from tspmelo/wip-rbd-delete-with-snapshot
Lenz Grimmer [Wed, 11 Mar 2020 09:56:01 +0000 (10:56 +0100)]
Merge pull request #33067 from tspmelo/wip-rbd-delete-with-snapshot

mgr/dashboard: Allow deletion of RBD with snapshots

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
5 years agolibrbd: peer removal needs to open non-primary images in R/W mode
Jason Dillaman [Tue, 10 Mar 2020 23:18:04 +0000 (19:18 -0400)]
librbd: peer removal needs to open non-primary images in R/W mode

The non-primary image might have mirror snapshots that need to be
updated to remove the peer reference.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: race condition in image watcher notification callback
Jason Dillaman [Tue, 10 Mar 2020 17:31:34 +0000 (13:31 -0400)]
librbd: race condition in image watcher notification callback

If a refresh is in-progress when a header update notification is
received, the notification was previously incorrectly dropped.
This prevented rbd-mirror's snapshot-based mirroring replayer from
detecting updates in some cases.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: prevent 'non-primary' feature from being set via API
Jason Dillaman [Tue, 10 Mar 2020 03:41:26 +0000 (23:41 -0400)]
librbd: prevent 'non-primary' feature from being set via API

This feature is mutable from only within librbd as a mirrored image
is promoted/demoted.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agoqa/suites/rbd: exercise different snapshot-based mirroring image features
Jason Dillaman [Tue, 10 Mar 2020 03:01:47 +0000 (23:01 -0400)]
qa/suites/rbd: exercise different snapshot-based mirroring image features

Ensure that snapshot-based mirroring is tested in different RBD image
feature combinations.

Fixes: https://tracker.ceph.com/issues/44396
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agorbd-mirror: remove exclusive-lock requirement from snapshot purge
Jason Dillaman [Tue, 10 Mar 2020 02:47:49 +0000 (22:47 -0400)]
rbd-mirror: remove exclusive-lock requirement from snapshot purge

When using snapshot-based mirroring, there shouldn't be any need to
force the use of the exclusive-lock feature.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: enable mirroring for non-primary images w/o journaling
Jason Dillaman [Tue, 10 Mar 2020 02:26:13 +0000 (22:26 -0400)]
librbd: enable mirroring for non-primary images w/o journaling

The state machine was incorrectly skipping over the mirror enable
step for non-primary images when the journaling feature bit was not
enabled.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: properly copy primary mirror uuid to out param
Jason Dillaman [Tue, 10 Mar 2020 02:08:01 +0000 (22:08 -0400)]
librbd: properly copy primary mirror uuid to out param

This variable is not currently used in snapshot-based mirroring
mode but it should be populated for consistency.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agotest/rbd-mirror: snapshot-based replaying with different features
Jason Dillaman [Tue, 10 Mar 2020 01:38:58 +0000 (21:38 -0400)]
test/rbd-mirror: snapshot-based replaying with different features

The exclusive-lock and journaling features are not required for
snapshot-based mirroring.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: re-use mirror promote state machine when disabling
Jason Dillaman [Mon, 9 Mar 2020 22:32:03 +0000 (18:32 -0400)]
librbd: re-use mirror promote state machine when disabling

The promote state machine will handle remove the non-primary
feature bit and will ensure an interrupted disable operation
doesn't leave things in an inconsistent state.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: enable/disable implicit non-primary feature bit
Jason Dillaman [Mon, 9 Mar 2020 21:04:27 +0000 (17:04 -0400)]
librbd: enable/disable implicit non-primary feature bit

When promoted to primary, disable the non-primary feature bit and
when demoted (or created non-primary), enable the non-primary feature
bit. This will prevent all non rbd-mirror RBD clients from modifying
the RBD image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agorbd-mirror: permit R/W operations against non-primary image
Jason Dillaman [Mon, 9 Mar 2020 20:49:07 +0000 (16:49 -0400)]
rbd-mirror: permit R/W operations against non-primary image

With the non-primary feature bit is enabled, mask-out the read-only
feature bit that will be set in the refresh image state machine if
the image has that feature bit set. This will ensure that only the
rbd-mirror daemon will be able to modify a non-primary image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: track reason why ImageCtx is read-only
Jason Dillaman [Tue, 3 Mar 2020 20:17:52 +0000 (15:17 -0500)]
librbd: track reason why ImageCtx is read-only

This will be utilized by the RefreshRequest state machine to flag the image
as read-only if the new RBD_FEATURE_NON_PRIMARY feature is enabled. Also
allow that flag to be masked out by rbd-mirror daemon to permit IO and
operations against a non-primary image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agolibrbd: new RBD_FEATURE_NON_PRIMARY to prevent R/W IO
Jason Dillaman [Tue, 3 Mar 2020 20:01:35 +0000 (15:01 -0500)]
librbd: new RBD_FEATURE_NON_PRIMARY to prevent R/W IO

When a snapshot-based image is non-primary, we will need to use
this implicit feature to ensure that writes and maintenance
operations cannot be performed against the image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
5 years agocephadm: add grafana adopt 33746/head
Eric Jackson [Wed, 4 Mar 2020 22:39:28 +0000 (17:39 -0500)]
cephadm: add grafana adopt

Handle grafana.ini, provisioning config and cert.

Signed-off-by: Eric Jackson <swiftgist@gmail.com>
5 years agoMerge PR #33771 into octopus
Sage Weil [Tue, 10 Mar 2020 22:20:48 +0000 (17:20 -0500)]
Merge PR #33771 into octopus

* refs/pull/33771/head:
common/ceph_timer: Pass reference to waited time on stack
common/ceph_timer: Add test
common/ceph_timer: Use unique_function, allowing noncopyable events
common/ceph_timer: Couple cleanups
common/ceph_timer: Fix namespaces
common/ceph_timer: Add missing includes
common/ceph_timer.h: Don't indent contents of a namespace

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33850 into octopus
Sage Weil [Tue, 10 Mar 2020 22:20:11 +0000 (17:20 -0500)]
Merge PR #33850 into octopus

* refs/pull/33850/head:
spec: Podman (temporarily) requires apparmor-abstractions on suse

Reviewed-by: Sascha Grunert <sgrunert@suse.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Patrick Seidensal <pseidensal@suse.com>
5 years agoMerge PR #33853 into octopus
Sage Weil [Tue, 10 Mar 2020 22:19:20 +0000 (17:19 -0500)]
Merge PR #33853 into octopus

* refs/pull/33853/head:
mgr/cephadm: Make sure we don't co-locate the same daemon

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33857 into octopus
Sage Weil [Tue, 10 Mar 2020 22:18:47 +0000 (17:18 -0500)]
Merge PR #33857 into octopus

* refs/pull/33857/head:
cephadm: bootstrap: wait for mgr to restart after enabling a module
mgr: add 'mgr_status' tell command

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agoMerge PR #32990 into octopus
Sage Weil [Tue, 10 Mar 2020 21:28:02 +0000 (16:28 -0500)]
Merge PR #32990 into octopus

* refs/pull/32990/head:
cephadm: flag dashboard user to change password

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
5 years agoMerge PR #33713 into octopus
Sage Weil [Tue, 10 Mar 2020 21:27:48 +0000 (16:27 -0500)]
Merge PR #33713 into octopus

* refs/pull/33713/head:
mgr/cephadm: add _remove_osds_bg back to main loop
mgr/cephadm/osd: update removal report immediately

Reviewed-by: Joshua Schmid <jschmid@suse.de>
5 years agoMerge PR #33838 into octopus
Sage Weil [Tue, 10 Mar 2020 21:26:57 +0000 (16:26 -0500)]
Merge PR #33838 into octopus

* refs/pull/33838/head:
mgr/cephadm: fix service list filtering

Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoqa/tasks/cephadm: no default mon|mgr|crash service specs 33830/head
Sage Weil [Mon, 9 Mar 2020 18:45:10 +0000 (13:45 -0500)]
qa/tasks/cephadm: no default mon|mgr|crash service specs

The service wants to create daemons manually and explicitly.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoqa/suites/rados/cephadm/upgrade: upgrade start point that supports the no-spec option
Sage Weil [Mon, 9 Mar 2020 21:22:28 +0000 (16:22 -0500)]
qa/suites/rados/cephadm/upgrade: upgrade start point that supports the no-spec option

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33832 into octopus
Sage Weil [Tue, 10 Mar 2020 16:07:36 +0000 (11:07 -0500)]
Merge PR #33832 into octopus

* refs/pull/33832/head:
Revert "Merge pull request #33673 from cbodley/wip-denc-enum"

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
5 years agocephadm: bootstrap: wait for mgr to restart after enabling a module 33857/head
Sage Weil [Tue, 10 Mar 2020 14:28:57 +0000 (09:28 -0500)]
cephadm: bootstrap: wait for mgr to restart after enabling a module

It was possible to enable a module (mon updates mgrmap) and then
do a mgr command and have that command reach the mgr before it got the
latest mgrmap and restarted.

Fixes: https://tracker.ceph.com/issues/44531
Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr: add 'mgr_status' tell command
Sage Weil [Tue, 10 Mar 2020 14:26:22 +0000 (09:26 -0500)]
mgr: add 'mgr_status' tell command

For now just dump the mgrmap_epoch

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge pull request #33839 from rhcs-dashboard/44538-fix-rgw-grafana-get-put-latencies
Lenz Grimmer [Tue, 10 Mar 2020 14:29:58 +0000 (15:29 +0100)]
Merge pull request #33839 from rhcs-dashboard/44538-fix-rgw-grafana-get-put-latencies

monitoring: fix RGW grafana chart 'Average GET/PUT Latencies'

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Patrick Seidensal <pnawracay@suse.com>
5 years agoMerge pull request #33743 from votdev/issue_43869_fix_qa_test
Lenz Grimmer [Tue, 10 Mar 2020 14:25:50 +0000 (15:25 +0100)]
Merge pull request #33743 from votdev/issue_43869_fix_qa_test

mgr/dashboard: Refactor and cleanup tasks.mgr.dashboard.test_user

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
5 years agocephadm: create initial mon and mgr service specs too
Sage Weil [Mon, 9 Mar 2020 18:41:56 +0000 (13:41 -0500)]
cephadm: create initial mon and mgr service specs too

These will get the default placement.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agocephadm: no need to pregenerate a crash key for the bootstrap host
Sage Weil [Mon, 9 Mar 2020 18:40:22 +0000 (13:40 -0500)]
cephadm: no need to pregenerate a crash key for the bootstrap host

mgr/cephadm can do this later when it deploys the crash daemon(s).

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: do not complain when we don't have enough hosts
Sage Weil [Mon, 9 Mar 2020 18:39:04 +0000 (13:39 -0500)]
mgr/cephadm: do not complain when we don't have enough hosts

This gets rid of INFO level log events like

2020-03-09T13:37:20.980993-0500 mgr.x [WRN] Failed to apply mds.foo spec ServiceSpec({'placement': PlacementSpec(count:2), 'service_type': 'mds', 'service_id': 'foo'}): List of host candidates is empty

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: remove orphan daemons
Sage Weil [Mon, 9 Mar 2020 18:36:59 +0000 (13:36 -0500)]
mgr/cephadm: remove orphan daemons

...as long as they're not mon|mgr|osd.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: report size=0 for fabricated ServiceDescription
Sage Weil [Mon, 9 Mar 2020 18:36:42 +0000 (13:36 -0500)]
mgr/cephadm: report size=0 for fabricated ServiceDescription

When we fabricate a ServiceDescription for an orphan daemon, set the
size == 0.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: safety check to prevent removing all mon|mgr daemons
Sage Weil [Mon, 9 Mar 2020 18:21:20 +0000 (13:21 -0500)]
mgr/cephadm: safety check to prevent removing all mon|mgr daemons

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: prevent scaling mon|mgr below count=1
Sage Weil [Mon, 9 Mar 2020 18:18:19 +0000 (13:18 -0500)]
mgr/cephadm: prevent scaling mon|mgr below count=1

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: do not remove daemons from remove_service
Sage Weil [Mon, 9 Mar 2020 18:15:49 +0000 (13:15 -0500)]
mgr/cephadm: do not remove daemons from remove_service

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge pull request #33805 from tchaikov/wip-44500
Kefu Chai [Tue, 10 Mar 2020 13:26:29 +0000 (21:26 +0800)]
Merge pull request #33805 from tchaikov/wip-44500

qa/tasks/ceph_manager: capture stderr for COT

Reviewed-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
5 years agomgr/dashboard: Adapt tests to new DriveGroupSpec 33817/head
Sebastian Wagner [Tue, 10 Mar 2020 12:38:36 +0000 (13:38 +0100)]
mgr/dashboard: Adapt tests to new DriveGroupSpec

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agospec: Podman (temporarily) requires apparmor-abstractions on suse 33850/head
Sebastian Wagner [Tue, 10 Mar 2020 11:51:25 +0000 (12:51 +0100)]
spec: Podman (temporarily) requires apparmor-abstractions on suse

`apparmor-abstractions` contains a profile that is required to run podman containers.

Fixes: https://tracker.ceph.com/issues/44272
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agomgr/cephadm: Make sure we don't co-locate the same daemon 33853/head
Sebastian Wagner [Tue, 10 Mar 2020 12:54:08 +0000 (13:54 +0100)]
mgr/cephadm: Make sure we don't co-locate the same daemon

Fixes: https://tracker.ceph.com/issues/44397
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agofixup mgr/test_orchestrator: validate drive group matches anything.
Sebastian Wagner [Tue, 10 Mar 2020 11:21:09 +0000 (12:21 +0100)]
fixup mgr/test_orchestrator: validate drive group matches anything.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agomgr/orch: CLI: No Tracebacks for ServiceSpecValidationError
Sebastian Wagner [Tue, 10 Mar 2020 09:57:45 +0000 (10:57 +0100)]
mgr/orch: CLI: No Tracebacks for ServiceSpecValidationError

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agomgr/test_orchestrator: validate drive group matches anything.
Sebastian Wagner [Tue, 10 Mar 2020 09:54:20 +0000 (10:54 +0100)]
mgr/test_orchestrator: validate drive group matches anything.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agopython-common: don't run flake8 on tests.
Sebastian Wagner [Tue, 10 Mar 2020 09:38:04 +0000 (10:38 +0100)]
python-common: don't run flake8 on tests.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agopython-common: Add support for legacy serialization format for Drive Groups
Sebastian Wagner [Mon, 9 Mar 2020 16:39:38 +0000 (17:39 +0100)]
python-common: Add support for legacy serialization format for Drive Groups

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agodoc: Move Move ServiceSpec to python-common
Sebastian Wagner [Mon, 9 Mar 2020 16:15:21 +0000 (17:15 +0100)]
doc: Move Move ServiceSpec to python-common

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agopython-common: Add `host_pattern` to `PlacementSpec.from_string()`
Sebastian Wagner [Mon, 9 Mar 2020 16:08:57 +0000 (17:08 +0100)]
python-common: Add `host_pattern` to `PlacementSpec.from_string()`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agocephadm: add host_pattern to supported scheduling
Sebastian Wagner [Mon, 9 Mar 2020 14:26:31 +0000 (15:26 +0100)]
cephadm: add host_pattern to supported scheduling

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agopython-common: Joined ServiceSpec and DriveGroupSpec from_json()
Sebastian Wagner [Mon, 9 Mar 2020 13:51:09 +0000 (14:51 +0100)]
python-common: Joined ServiceSpec and DriveGroupSpec from_json()

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agopython-common: Make DriveGroupSpec a sub type of ServiceSpec
Sebastian Wagner [Mon, 9 Mar 2020 12:40:06 +0000 (13:40 +0100)]
python-common: Make DriveGroupSpec a sub type of ServiceSpec

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agopybind/mgr: Move ServiceSpec to python-common: Fix imports
Sebastian Wagner [Mon, 9 Mar 2020 12:07:12 +0000 (13:07 +0100)]
pybind/mgr: Move ServiceSpec to python-common: Fix imports

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agopython-common, orch: Move ServiceSpec to python-common: Fix imports
Sebastian Wagner [Mon, 9 Mar 2020 11:58:52 +0000 (12:58 +0100)]
python-common, orch: Move ServiceSpec to python-common: Fix imports

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agopython-common, orch: Move ServiceSpec tests to python-common
Sebastian Wagner [Mon, 9 Mar 2020 11:46:01 +0000 (12:46 +0100)]
python-common, orch: Move ServiceSpec tests to python-common

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agopython-common: Move ServiceSpec to python-common: fix linting
Sebastian Wagner [Tue, 10 Mar 2020 09:33:14 +0000 (10:33 +0100)]
python-common: Move ServiceSpec to python-common: fix linting

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agopython-common, orch: Move ServiceSpec (+deps) to python-common
Sebastian Wagner [Mon, 9 Mar 2020 11:41:34 +0000 (12:41 +0100)]
python-common, orch: Move ServiceSpec (+deps) to python-common

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agomonitoring: fix RGW grafana chart 'Average GET/PUT Latencies' 33839/head
Alfonso Martínez [Tue, 10 Mar 2020 11:05:26 +0000 (12:05 +0100)]
monitoring: fix RGW grafana chart 'Average GET/PUT Latencies'

Fixes: https://tracker.ceph.com/issues/44538
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
5 years agotests: remove spurious whitespace 33846/head 33848/head
Milind Changire [Tue, 10 Mar 2020 10:41:07 +0000 (16:11 +0530)]
tests: remove spurious whitespace

remove spurious whitespace from test_snapshot.py

Fixes: https://tracker.ceph.com/issues/44528
Signed-off-by: Milind Changire <mchangir@redhat.com>
5 years agomgr/cephadm: fix service list filtering 33838/head
Kiefer Chang [Tue, 10 Mar 2020 07:22:40 +0000 (15:22 +0800)]
mgr/cephadm: fix service list filtering

We should apply filters on ServiceSpecs in store too, or services are
returned even filters are applied during collecting daemons.

Fixes: https://tracker.ceph.com/issues/44512
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
5 years agoMerge PR #33825 into octopus
Sage Weil [Tue, 10 Mar 2020 03:42:05 +0000 (22:42 -0500)]
Merge PR #33825 into octopus

* refs/pull/33825/head:
cephadm: bootstrap: tolerate error return from -h
ceph.in: only shut down rados on clean exit

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge PR #33811 into octopus
Sage Weil [Tue, 10 Mar 2020 03:26:41 +0000 (22:26 -0500)]
Merge PR #33811 into octopus

* refs/pull/33811/head:
mgr/cephadm: fix upgrade order

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agoRevert "Merge pull request #33673 from cbodley/wip-denc-enum" 33832/head
Sage Weil [Tue, 10 Mar 2020 03:23:47 +0000 (22:23 -0500)]
Revert "Merge pull request #33673 from cbodley/wip-denc-enum"

This reverts commit 1041092696c2e3c9ee4e32b764ead06f5bc1f694, reversing
changes made to c2f584f32a9619b39d53178c2327dc26b3a2a27c.

This changed the encoding for certain types.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/cephadm: fix upgrade order 33811/head
Sage Weil [Mon, 9 Mar 2020 01:38:59 +0000 (20:38 -0500)]
mgr/cephadm: fix upgrade order

Create two variables, CEPH_TYPES and CEPH_UPGRADE_ORDER.  In reality they
are both the same, but this way the meaning is clear, and they lists
won't get out of sync (they should always have the same elements).

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33801 into octopus
Sage Weil [Mon, 9 Mar 2020 21:25:57 +0000 (16:25 -0500)]
Merge PR #33801 into octopus

* refs/pull/33801/head:
qa/suites/rados/ceph: drop opensuse for now

Reviewed-by: Nathan Cutler <ncutler@suse.com>
5 years agoMerge PR #33822 into octopus
Sage Weil [Mon, 9 Mar 2020 20:46:57 +0000 (15:46 -0500)]
Merge PR #33822 into octopus

* refs/pull/33822/head:
cephadm: use `sh` instead of `bash` during enter

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agocephadm: bootstrap: tolerate error return from -h 33825/head
Sage Weil [Mon, 9 Mar 2020 20:45:36 +0000 (15:45 -0500)]
cephadm: bootstrap: tolerate error return from -h

Sometimes we time out connecting to the mon to get commands and return
an error code.

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

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #33809 into octopus
Sage Weil [Mon, 9 Mar 2020 20:28:19 +0000 (15:28 -0500)]
Merge PR #33809 into octopus

* refs/pull/33809/head:
qa/standalone/scrub/osd-scrub-repair: force osdmap prop to osds
qa/standalone/scrub/osd-scrub-test: wait longer for update

Reviewed-by: David Zafman <dzafman@redhat.com>
5 years agoMerge PR #32678 into octopus
Sage Weil [Mon, 9 Mar 2020 19:09:00 +0000 (14:09 -0500)]
Merge PR #32678 into octopus

* refs/pull/32678/head:
mgr/dashboard: support multiple DriveGroups when creating OSDs

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
5 years agocephadm: use `sh` instead of `bash` during enter 33822/head
Michael Fritch [Mon, 9 Mar 2020 16:00:07 +0000 (10:00 -0600)]
cephadm: use `sh` instead of `bash` during enter

not all container images use bash (e.g. node-exporter etc)

Signed-off-by: Michael Fritch <mfritch@suse.com>
5 years agoceph.in: only shut down rados on clean exit
Sage Weil [Mon, 9 Mar 2020 17:26:06 +0000 (12:26 -0500)]
ceph.in: only shut down rados on clean exit

If we exit due to a timeout, then calling rados shutdown can lead to all
sorts of problems, because we may still have another thread that is
trying to call rados_connect and/or do some work, and rados_connect
and rados_shutdown don't (and can't!) really behave well when racing
against each other.

Note that shutdown here isn't that important--the process is about to
exit anyway.  It's only useful to exercise the shutdown code path more
often.

Fixes: https://tracker.ceph.com/issues/44526
Signed-off-by: Sage Weil <sage@redhat.com>
5 years agocommon/ceph_timer: Pass reference to waited time on stack 33771/head
Adam C. Emerson [Fri, 6 Mar 2020 03:14:47 +0000 (22:14 -0500)]
common/ceph_timer: Pass reference to waited time on stack

std::condition_variable::wait_until takes a const reference to a
time_point. It may access this reference after relinquishing the
mutex, creating a potential use-after-free error if the first event is
shut down.

So, just copy the time onto the stack, so we have a reference that
won't disappear.

https://tracker.ceph.com/issues/44373

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
5 years agocommon/ceph_timer: Add test
Adam C. Emerson [Fri, 6 Mar 2020 02:45:11 +0000 (21:45 -0500)]
common/ceph_timer: Add test

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
5 years agocommon/ceph_timer: Use unique_function, allowing noncopyable events
Adam C. Emerson [Fri, 6 Mar 2020 02:15:25 +0000 (21:15 -0500)]
common/ceph_timer: Use unique_function, allowing noncopyable events

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
5 years agocommon/ceph_timer: Couple cleanups
Adam C. Emerson [Thu, 5 Mar 2020 22:57:41 +0000 (17:57 -0500)]
common/ceph_timer: Couple cleanups

Take advantage of a couple things in Boost.Intrusive that make the
code less obfuscated.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>