From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: Xiao Ni <xni@redhat.com>
Cc: linux-raid@vger.kernel.org, jes@trained-monkey.org,
song@kernel.org, yukuai1@huaweicloud.com, ncroxon@redhat.com,
colyli@suse.de
Subject: Re: [PATCH 2/5] tests/00createnames enhance
Date: Fri, 19 Apr 2024 09:20:21 +0200 [thread overview]
Message-ID: <20240419092021.00003bc1@linux.intel.com> (raw)
In-Reply-To: <20240418102321.95384-3-xni@redhat.com>
On Thu, 18 Apr 2024 18:23:18 +0800
Xiao Ni <xni@redhat.com> wrote:
> Now 00createnames doesn't check Create names=yes config. Without this
> config, mdadm creates /dev/md127 device node when mdadm --create
> /dev/md/test. With this config, it creates /dev/md_test. This patch
> only adds the check. If it has this config, it returns directly
> without error.
Hi Xiao,
Thanks for patches I will review them all later (probably next week).
About this one:
The proposed change is not complete as config may be read from both
/etc/mdadm.conf and /etc/mdadm/mdadm.conf. Ideally, you should check them
both in the approach you proposed.
There is also possible to have /etc/mdadm.d/ directory - it is always checked
and read if exists and it cannot be disabled. See load_conffile() and
CONFFILEFLAGS in makefile for details.
Test relies on the global configuration and user may forgot that it is set.
That will give us positive test result because test was not run due to
configuration issue. This is risky, I would prefer fail to indicate
that something is wrong. User can skip this test.
What about adding empty mdadm config to the command `-c ./mdadm_empty.conf`? I
see it as the best option for now. That save use from checking 2 config
locations and any user defined behaviors. Do you see any disadvantages?
As config directory is not configurable we have to accept the risk that
something could be there.
Ideally, you can propose patch with confdir customization to apply same
solution as for conffile (just set it to empty directory) but as it is probably
rarely used we can accept risk here for now (unless somebody reported). I give
it up to you as it not having confdir customization is more like new
feature.
Another possible solution would be to learn mdadm print it's configuration and
print it before running test and fail if not compatible setting detected.
I did not realize that it would be a problem, that for catching!
Thanks,
Mariusz
next prev parent reply other threads:[~2024-04-19 7:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 10:23 [PATCH RFC 0/5] mdadm tests fix and enhance Xiao Ni
2024-04-18 10:23 ` [PATCH 1/5] tests/test enhance Xiao Ni
2024-04-19 7:16 ` Mateusz Kusiak
2024-04-19 7:30 ` Mateusz Kusiak
2024-04-21 2:46 ` Xiao Ni
2024-04-18 10:23 ` [PATCH 2/5] tests/00createnames enhance Xiao Ni
2024-04-19 7:20 ` Mariusz Tkaczyk [this message]
2024-04-22 6:56 ` Xiao Ni
2024-04-22 7:23 ` Mariusz Tkaczyk
2024-04-19 9:47 ` Mariusz Tkaczyk
2024-04-22 6:57 ` Xiao Ni
2024-04-22 10:15 ` Mariusz Tkaczyk
2024-04-22 13:31 ` Xiao Ni
2024-04-18 10:23 ` [PATCH 3/5] tests/01r5fail enhance Xiao Ni
2024-04-19 9:57 ` Mariusz Tkaczyk
2024-05-08 8:35 ` Mariusz Tkaczyk
2024-04-18 10:23 ` [PATCH 4/5] tests/01r5integ.broken Xiao Ni
2024-05-08 8:36 ` Mariusz Tkaczyk
2024-04-18 10:23 ` [PATCH 5/5] tests/01raid6integ.broken can be removed Xiao Ni
2024-04-19 10:05 ` Mariusz Tkaczyk
2024-04-19 15:57 ` Song Liu
2024-04-22 13:54 ` Xiao Ni
2024-05-08 8:37 ` Mariusz Tkaczyk
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=20240419092021.00003bc1@linux.intel.com \
--to=mariusz.tkaczyk@linux.intel.com \
--cc=colyli@suse.de \
--cc=jes@trained-monkey.org \
--cc=linux-raid@vger.kernel.org \
--cc=ncroxon@redhat.com \
--cc=song@kernel.org \
--cc=xni@redhat.com \
--cc=yukuai1@huaweicloud.com \
/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;
as well as URLs for NNTP newsgroup(s).