Commit Graph

158 Commits

Author SHA1 Message Date
Adam King
8164efe5d0 qa/cephadm: use cephadm ceph-volume directly to zap devs
This was running ceph-volume through the
cephadm shell previously, but as we are trying
to remove mount points from cephadm shell, this
no longer works (specifically without the /dev mount)

Signed-off-by: Adam King <adking@redhat.com>
2024-08-02 12:32:51 -04:00
Vallari Agrawal
d0c4182bf5 qa/suites/rbd/nvmeof: add multi-subsystem setup and thrash test
1. qa/tasks/nvmeof.py:
    1.1. create multiple rbd images for all subsystems
    1.2. add NvmeofThrasher and ThrashTest
2. qa/tasks/mon_thrash.py: add 'switch_thrashers' option
3. nvmeof_setup_subsystem.sh: create multiple subsystems and enable HA
4. Restructure qa/suites/rbd/nvmeof: Create two sub-suites
   - "basic" (nvmeof_initiator job)
   - "thrash" (new: nvmeof_mon_thrash and nvmeof_thrash jobs)

Signed-off-by: Vallari Agrawal <val.agl002@gmail.com>
2024-07-31 08:52:05 +00:00
Ilya Dryomov
26cee25873 qa/tasks/cephadm: drop --cluster and sudo in create_rbd_pool()
The cluster (name) is already specified in the arguments passed to
_shell() and this command doesn't need privileges.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-07-10 12:44:12 +02:00
Ilya Dryomov
0bda782952 qa/tasks/cephadm: don't wait for OSDs in create_rbd_pool()
This fails because teuthology.wait_until_osds_up() wants to use
adjust-ulimits wrapper which isn't available in "cephadm shell"
environment.  The whole thing is also redundant because cephadm task
is supposed to wait for OSDs to come up earlier, in ceph_osds().

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-07-10 12:33:45 +02:00
Ilya Dryomov
fcc440da9a qa/tasks: initialize rbd pool instead of just tagging it
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-07-10 12:33:45 +02:00
Patrick Donnelly
9d485ae1f4
qa/tasks/ceph: provide configuration for setting configs via mon
These configs may be set using:

ceph:
  cluster-config:
    entity:
      foo: bar

same as the current:

ceph:
  config:
    entity:
      foo: bar

The configs will be set in parallel using the `ceph config set` command.

The main benefit here is to avoid using the ceph.conf to set configs which
cannot be overriden using subsequent `ceph config` command. The only way to
override is to change the ceph.conf in the test (yuck) or the admin socket
(which gets reset when the daemon restarts).

Finally, we can now exploit the `ceph config reset` command will let us
trivially rollback config changes after a test completes. That is exposed
as the `ctx.config_epoch` variable.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2024-06-06 13:57:56 -04:00
John Mulligan
36700e8b9c qa/tasks/cephadm: allow forcing an exact cephadm download url
Add an option to skip getting a url from shaman/chacra and just
provide a specific download location.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-04-30 15:48:54 -04:00
John Mulligan
41b64715c1 qa/tasks/cephadm: refactor out a download cephadm function
The code was duplicated across two of the functions after getting the
cephadm binary download url from shaman/chacra. Deduplicate it.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-04-30 15:48:54 -04:00
John Mulligan
c54ab1ef9e qa/tasks/cephadm: fix pulling containers from private registries
Log in to a registry before calling cephadm pull.

Fixes: https://tracker.ceph.com/issues/65398 (maybe)
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-04-30 15:48:54 -04:00
John Mulligan
54954eed25 qa/tasks/cephadm: add a wait_for_service_not_present task func
Add a wait_for_service_not_present task function that will wait until a
given service name is not present in the list of running cephadm
services. This is intended for testing service cleanup operations.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-04-25 19:10:39 -04:00
Adam King
3f7db60e5b
Merge pull request #56767 from adk3798/cephadm-log-only-match
qa/cephadm: only fail on CEPHADM_ error in logs

Reviewed-by: Adam King <adking@redhat.com>
2024-04-15 10:29:43 -04:00
Adam King
443c5913c5 qa/tasks/cephadm: add option to limit what matches in log error scraping
This is specifically being added with the orch/cephadm suite
in mind, where coming up with a viable ignorelist has proved
difficult. The orch testing does a lot of actions that can
cause thigns like an OSD or MON daemon to be down very
briefly, and I've found the vast majority of the time we
really don't want to fail the test when these pop up as cephadm
testing really only benefits from catching the CEPHADM_ errors/
warnings rather than eveyr possible one. Rather than continuing to
play whack-a-mole with the errors in the logs, this
patch should allow us to limit what we fail on to at
least get the suite in a good spot again. We can always
phase out the uses of this new "log-only_match" option
later in a more controlled way, and adding it shouldn't
affect log scraping for any of the tests that aren't
facing a similar issue.

Signed-off-by: Adam King <adking@redhat.com>
2024-04-09 14:51:17 -04:00
Adam King
78ca123460 qa/cephadm: add ability to deploy raw OSDS from cephadm task
For now, it only works in a roleless fashion as OSD deployment
with roles is a bit more complicated. Unless we want to deploy
a mix of raw and lvm OSDs in one test, having it work in roleless
setups should be enough.

Signed-off-by: Adam King <adking@redhat.com>
2024-04-09 13:59:56 -04:00
John Mulligan
b2197e43b5 qa/tasks: add a cephadm samba container helper func independent of AD DC
To have the standalone (non-AD) server test function similarly to the AD
member server test we need to set a variable for samba client container
command similar to how the AD setup command does it.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-03-21 18:31:16 -04:00
John Mulligan
96704903f2 qa/tasks: add error condition to exec functions
Looking at the code that expands `all-roles` and `all-hosts` there's no
proper error checking for when these values appear but there are >1
top-level roles in the task config. If a user does this it'll fail
but in a somewhat unclear manner. Add a new condition that raises a
clear exception in this case hopefully saving someone future debugging
time.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-03-21 18:31:16 -04:00
John Mulligan
bf1607a4a1 qa/tasks: reduce duplicated code
All `exec`-style function in teuthology appear to have a transformation
block that expands names like `all-roles` and `all-hosts`. With the new
cephadm.exec task that block appeared twice in cephadm.py. This change
removes the duplication by creating an _expand_roles function that
can be called from the command executing functions.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-03-21 18:31:16 -04:00
John Mulligan
361cbd46b9 qa/tasks: add a template filter to map a role name to a remote
Add a `role_to_remote` template filter function that has the ability to
map a role name to a remote. Attributes of the remote can then be
used to get the actual node ip or name.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-03-21 18:31:16 -04:00
John Mulligan
1ed66542ef qa/tasks: a new cephadm exec task similar to vip.exec but generalized
Add a new cephadm.exec task that works similarly to the existing
vip.exec but instead of only considering VIP related string replacements
it uses that templating feature that was recently added to the
cephadm module for generalized string templating.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-03-21 18:31:16 -04:00
John Mulligan
3ec0bfa9eb qa/tasks: add a cephadm.exclude role
Add a cephadm.exclude role that excludes a test node from cluster setup
and related commands. I need this as I have  test node that will be set
up as an AD Domain Controller for testing Samba and do not want that
node to be have *any* other services running on it.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-03-21 18:31:16 -04:00
John Mulligan
2a917e23ca qa/tasks: allow passing stdin string to cephadm shell commands
There are cases where I want to pass some large-ish strings to ceph
commands executed via cephadm shell. Allow items within the commands
list to be dicts containing a command (as before) and an optional
stdin variable. This change also supports possible future extensions as
well.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-03-21 18:30:58 -04:00
John Mulligan
a99dc99589 qa/tasks: add a new cephadm task for setting up samba ad dc
Add a new task function to cephadm.py that sets up a container running
the Samba based domain controller on a node using podman or docker.
Much of the function actually deals with disabling systemd-resolved
because that service conflicts with the DNS server component of the DC.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-03-21 18:30:58 -04:00
John Mulligan
4f1f09531a qa/tasks: replace uses of subst_vip with new templating function
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-02-29 10:00:29 -05:00
John Mulligan
7bd85b52fd qa/tasks: add templating functions to cephadm module
Add functions to cephadm.py that will be later used to template
strings within the yaml files in the cephadm suites. This will be used
to replace the specific subst_vip call with generic calls that let
tests access "any" variables stored on the test ctx.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2024-02-29 10:00:29 -05:00
Vallari Agrawal
1713c4852c
qa: add qa/tasks/nvmeof.py and rbd/nvmeof_basic_task and fio workunits
This is v2 of the rbd/nvmeof test: It deploys 1 gateway and 1 initiator.
Then does basic verification on nvme commands and runs fio.

This commit creates:
1. qa/tasks/nvmeof.py: adds a new 'Nvmeof' task which deploys
    the gateway and shares config with the initiator hosts.
    Sharing config was previously done by 'nvmeof_gateway_cfg' task
    in qa/tasks/cephadm.py (that task is removed in this commit).
2. qa/workunits/rbd/nvmeof_basic_tests.sh:
    Runs nvme commands (discovery, connect, connect-all, disconnect-all,
    and list-subsys) and does basic verification of the output.
3. qa/workunits/rbd/nvmeof_fio_test.sh:
    Runs fio command. Also runs iostat in parallel if IOSTAT_INTERVAL
    variable is set. This variable configures the delay between each iostat
    print.

nvmeof-cli upgrade from v0.0.6 to v0.0.7 introduced major changes
to all nvmeof commands. This commit changes v0.0.6 commands to
v0.0.7 in qa/workunits/rbd/nvmeof_initiator.sh

Signed-off-by: Vallari Agrawal <val.agl002@gmail.com>
2024-02-12 13:00:09 +05:30
Adam King
67c5669157 qa/cephadm: support to pull stable branch compiled cephadm
This is to allow us to pull the latest build of
cephadm off of a stable branch (currently the only
valid option for that is reef, although this hopefully
will work with squid, T release, etc. in the future).

This should allow us to bootstrap cliusters based on
those stable branches for use in upgrade testing

Signed-off-by: Adam King <adking@redhat.com>
2024-01-08 09:51:52 -05:00
Vallari Agrawal
42e121a42a
qa: add rbd/nvmeof test
A basic test for ceph-nvmeof[1] where
nvmeof initiator is created.
It requires use of a new task "nvmeof_gateway_cfg"
under cephadm which shares config information
between two remote hosts.

[1] https://github.com/ceph/ceph-nvmeof/

Signed-off-by: Vallari Agrawal <val.agl002@gmail.com>
2023-12-04 19:27:54 +05:30
Adam King
bef9617c51 qa/cephadm: add ca signed key to cephadm task
To allow bootstrapping a cluster using a CA signed
key instead of the standard pubkey authentication.
Will allow explicit testing of this as we add support
for it

Signed-off-by: Adam King <adking@redhat.com>
2023-08-15 15:34:26 -04:00
Patrick Donnelly
6739e11563
qa: time log compression
For debugging and ad-hoc analytics.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-03-27 14:55:16 -04:00
Patrick Donnelly
0a03a47103
qa/tasks: give verbose gzip output
For future analysis.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-03-27 14:55:16 -04:00
Patrick Donnelly
3c76cc3c51
qa/tasks: use medium compression
To speed up compression.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-03-27 14:55:16 -04:00
Patrick Donnelly
23a29d4abe
qa/ceph: parallelize gzip
Our machines have lots of cores, use them!

Fixes: https://tracker.ceph.com/issues/59120
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2023-03-27 14:55:16 -04:00
Adam King
4d0cc762d7
Merge pull request #48428 from zmc/cephadm-smoke-small
qa/suites: Add orch/cephadm/smoke-small suite

Reviewed-by: Adam King <adking@redhat.com>
2023-01-24 09:08:44 -05:00
Adam King
8086a6f3a6 qa/tasks/cephadm.py: fix pulling cephadm from git.ceph.com
The old way of using the git archive doesn't seem
to work anymore so trying another approach

Was getting "fatal: operation not supported by protocol"
when trying the git archive

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

Signed-off-by: Adam King <adking@redhat.com>
2022-12-12 12:40:10 -05:00
Zack Cerza
b72fcf11cd qa/tasks/cephadm: Add no_cgroups_split option
This will be useful for deployments based on rootless containers

Signed-off-by: Zack Cerza <zack@redhat.com>
2022-10-10 16:07:42 -06:00
Zack Cerza
af67a7152c tasks/cephadm: Add 'osd_method' config item
Since the default of None gets interpreted as 'lvm', the only useful
value would be 'raw'. This will enable us to use loop devices inside
containers for OSDs.

Signed-off-by: Zack Cerza <zack@redhat.com>
2022-09-26 15:35:08 -06:00
Zack Cerza
74c3446c25 cephadm: Avoid TypeError in download_cephadm()
Signed-off-by: Zack Cerza <zack@redhat.com>
2022-09-26 15:35:08 -06:00
Michael Fritch
95ead7401f qa/tasks/cephadm: conditionally pull cephadm binary from chacra
When a specific (older) version of cephadm is needed for a test, pull
it from chacra. If we need to bootstrap an older version of ceph, we
pull an older "single-script" binary using the older method.

Co-authored-by: Michael Fritch <mfritch@suse.com>
Co-authored-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-09-13 12:17:20 -04:00
Sebastian Wagner
1ddd179054 qa/tasks: Drop downloading cephadm from the git source tree
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2022-09-13 12:17:20 -04:00
Milind Changire
bf83eaa4e7 qa: enhancement for subvol creation and mounting
Fixes: https://tracker.ceph.com/issues/54317
Signed-off-by: Milind Changire <mchangir@redhat.com>
2022-04-07 14:15:56 +05:30
Zack Cerza
0f1118e228 cephadm: Make hostname change idempotent
Inside a container, we may already have a short hostname - and also lack
the privileges to change it.

Signed-off-by: Zack Cerza <zack@redhat.com>
2022-02-16 12:13:05 -07:00
Patrick Donnelly
27c1110129
qa/tasks/cephadm: setup CephManager when OSDs are provisioned
The Filesystem object may use this when configuring EC data pools at
file system creation (via a FuseMount).

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-02-02 10:44:34 -05:00
Patrick Donnelly
2436405c5d
qa/tasks/cephadm: setup file system if MDS are provisioned
This is the same behavior/code as what the ceph task does.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2022-02-02 10:44:34 -05:00
Sage Weil
9d50154a93 qa/tasks/cephadm: pull image to all hosts in parallel
This doesn't affect bootstrap, but it does mean we avoid any delay
the first time we cephadm.shell on some non-boostrap host.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-11-25 07:52:56 -06:00
Sage Weil
3a110f6c00 qa/tasks/cephadm: add hosts via mon remote
If we use a new remote for each shell command, we end up waiting
for the image to pull on every host in sequence.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-11-25 07:52:56 -06:00
Sage Weil
0e40064d31 qa/tasks/cephadm: use shortname for remote directory
This aligns with what the ceph and syslog tasks do.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-11-25 07:52:56 -06:00
Sage Weil
689d7ceabd qa/tasks/cephadm: deploy no more than 5 mons in roleless mode
Signed-off-by: Sage Weil <sage@newdream.net>
2021-11-25 07:52:55 -06:00
Deepika Upadhyay
cbd2c71398 qa/tasks: adapt ceph_iscsi.py task to ceph_iscsi_client
* we use setup_iscsi_client.py to deploy iscsi client services,
  configuring intiator and mulitpath this is done by qa task
  ceph_iscsi_client
* qa/cephadm: adds remotes ip addresses to iscsi gateway,
* rename poolname: iscsi >> datapool, which we usually use for tests and
  expresses type of pool more clearly.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-10-18 13:21:50 +05:30
Sage Weil
dda15a7924 qa/tasks/cephadm: wait for osds to start explicitly
Signed-off-by: Sage Weil <sage@newdream.net>
2021-10-08 16:06:28 -05:00
Sage Weil
d3c9486ed9 qa/tasks/cephadm: if no osd roles, --all-available-devices
Signed-off-by: Sage Weil <sage@newdream.net>
2021-10-08 16:06:28 -05:00
Sage Weil
9ab9cc26e2 Merge PR #41007 into master
* refs/pull/41007/head:
	qa/tasks/cephfs/test_nfs: fix info test
	doc/cephfs/fs-nfs-exports: document --ingress --virtual-ip
	mgr/nfs: move ingress vs virtual_ip check to cluster interface
	PendingReleaseNotes: clarify deprecated
	PendingReleaseNotes: note breaking CLI changes
	doc/cephadm/nfs: document nfs+ingress
	qa/suites/rados/cephadm/smoke-roleless: test nfs, nfs + ingress
	mgr/nfs: take --ingress argument to 'nfs cluster create'
	mgr/cephadm: adjust debug output for device refresh
	mgr/cephadm: ingress: fix log msg
	mgr/cephadm: fix logging of config/placement errors
	common/options: enable nfs module for new clusters
	cephadm: --stop-signal=SIGTERM
	mgr/orchestrator: default nfs pool, namespaces
	mgr/cephadm: nfs: create pool if it doesn't yet exist
	doc/cephadm/nfs: update
	mgr/nfs: change 'nfs cluster info'
	mgr/nfs: take optional virtual_ip for deploying ingress
	mgr/nfs: remove 'nfs cluster update'
	mgr/nfs: factor out ganesha pool creation
	mgr/nfs: delete -> rm for CLI
	mgr/nfs: add some type annotations
	python-common: fix IngressSpec yaml dump
	mgr/cephadm: ingress: remove eth0 default
	qa/tasks/cephadm: allow mounting volumes in shell
	cephadm: add -v arg to shell
	qa/tasks/vip: add 'vip.exec' task
	mgr/orchestrator: add --port arg to 'orch apply nfs'
	mgr/cephadm: nfs: add purge
	mgr/cephadm: ingress: support nfs
	mgr/cephadm: do not reconfigure daemons on deleted services
	mgr/cephadm: nfs: shell out to rados tool for conf creation
	mgr/cephadm: nfs: add rank to grace file from mgr module
	mgr/cephadm: nfs: bind ganesha to appropriate ip:port
	mgr/cephadm: enable ranked daemons for nfs
	mgr/cephadm: support creation of daemons with ranks
	mgr/cephadm: make _plan show removed daemon names
	mgr/cephadm/schedule: assign/map ranks
	mgr/cephadm: add rank[_generation] properties
	mgr/cephadm/inventory: store optional rank_map along with specs
	mgr/cephadm: include service_name is generated DaemonDescription
	mgr/orchestrator: include service_name in DaemonDescription dump
	mgr/cephadm/inventory: fix deleted check
	mgr/cephadm: simplify
	mgr/cephadm/schedule: make placement shuffle deterministic
	mgr/cephadm: document CephadmService flags

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Varsha Rao <varao@redhat.com>
2021-05-25 16:17:44 -04:00