Commit Graph

6475 Commits

Author SHA1 Message Date
Sage Weil
23e78df615 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>
2020-03-11 08:55:51 -05:00
Sage Weil
07aba4deb9 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>
2020-03-11 07:12:11 -05:00
Lenz Grimmer
108cc47c49
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>
2020-03-11 10:56:01 +01:00
Sage Weil
6885cbc94b 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>
2020-03-10 15:38:52 -05:00
Sage Weil
90b52cba91 qa/suites/rados/cephadm/upgrade: upgrade start point that supports the no-spec option
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-10 15:38:52 -05:00
Lenz Grimmer
1c7449414f
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>
2020-03-10 15:25:50 +01:00
Kefu Chai
9039db5962
Merge pull request #33805 from tchaikov/wip-44500
qa/tasks/ceph_manager: capture stderr for COT

Reviewed-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-03-10 21:26:29 +08:00
Sage Weil
090288fa3e Merge PR #33801 into octopus
* refs/pull/33801/head:
	qa/suites/rados/ceph: drop opensuse for now

Reviewed-by: Nathan Cutler <ncutler@suse.com>
2020-03-09 16:25:57 -05:00
Sage Weil
3212932ba1 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>
2020-03-09 15:28:19 -05:00
Sage Weil
cf38372782 Merge PR #32678 into octopus
* refs/pull/32678/head:
	mgr/dashboard: support multiple DriveGroups when creating OSDs

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
2020-03-09 14:09:00 -05:00
Sage Weil
5206bfbd48 Merge PR #33793 into master
* refs/pull/33793/head:
	qa/suites/rados/cephadm/upgrade: new start point
	qa/tasks/cephadm: put bootstrap config etc directly in /etc/ceph
	cephadm: shell: default to config and keyring in /etc/ceph, if present

Reviewed-by: Ricardo Marques <rimarques@suse.com>
2020-03-09 08:28:57 -05:00
Stephan Müller
f26b4b23fd mgr/dashboard: Crush rule modal
Now a crush rule can be created and deleted through the pool form,
similar to the ECP profile.

The creation form is somewhat more intelligent as it checks the crush
map to help create a usable rule, with only a few clicks
through preselections.

Fixes: https://tracker.ceph.com/issues/43260
Signed-off-by: Stephan Müller <smueller@suse.com>
2020-03-09 12:35:58 +01:00
Stephan Müller
2ff8540c81 mgr/dashboard: Change pool info API endpoint
Moves the "_info" endpoint of pool into an equivalent
UI-API call with the name "info".

Added three more attributes to the info dict which enables the dashboard
to only call info to get all the needed data, currently three calls will
be used to do that.

Removed pool_name parameter as the outcome was not used.

Updated the tests and related angular files accordingly.

Fixes: https://tracker.ceph.com/issues/44371
Signed-off-by: Stephan Müller <smueller@suse.com>
2020-03-09 12:35:58 +01:00
Stephan Müller
3e400f6a0b mgr/dashboard: Moves ECP info endpoint to UI-API
Moves the "_info" endpoint of erasure code profile into an equivalent
UI-API call with the name "info".

The serialization of the profile was outsourced into "ceph-service" as
it's used somewhere else (follow up commit).

Removed unused methods in angular service and REST controller.

Fixed path in angular service.

Fixes: https://tracker.ceph.com/issues/44371
Signed-off-by: Stephan Müller <smueller@suse.com>
2020-03-09 12:35:57 +01:00
Sage Weil
78b24f5783 Merge PR #33776 into master
* refs/pull/33776/head:
	test: Add flush_pg_stats to avoid race with getting num_shards_repaired

Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-03-08 22:05:52 -05:00
Kefu Chai
d8d44ed156 qa/tasks/ceph_manager: use StringIO for capturing COT output
there are couple factors we should consider when choosing between
BytesIO and StringIO:

- if the producer is producing binary
- if we are expecting binary
- if the layers in between them are doing the decoding/encoding
  automatically.

in our case, the producer is either the ChannelFile instances returned
by paramiko.SSHClient or subprocess.CompletedProcess insances returned
by subprocess.run(). the former are file-like objects opened in "r" mode,
but their contents are decoded with utf-8 when reading if
ChannelFile.FLAG_BINARY is not specified. that's why we always try to
add this flag in orchestra/run.py when collecting the stdout and stderr
from paramiko.SSHClient after executing a command.

back in python2, this works just fine. as we don't differentiate bytes
from str by then.

but in python3, we have to make a decision. in the case of
ceph-objectstore-tool (COT for short), it does not produce binary and
we don't check its output with binary, so, if neither Remote.run() nor
LocalRemote.run() decodes/encodes for us, it's fine.

so it boils down to `copy_to_log()`:

i think we we should respect the consumer's expectation, and only decode
the output if a StringIO is passed in as stdout or stderr.

as we always log the output with logging we could either set
`ChannelFile.FLAG_BINARY` depending on the type of `capture` or not.
if it's not set, paramiko will return str (bytes) on python2, and str on
python3. if it's not set paramiko will return str (bytes) on python2,
and bytes on python3.

if there is non-ASCII in the output, logging will bail fail with
`UnicodeDecodeError` exception. and paramiko throws the same exception
when trying to decode for us if `ChannelFile.FLAG_BINARY` is not
specified.

so to ensure that we always have logging messages no matter if the
producer follows the rule of "use StringIO if you only emit text" or
not, we have to use `ChannelFile.FLAG_BINARY`, and force paramiko
to send us the bytes. but we still have the luxury to use StringIO
and do the decode when the caller asks for str explicitly. that'd save
the pain of using `str.decode()` or `six.ensure_str()` everywhere
even if we can assure that the program does not write binary.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-09 10:47:48 +08:00
Sage Weil
0447ed0ff9 qa/standalone/scrub/osd-scrub-repair: force osdmap prop to osds
flush_pg_stats isn't sufficient to ensure that OSDs have the latest
OSDMap.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-08 14:52:10 -05:00
Sage Weil
ac9befd450 qa/standalone/scrub/osd-scrub-test: wait longer for update
Fixes: https://tracker.ceph.com/issues/43865
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-08 14:45:00 -05:00
Ramana Raja
746a2a9180
Merge pull request #33788 from ajarr/wip-44438
test_volumes: fix _verify_clone_attrs call

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2020-03-08 23:06:50 +05:30
Kefu Chai
78308f7207 qa/tasks/ceph_manager: capture stderr for COT
as we are expecting the error message written to stderr, and we need to
check for the error messages in it.

this change addresses the regression introduced by
204ceee156

Fixes: https://tracker.ceph.com/issues/44500
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-08 14:43:13 +08:00
Sage Weil
b6084c333d qa/suites/rados/cephadm/upgrade: new start point
The starting cephadm needs to look for default ceph.conf etc in /etc/ceph
for cephadm.py to be happy.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-07 15:19:07 -06:00
Sage Weil
96220c0c05 qa/tasks/cephadm: put bootstrap config etc directly in /etc/ceph
This puts the conf and keyring in /etc/ceph earlier rather than later,
making them useful for debugging a live system *during* bootstrap.  It's
also less code.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-07 15:18:45 -06:00
Sage Weil
af30e245dc qa/suites/rados/ceph: drop opensuse for now
Until https://tracker.ceph.com/issues/44501 is resolved and the builders
are able to keep up.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-07 08:23:20 -06:00
Sage Weil
bfb03adbe6 qa/suites/rados/cephadm/upgrade: adjust starting version
This version understands how to apply a mgr spec like '2;host=x' with a
semicolon.  This particular test build does.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-07 06:42:07 -06: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
6e764e1a36 qa/tasks/cephadm: pass apply placement as a single arg
Use ';' as a separator, although ' ' would also work.  ',' would not
when msgr v2 addrs are in use.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-06 21:27:48 -06:00
Sage Weil
4e7ab6f2e6 qa/suites/rados/cephadm: deploy all monitoring components
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-06 15:51:45 -06:00
Ramana Raja
d2e327c41c test_volumes: fix _verify_clone_attrs call
... to verify the attributes of clone and source subvolume belonging
to different subvolume groups.

Introduced in e22d546beb

Fixes: https://tracker.ceph.com/issues/44438
Signed-off-by: Ramana Raja <rraja@redhat.com>
2020-03-06 21:17:26 +05:30
Tiago Melo
5627919c01 mgr/dashboard: Allow removing RBD with snapshots
Fixes: https://tracker.ceph.com/issues/36404

Signed-off-by: Tiago Melo <tmelo@suse.com>
2020-03-06 13:18:15 -01:00
Sage Weil
6fbd5d21e8 qa/tasks/cephadm: deploy other monitoring components
Grafana and alertmanager.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-06 13:32:57 +00:00
Sage Weil
31a7a46138 Merge PR #33757 into master
* refs/pull/33757/head:
	qa/valgrind.supp: abstract from ceph::buffer's symbol versioning.

Reviewed-by: Sage Weil <sage@redhat.com>
2020-03-06 07:17:45 -06:00
Volker Theile
4cc2e1a15b mgr/dashboard: Refactor and cleanup tasks.mgr.dashboard.test_user
* Improve @DashboardTestCase.RunAs decorator
* Use command line to create the test user in the 'test_pwd_expiration_date_update' test case.
* Test return codes of various REST API calls.

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

Signed-off-by: Volker Theile <vtheile@suse.com>
2020-03-06 09:24:16 +01:00
David Zafman
e509b7c7d0 test: Add flush_pg_stats to avoid race with getting num_shards_repaired
Fixes: https://tracker.ceph.com/issues/44439

Signed-off-by: David Zafman <dzafman@redhat.com>
2020-03-06 04:25:37 +00:00
Kefu Chai
da736c22c5 qa/tasks/ceph.py: quote "<kind>" in command line
otherwise bash will intepret "kind" as a file when handling command like
```
sudo zgrep <kind> /var/log/ceph/valgrind/* /dev/null | sort | uniq
```
and try to feed its content to zgrep, and write the output of zgrep
to /var/log/ceph/valgrind/*. this is not the intended behavior. what we
what to do is to pass "<kind>" as an argument to zgrep, along with
the globbed files names which matches "/var/log/ceph/valgrind/*".

in this change, "<kind>" is quoted as in the command line. it's also
what `pipes.quote()` does before the change of
35cf5131e7.

this addresses the regression introduced by
35cf5131e7.

Fixes: https://tracker.ceph.com/issues/44454
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-06 12:17:42 +08:00
Kiefer Chang
320bbeec11
mgr/dashboard: support multiple DriveGroups when creating OSDs
The `create_osds` call in orchestrator uses multiple named DriveGroups as
the parameter. Adapt the change in Dashboard.

Some minor polishes:
- Use task manager to wrap the operation.
- The submit button in Preview modal is changed from `Add` to `Create`.
- POST `/api/osd` to create OSDs:
  - Bare OSDs for OSD service container
    {
        "method": "bare",
        "data": {
            "uuid": "xxxx",
            "svc_id": 5
        }
    }

  - OSDs with devices (DriveGroups)

    {
        "method": "drive_groups",
        "data": {
            < drive group spec here>
        }
    }
- `/orchestrator/osd` endpoint is removed.

Fixes: https://tracker.ceph.com/issues/43615
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2020-03-06 11:15:18 +08:00
Sage Weil
d316156b1e Merge PR #33744 into master
* refs/pull/33744/head:
	qa/tasks/radosbench: fix usage of -O

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-03-05 16:41: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
Radoslaw Zarzynski
1a6d716df8 qa/valgrind.supp: abstract from ceph::buffer's symbol versioning.
Analysis: https://tracker.ceph.com/issues/44430#note-1
Fixes: https://tracker.ceph.com/issues/44430
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2020-03-05 19:02:36 +01:00
Alfonso Martínez
eaa0d84a13 mgr/dashboard: fix tasks.mgr.dashboard.test_rgw suite
Fixes: https://tracker.ceph.com/issues/44405
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
2020-03-05 16:22:55 +01: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
Sage Weil
da19fd14db qa/tasks/radosbench: fix usage of -O
I tried to fix this in fb991fa5f6 but
was comparing an array to an int.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-05 07:27:24 -06:00
Thomas Bechtold
46e22c422b qa: Enable basic mypy support for qa/ directory
A first step to do more automatic code checks on the qa/
directory. This is useful while transitioning to python3.

Also use log_exc to top-level to not run into:

error: Argument 1 to "log_exc" has incompatible type
  "Callable[[OSDThrasher], Any]"; expected "OSDThrasher"

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2020-03-05 06:54:56 +01:00
Thomas Bechtold
f5e77561e9 qa: Fix problems detected by mypy
This is a first step to enable mypy on the qa/ directory.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2020-03-05 06:53:31 +01:00
Sage Weil
86a27e5a9a Merge PR #33047 into master
* refs/pull/33047/head:
	qa/rgw: exercise DeleteRange in test_bucket_index_log_trim

Reviewed-by: Vikhyat Umrao <vikhyat@redhat.com>
2020-03-04 09:58:45 -06:00
Sage Weil
c8981f9657 Merge PR #33705 into master
* refs/pull/33705/head:
	qa/suites/upgrade/nautilus-x/parallel: restart mgr.x before mons

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2020-03-04 08:53:24 -06:00
Kefu Chai
bd3dccd6fa
Merge pull request #33709 from tchaikov/wip-ceph-py-py3-rados
qa/tasks: py3 compat (tasks exercised by rados suites)

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-03-04 21:16:21 +08:00
Kefu Chai
00af2eddf5
Merge pull request #33690 from rhcs-dashboard/44237-remove-config-opt-read-from-system-roles
mgr/dashboard: remove 'config-opt: read' perm. from system roles.

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
2020-03-04 20:54:42 +08:00
Kefu Chai
6ac4348712
Merge pull request #33701 from tchaikov/wip-mgr-orch-exception
mgr/orch: try harder when pickle fails to marshal an exception

Reviewed-by: Joshua Schmid <jschmid@suse.de>
2020-03-04 20:47:44 +08:00
Kyr Shatskyy
982ba399b3 qa/tasks/ceph_deploy: get rid of cStringIO for py3
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-03-04 13:09:17 +08:00
Kyr Shatskyy
5f876961ef qa/tasks/manypools: get rid of itervalues for py3 compat
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2020-03-04 13:09:17 +08:00