Bug 589775 - /sbin/start_udev should set a udev property for noiswmd kernel cmdline option
/sbin/start_udev should set a udev property for noiswmd kernel cmdline option
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: udev (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Harald Hoyer
Karel Volný
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-06 16:52 EDT by Hans de Goede
Modified: 2010-11-10 16:49 EST (History)
5 users (show)

See Also:
Fixed In Version: udev-147-2.18.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 589774
Environment:
Last Closed: 2010-11-10 16:49:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hans de Goede 2010-05-06 16:52:50 EDT
+++ This bug was initially created as a clone of Bug #589774 +++

For F-13 (and RHEL-6, I'll clone this bug), mdraid set activation has moved from rc.sysinit to udev rules. This includes the activation of isw / imsm BIOS RAID sets.

In order for the udev rules to be able to honor the noiswmd kernel cmdline option a udev property should be set when this option is present so that the udev rules can check for this.

The rules already check for rd_NO_MDIMSM, this was my idea / suggestion as
I assumed this property would be propagated from the initrd udev to the normal one, but it is not.

Still it would be the easiest to use rd_NO_MDIMSM as property name.
Comment 2 RHEL Product and Program Management 2010-05-06 18:12:33 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Kay Sievers 2010-05-30 18:04:42 EDT
We could make:
  IMPORT{cmdline}="rd_NO_MDIMSM"
work to be able to import specific variables from the kernel commandline during event processing.

This is a simple string only on the commandline, without a value, right? We would probably need to automatically translate that to:
  rd_NO_MDIMSM=1
because we test only for non-empty strings in udev so far, and handle empty values as unset variables.
Comment 4 Kay Sievers 2010-05-30 19:20:18 EDT
This might work:
  http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=c4f6dcc4a5c774c4c5c60c7024d59081deecc7f8

Please check, or let me know if you have any better idea. Thanks!
Comment 5 Hans de Goede 2010-05-31 08:18:43 EDT
I like Kay's approach to this, unfortunately I don't have time atm to test this. But testing the basic functionality of IMPORT{cmdline} should be possible without the need for Intel BIOS RAID hardware access.
Comment 6 Kay Sievers 2010-05-31 08:22:26 EDT
(In reply to comment #5)
> But testing the basic functionality of IMPORT{cmdline} should be possible
> without the need for Intel BIOS RAID hardware access.    

Sure, I tested the basic things, and imported "quiet" and "root=", and this seems to work for me. :)
Comment 7 Hans de Goede 2010-05-31 09:20:57 EDT
(In reply to comment #6)
> (In reply to comment #5)
> > But testing the basic functionality of IMPORT{cmdline} should be possible
> > without the need for Intel BIOS RAID hardware access.    
> 
> Sure, I tested the basic things, and imported "quiet" and "root=", and this
> seems to work for me. :)    

Ok, then I see no reason why this would not work for no_iswmd.

Harald,

Could you do a new udev with this patch included (and also add it to Fedora) ? Then I'll do a patch to modify the mdadm udev rules, test it and send it to dledford

Thanks,

Hans
Comment 9 Karel Volný 2010-10-06 07:00:27 EDT
udev-147-2.29.el6

the file
/lib/udev/rules.d/65-md-incremental.rules
lists these rules:

ENV{rd_NO_MDIMSM}=="?*", GOTO="md_imsm_inc_end"
ENV{noiswmd}=="?*", GOTO="md_imsm_inc_end"

I've changed them to

ENV{rd_NO_MDIMSM}=="?*", PROGRAM="/usr/bin/logger 'bz589775: rd_NO_MDIMSM matched'", GOTO="md_imsm_inc_end"
ENV{noiswmd}=="?*", PROGRAM="/usr/bin/logger 'bz589775: noiswmd matched'", GOTO="md_imsm_inc_end"

now I get dozens of log messages:

# grep bz589775 /var/log/messages
Oct  6 12:47:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:47:16 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:08 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:09 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:10 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:10 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:20 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:20 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:20 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:20 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:20 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:20 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:20 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:20 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:20 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched
Oct  6 12:48:20 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched

after adding the parameter to kernel commandline:
# cat /proc/cmdline
ro root=/dev/mapper/vg_dhcp24235-lv_root rd_LVM_LV=vg_dhcp24235/lv_root rd_LVM_LV=vg_dhcp24235/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=cs_CZ.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=cz-lat2  rhgb quiet noiswmd

I still get just
Oct  6 12:54:19 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched

but *no* "bz589775: noiswmd matched"

=> so I'd say this does NOT work as expected ... could you confirm that my reproducer is correct, please?
Comment 10 Karel Volný 2010-10-06 07:04:04 EDT
um, call me "The Blind" - of course I can't get the second message if the first is matched and there is the GOTO ...
Comment 11 Harald Hoyer 2010-10-06 07:09:32 EDT
if "noiswmd" is found on the kernel command line, start_udev sets ENV{rd_NO_MDIMSM}==1 .

there is _no_  ENV{noiswmd}!!
Comment 12 Karel Volný 2010-10-06 07:20:35 EDT
ok, so I've swapped the order of the rules so "noiswmd" should be matched first -

ENV{noiswmd}=="?*", PROGRAM="/usr/bin/logger 'bz589775: noiswmd matched'", GOTO="md_imsm_inc_end"
ENV{rd_NO_MDIMSM}=="?*", PROGRAM="/usr/bin/logger 'bz589775: rd_NO_MDIMSM matched'", GOTO="md_imsm_inc_end"

but still I get only
Oct  6 13:08:46 dhcp-24-235 logger: bz589775: rd_NO_MDIMSM matched

... what have I missed this time?
Comment 13 Karel Volný 2010-10-06 07:23:49 EDT
(In reply to comment #11)
> if "noiswmd" is found on the kernel command line, start_udev sets
> ENV{rd_NO_MDIMSM}==1 .
> 
> there is _no_  ENV{noiswmd}!!

ah, that explains it

so the original rule

ENV{noiswmd}=="?*", GOTO="md_imsm_inc_end"

is wrong (can never be matched thus shouldn't be included)?
Comment 14 Harald Hoyer 2010-10-06 07:28:39 EDT
(In reply to comment #13)
> ENV{noiswmd}=="?*", GOTO="md_imsm_inc_end"
> 
> is wrong (can never be matched thus shouldn't be included)?

It is not wrong, it does not hurt, and it can be matched, if someone does:

/sbin/udevadm control --env=noiswmd=1
Comment 15 Karel Volný 2010-10-06 07:53:26 EDT
(In reply to comment #14)
> (In reply to comment #13)
> > ENV{noiswmd}=="?*", GOTO="md_imsm_inc_end"
> > 
> > is wrong (can never be matched thus shouldn't be included)?
> 
> It is not wrong, it does not hurt, and it can be matched, if someone does:
> 
> /sbin/udevadm control --env=noiswmd=1

seems like I'm missing the point here ... nevermind

so, appending "noiswmd" leads to setting "rd_NO_MDIMSM" which then matches the rule and skips the mdadm actions - which was the intent of this bug, if I get it right => VERIFIED
Comment 16 releng-rhel@redhat.com 2010-11-10 16:49:30 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.