* refs/pull/31763/head:
test: auto-upgrade subvolume test
mgr/volumes: tie everything together to implement versioned subvolumes
mgr/volumes: provide subvolume create/remove/open APIs
mgr/volumes: implement subvolume based on subvolume template
mgr/volumes: implement subvolume group based on group template
mgr/volumes: implement trash as a subvolume group
mgr/volumes: snapshot util module
mgr/volumes: template for implementing groups and subvolumes
mgr/volumes: implement filesystem volume module
mgr/volumes: lock module to serialize volume operations
mgr/volumes: introduce volume specification module
mgr/volumes: add fs_util helper module
Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
if mgr is not active, monitor will refuse to set any option consumed by
mgr modules.
the reason the tests pass somtimes is that, we have a racing here:
1. stop all mgr daemons
2. MgrMonitor gets updated and updates its mgr_module_options
accordingly.
3. in TestDashboard.setUp(), we reset the port number for dashboard
using "ceph config set mgr mgr/dashboard/y/ssl_server_port 7789"
4. restart all mgr daemons
but the 2nd step and 3rd step could race with each other, if the 2nd
step happens after 3rd step, the test passes. otherwise it fails.
in this change, "--force" is passed to the "ceph config set" command,
so ConfigMonitor can bypass the sanity test for the option, and just
set this option.
Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/tasks/mgr/dashboard: set pg_num to 16
Reviewed-by: Volker Theile <vtheile@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
before this change, `setattr()` sets the instance specialized with a certain method
of test case, so in `MgrTestCase.setUpClass()`
assert cls.mgr_cluster is not None
fails,
after this change, instead of test case, the class of test suite is updated with the
specified params, even if we pass a certain test to test runner.
so we can
./run-backend-api-tests.sh tasks.mgr.test_dashboard.TestDashboard.test_standby
now. before this change, we can only:
./run-backend-api-tests.sh tasks.mgr.test_dashboard.TestDashboard
Signed-off-by: Kefu Chai <kchai@redhat.com>
mgr/dashboard: Throw a more meaningful exception
Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
random.choice(seq) raises IndexError if seq is empty. we cannot ensure
there is always one or more pools in the cluster while using pool
related thrasher. so skip the thrasher action if there is no pools at
that moment.
Fixes: https://tracker.ceph.com/issues/43412
Signed-off-by: Kefu Chai <kchai@redhat.com>
"fs fail" will only fail the MDS that are part of the file system which
will generally allow us to avoid spurious MDS_INSUFFICIENT_STANDBY
warnings. Further, only restart the MDS, there's no reason to leave them
offline.
Fixes: https://tracker.ceph.com/issues/43514
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/30802/head:
cephfs-shell: Modify Quota Test
cephfs-shell: Fix permission errors on quota tests
cephfs-shell: Add tests for quota
cephfs-shell: Print max_bytes and max_files as string on get Quota
cephfs-shell: Remove extra length argument passed to setxattr()
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
* refs/pull/32459/head:
qa/tasks: Nothing to clean up if the volume was not created
mgr/volumes: drop obsolete comment in _cmd_fs_volume_create
mgr/volumes: cleanup on fs create error
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Choose another future_date_1 date (9 days instead of 10) to
make sure the expiration date will be between future_date_1
and future_date_2. Otherwise the expiration date might be
equal to future_date_1.
Also wait for 10 seconds before the password refresh in
test_pwd_expiration_date_update to prevent date equality.
Fixes: https://tracker.ceph.com/issues/43431
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
qa/tasks/mgr/test_orchestrator_cli: fix service action tests
Reviewed-by: Thomas Bechtold <tbechtold@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
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>
* refs/pull/31494/head:
qa: force creation of fs with EC default data pool
qa: add tests for adding EC data pools
mon/MDSMonitor: warn when creating fs with default EC data pool
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
There are only 2 cases which needs cleanup:
1. The volume is successfully created
2. The volume is successfully created but create_mds fails
In either case, we could do a 'volume rm'.
Signed-off-by: Jos Collin <jcollin@redhat.com>
* Remove scope and permission check from UserPasswordPolicy controller again, otherwise the Angular UI validator can't be executed for users without that privilege.
* Remobe obsolete QA test.
Signed-off-by: Volker Theile <vtheile@suse.com>
1. Fix the test cases by using the 'assertJsonBody'
method. The '_post' method doesn't return anything.
That's why we need to use the 'assertJsonBody'
method here instead of checking the fields directly.
2. Add the missing scope and permission definition of the
'validate_password' resource. Otherwise the resource
is not restricted and 'test_validate_password_invalid_permissions'
will fail.
3. Re-word error messages. Change 'cannot' to 'must not'.
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
- Add 'api/user/validate_password' endpoint to check if a
password meets the password policy. A new controller has
to be added for 'api/user' which has NO security scope,
otherwise it wouldn't be possible for users without USER
privileges to call the endpoint.
- Add Angular async validator to check if the entered password
meets the policy.
Fixes: https://tracker.ceph.com/issues/43088
Signed-off-by: Volker Theile <vtheile@suse.com>
This patch makes following modifications quota test:
- Add additional condtion to confirm Command Failure Error due to exceeding set
quota values.
- Rename function valid to set_and_get_quota_vals.
- Use run_cephfs_shell_cmd instead of get_cephfs_shell_cmd_output.
Signed-off-by: Varsha Rao <varao@redhat.com>
Use of mount_a.run_shell() to create directory, requires Sudo access and
cephfs-shell should be run without sudo access. Instead use cephfs-shell mkdir
command to create directory.
Signed-off-by: Varsha Rao <varao@redhat.com>
we use `six.StringIO` for stdout when writing output messages from
`self.subproc.communicate()`, and `six.StringIO` accepts strings, so we
need to decode the output before sending them to `six.StringIO`.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* refs/pull/32377/head:
qa/suites/rados/thrash-old-clients: configure mons in terms of addrvecs
qa/suites/rados/thrash-old-clients: hammer: fix package list
qa/tasks/cephadm: set .conf to cluster config object
qa/tasks/cephadm: archive /var/log/ceph logs too (not just cluster dir)
qa/tasks/cephadm: client keyring
qa/tasks/cephadm: setup thrashers ctx item
qa/tasks/ceph_manager: asok commands via cephadm shell
qa/suites/rados/thrash-old-clients: stick to el7
qa/tasks/cephadm: check cluster log; support log-whitelist
qa/suites/rados/thrash-old-clienets: python-foo to python3-foo
qa/suites/rados/thrash-old-clients: add new exclude_packages
qa/suites/rados/thrash-old-clients: use cephadm
mon/ConfigMonitor: make legacy mon addr/port parseable by legacy code
Reviewed-by: Josh Durgin <jdurgin@redhat.com>