Commit Graph

47 Commits

Author SHA1 Message Date
Sage Weil
a1ee80fcf1 qa/tasks/mgr/test_orchestrator_cli: fix test
Signed-off-by: Sage Weil <sage@newdream.net>
2021-07-14 16:20:11 -04:00
Michael Fritch
60b99dcdc7
mgr/orch: add errno to OrchestratorError
add errno to OrchestratorError and ServiceSpecValidationError exceptions

Signed-off-by: Michael Fritch <mfritch@suse.com>
2020-07-28 15:54:46 -06:00
Kefu Chai
2c2b5e0c63 qa/tasks/mgr/test_orchestrator_cli: flake8 fixes
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-23 23:01:27 +08:00
Kefu Chai
7d37226548 qa/tasks/mgr: use relative import
for better readability, and to ease the pain of developer to track back
to the top level python package for referencing a submodule

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-27 14:51:24 +08:00
Kefu Chai
947a74349d qa: import with full path
to be py3 compatible

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-24 18:27:55 +08:00
Sage Weil
903f4590c3 mgr/orch,cephadm: elevate --force flag for daemons to interface
Apply this check in the generic orchestrator code so that it applies
consistently to all implementations.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-14 17:16:37 -05:00
Sage Weil
279cfb551f qa/tasks/mgr/test_orchestrator_cli: adapt
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-14 10:18:25 -05:00
Sage Weil
51b60a212e qa/tasks/mgr/test_orchestrator_cli: adjust placement args
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-06 21:27:48 -06:00
Sage Weil
8a84ddeaa8 Merge PR #33531 into master
* refs/pull/33531/head:
	qa/tasks/mgr/test_orchestrator_cli: fix test_ps* tests
	mgr/test_orchestrator: refactor listing services/daemons
	mgr/dashboard: list services and daemons

Reviewed-by: Tiago Melo <tmelo@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2020-03-05 13:20:21 -06:00
Sage Weil
bb126cf9ab qa/tasks/mgr/test_orchestrator_cli: fix test_ps* tests
The ps output names daemons like 'type.foo', e.g., 'mgr.x'.  Now that
the test_orchestrator impl is less bonkers this needs to be adjusted to
match reality.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-05 08:00:42 -06:00
Kefu Chai
e26a1cdee8 qa/tasks/test_orchestrator_cli: enable test_osd_create exception check
this reverts 9639acfefe, as the test does
make sense. what fails this test is the machinary to marshal/unmarshal
exception fails to handle un-picklable exceptions. the previous commit
is supposed to use a fallback to handle them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-04 01:52:02 +08:00
Sage Weil
114ef48739 qa/tasksmgr/test_orchestrator_cli: fix test_service_action
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-01 12:24:04 -06:00
Sage Weil
9639acfefe qa/tasks/test_orchestrator_cli: disable test_osd_create exception check
I'm not sure what behavior we want here...

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-01 11:15:51 -06:00
Sage Weil
1428f54490 qa/tasks/mgr/test_orchestrator_cli: update
Most of these were broken due to CLI changes weeks ago.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-29 17:37:18 -06:00
Sage Weil
5cf9676199 qa/tasks/mgr/test_orchestrator_cli: fix test_load_data
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-27 17:15:28 -06:00
Sage Weil
52bb5b84ac qa/tasks/mgr/test_orchestrator_cli: fix test_host_ls
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-21 19:16:06 -06:00
Sebastian Wagner
f2c5472286 mgr/orchestrator_cli: rename to mgr/orchestrator
* Move `mgr/orchestrator.py` to `orchestrator/_interface.py`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-02-17 10:24:01 +01:00
Kefu Chai
9000afb24b qa/tasks/mgr/orch: s/service ls/ps/
to fix the broken test of "test_load_data". it's a regression introduced
by aacc9a650f

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-15 18:41:18 +08:00
Sage Weil
aacc9a650f mgr/orch: service ls -> ps, add DaemonDescription
- We keep ServiceDescription around unmodified (although it will need some
  cleanup later)
- We add DaemonDescription, and clean out the service-related ambiguities
- Add a new list_daemons() method for Orchestrator
- Add a new 'ceph orch ps' command
- In cephadm, drop get_services(), and implement list_daemons()
  - a million changes to make this work
- Adjust health alert and option names

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-12 11:14:17 -06:00
Sage Weil
95ecaad0d5 mgr/orch: split out daemon_action from service_action
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-12 11:14:17 -06:00
Sage Weil
20205e70c4 mgr/orch: 'ceph orchestrator ...' -> 'ceph orch ...'
Less typing for all!

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-09 15:39:57 -06:00
Kiefer Chang
c9b12e2b66
qa/tasks/mgr/test_orchestrator_cli: support multiple DriveGroups
create_osds interface in Orchestrator supports multiple named DriveGroups
since https://github.com/ceph/ceph/pull/32972. Adapt the changes in
the test.

Fixes: https://tracker.ceph.com/issues/43945
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2020-02-04 14:31:21 +08:00
Kefu Chai
0150ac9daa
Merge pull request #32518 from tchaikov/wip-orchestrator-service-action-tests
qa/tasks/mgr/test_orchestrator_cli: fix service action tests

Reviewed-by: Thomas Bechtold <tbechtold@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
2020-01-07 17:44:10 +08:00
Kefu Chai
4c98b3224e qa/tasks/mgr/test_orchestrator_cli: fix service action tests
in b77f0c74a5, "reload"
service[-instance] action was dropped. so replace "reload" with
"restart" in the related tests.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-01-07 16:00:04 +08:00
Kefu Chai
37fd93d67e qa/tasks/mgr/test_orchestrator_cli: fix "mon update" test
we need at least one of "hosts" and "label" since
1498170aaa

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-26 16:31:47 +08:00
Sage Weil
2b2c122fd8 qa/tasks/mgr/test_orchestrator_cli: fix device ls test
No more "$host:" formatting as of 594179f1aa

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-20 16:14:34 -06:00
Thomas Bechtold
0127cd1e88 qa: Enable flake8 tox and fix failures
There were a couple of problems found by flake8 in the qa/
directory (most of them fixed now). Enabling flake8 during the usual
check runs hopefully avoids adding new issues in the future.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-12 10:21:01 +01:00
Sage Weil
99eb52b68a mgr/orchestrator_cli: make rgw rm take realm+zone
And adjust test accordingly

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-07 23:41:36 -06:00
Sage Weil
7e1f445422 qa/tasks/mgr/test_orchestrator_cli: fix rgw add test
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-07 08:14:59 -06:00
Sage Weil
fbee608dee qa/tasks/mgr/test_orchestrator_cli: test with valid network or IP
Passing 'network' will fail with

Error EINVAL: Failed to parse host list: '['host1:network', 'host2:network', 'host3:network']': u'network' does not appear to be an IPv4 or IPv6 address

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-06 21:26:13 -06:00
Kefu Chai
f7b43f6d40 qa/orchestrator: do not test "mon update 3 host1"
as the network in host spec is always required now

Fixes: https://tracker.ceph.com/issues/43132
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-05 13:25:54 +08:00
Kefu Chai
42579be473 mgr/orchestrator: add optional "format" param for "orchestrator host ls"
and update the test accordingly

Fixes: https://tracker.ceph.com/issues/43078
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-02 19:27:57 +08:00
Sebastian Wagner
6abc9e95bd qa/orchestrator: Adapt teuthology test to new completions
Also: Adapt mgr/test_orchestrator to new completions

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-11-27 13:38:20 +01:00
Sebastian Wagner
a70ec42cad mgr/orchestrator: Improve ceph CLI for blink lights
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-11-05 13:55:12 +01:00
Sebastian Wagner
157fb06fac mgr/orchestrator: check for DEVICE_{IDENT|FAULT}_ON
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-11-05 13:02:29 +01:00
Sebastian Wagner
b14ae26a69 mgr/orchestrator: Add interface and tests to device lights
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-11-05 13:02:29 +01:00
Kiefer Chang
be8edd2aec
mgr/test_orchestrator: Allow initializing dummy data
- Add test_orchestrator load_data command
- Add QA tests for loading data

Fixes: https://tracker.ceph.com/issues/41151

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2019-08-22 16:31:07 +08:00
Sebastian Wagner
fccbbb55c6 mgr/orchestrator: add progress events to all orchestrators
Now, progress events are part of `WriteCompletion` istead of part of the orchestrator module.

It does not yet provide a way to just show orchestrator events.

Also fixes issue in the SSH orchestrator

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-05-08 11:07:02 +02:00
Sebastian Wagner
61d53ed70e mgr/orchestrator: Add error handling to interface
Also:

* Small test_orchestrator refactorization
* Improved Docstring in MgrModule.remote
* Added `raise_if_exception` that raises Exceptions
* Added `OrchestratorError` and `OrchestratorValidationError`
* `_orchestrator_wait` no longer raises anything
* `volumes` model also calls `raise_if_exception`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-03-07 14:13:44 +01:00
Jeff Layton
a256735d4c mgr/orchestrator: allow scaling the NFS server count up and down
Add a new 'ceph orchestrator nfs update' command that will take the
NFS clustername and a new count as arguments. That will get translated
to a StatelessServiceSpec and passed to update_stateless_service.

Also, add the necessary stubs to the test_orchestrator and the CLI
QA test.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-03-06 07:15:14 -05:00
Sebastian Wagner
b8fe1554d3
Merge pull request #26346 from noahdesu/mgr-orch-cache-refresh
mgr/orch: refresh option for inventory query

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-02-13 11:13:52 +01:00
Noah Watkins
96c8a48010 pybind/orch: add refresh option to inventory query
allow a user of the orchestrator interface to express that the inventory
query should not read from any cached inventory state.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-02-11 15:27:21 -08:00
Sebastian Wagner
1139c127d6 mgr/orchestrator: add tests to host, mgr and mon mgmt
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-02-07 12:23:51 +01:00
Sebastian Wagner
d71a97b7fa mgr/orchestrator: make use of @CLICommand
Also Modified some command to allow multiple hosts
Also: Added more tests

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-02-05 11:27:47 +01:00
Sebastian Wagner
9e926e9927 mgr/orchestrator: Unify osd create and osd add
Also:

* Added some more tests
* Better validation of drive Groups
* Simplified `TestWriteCompletion`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-02-01 10:10:59 +01:00
Tim Serong
fa6cd8ae65 mgr/orchestrator_cli: Add service and service-instance start/stop/reload
Signed-off-by: Tim Serong <tserong@suse.com>
2019-01-15 17:11:06 +11:00
Sebastian Wagner
933b2cfc28 mgr/orchestrator: Add test orchestrator
1. To be able to run the cli without an external orchestrator.
2. Run the CLI in Teuthology.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-12-20 10:56:49 +01:00