From: Scott Mayhew <smayhew@redhat.com>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: kdevops@lists.linux.dev
Subject: Re: [PATCH 6/6] gen_nodes: ensure kdevops prefix has no dashes
Date: Mon, 31 Mar 2025 16:49:32 -0400 [thread overview]
Message-ID: <Z-r_3KKXyJww7NpN@aion> (raw)
In-Reply-To: <Z-ruueG0xZ7HWBeL@bombadil.infradead.org>
On Mon, 31 Mar 2025, Luis Chamberlain wrote:
> On Mon, Mar 31, 2025 at 03:14:28PM -0400, Scott Mayhew wrote:
> > On Mon, 31 Mar 2025, Luis Chamberlain wrote:
> >
> > > On Mon, Mar 31, 2025 at 01:35:41PM -0400, Scott Mayhew wrote:
> > > > On Sat, 29 Mar 2025, Luis Chamberlain wrote:
> > > >
> > > > > Folks trying to use kdevops and testing with fstests will quickly
> > > > > find out a surprise that their config is not being parsed correctly
> > > > > until later.
> > > > >
> > > > > Fix this by preventing bringup if the prefix has a dash.
> > > > >
> > > > > We use the dash to help parallelize testing filesystem profiles and
> > > > > so the host prefix goes before the filesystem name and test profile.
> > > >
> > > > Where does that happen? All of my kdevops setups use multiple dashes in
> > > > the host prefix (e.g. "kdevops-nfs-fstests-rhel-10-nightly"), so this
> > > > breaks my setup, and I'd imagine it breaks Chuck's too.
> > >
> > > Oh crap, sorry, does the NFS use of fstset not rely on the hostname to
> > > infer the target test section? If not then how about this:
> >
> > No, it still maps the hostname to the test section, and unless I'm
> > missing something there's no special handling. I use the same naming
> > scheme for SMB as well, although I don't have nearly as many SMB workflows
> > running as NFS.
> >
> > Unfortunately I'm using dedicated workflows for all my stuff so this
> > patch won't work. Maybe just add a KDEVOPS_HOSTS_PREFIX_ALLOW_DASHES
> > config option to allow this check to be bypassed?
>
> Yeah sure we can add KDEVOPS_HOSTS_PREFIX_ALLOW_DASHES, at least now
> we have a TODO item to review if in fact prefixes with dashes may
> break some existing heuristics for nfs/smb workoads.
>
> How is the configuration for fstests inferred for these workloads then?
> The exisitng 'make fstests-baseline' will use the hostname and extract
> the first part up to to the first dash, and then replace remaining
Maybe we're not looking at the same stuff.
Where are you seeing "the first part up to the first dash"? I'm looking
at this bit which starts on line 1241 in playbooks/roles/fstests/tasks/main.yml:
---8<---
- name: Run fstests using ./oscheck.sh --print-start --journal {{ fstests_journal }} --print-done --test-section {{ fstests_section }} {{ oscheck_extra_args }} {{ all_limit_tests }}
vars:
fstests_section: "{{ ansible_host | regex_replace(kdevops_host_prefix + '-') | regex_replace('-dev') | regex_replace('-', '_') }}"
---8<---
I see that as
1. strip off the entire host prefix *and* the first dash
2. strip off the '-dev' suffix
3. replace the remaining dashes with underscores
If I boil that down to a simple test, that appears to be exactly what it
does:
$ cat test.yml
---
- name: Just a test
hosts: all
tasks:
- name: Import extra_vars.yaml
include_vars: extra_vars.yaml
- name: Just a task
vars:
fstests_section: "{{ ansible_host | regex_replace(kdevops_host_prefix + '-') | regex_replace('-dev') | regex_replace('-', '_') }}"
ansible.builtin.debug:
var: fstests_section
$ ansible-playbook -i hosts test.yml
---8<---
TASK [Just a task] ***************************************************************************************************************************************************************************************************************************
ok: [kdevops-nfs-fstests-rhel-10-nightly-nfs-tls] => {
"fstests_section": "nfs_tls"
}
ok: [kdevops-nfs-fstests-rhel-10-nightly-nfs-v42] => {
"fstests_section": "nfs_v42"
}
ok: [kdevops-nfs-fstests-rhel-10-nightly-nfs-v40] => {
"fstests_section": "nfs_v40"
}
ok: [kdevops-nfs-fstests-rhel-10-nightly-nfs-v3] => {
"fstests_section": "nfs_v3"
}
ok: [kdevops-nfs-fstests-rhel-10-nightly-nfsd] => {
"fstests_section": "nfsd"
}
---8<---
Those match the sections in playbooks/roles/fstests/templates/nfs/nfs.config
-Scott
> "-" with "_", and we use that to infer what test section we will use
> from the /var/lib/xfstests/config/*.config file used.
>
> So for example, my extrafluff-ext4-4k host will use ext4_4k test section
> for its test when run. How is the test section inferred for NFS?
>
> Luis
>
next prev parent reply other threads:[~2025-03-31 20:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-29 23:01 [PATCH 0/6] debian / libvirt / devconfig fixes Luis Chamberlain
2025-03-29 23:01 ` [PATCH 1/6] scripts/bringup_guestfs.sh: uninstall unattended-upgrades on debian guests Luis Chamberlain
2025-03-29 23:01 ` [PATCH 2/6] devconfig: ensure unattended-upgrades is not installed on debian Luis Chamberlain
2025-03-29 23:01 ` [PATCH 3/6] libvirt: use consistent pool path variables and use optional yaml output Luis Chamberlain
2025-03-29 23:01 ` [PATCH 4/6] Kconfig: adopt output yaml for KDEVOPS_FIRST_RUN Luis Chamberlain
2025-03-29 23:01 ` [PATCH 5/6] guestfs: replace ansible group permisison requirement on libvirt system uri Luis Chamberlain
2025-03-29 23:01 ` [PATCH 6/6] gen_nodes: ensure kdevops prefix has no dashes Luis Chamberlain
2025-03-31 17:35 ` Scott Mayhew
2025-03-31 18:33 ` Luis Chamberlain
2025-03-31 19:14 ` Scott Mayhew
2025-03-31 19:36 ` Luis Chamberlain
2025-03-31 20:49 ` Scott Mayhew [this message]
2025-04-01 21:11 ` Luis Chamberlain
-- strict thread matches above, loose matches on Subject: below --
2025-03-23 11:50 [PATCH 0/6] debian / libvirt / devconfig fixes Luis Chamberlain
2025-03-23 11:50 ` [PATCH 6/6] gen_nodes: ensure kdevops prefix has no dashes Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z-r_3KKXyJww7NpN@aion \
--to=smayhew@redhat.com \
--cc=kdevops@lists.linux.dev \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox