Bug 1774354

Summary: [RHEL 7.9] mdcheck_continue.service cannot be started due to Invalid environment assignment, ignoring: MDADM_CHECK_DURATION='"6 hours"'
Product: Red Hat Enterprise Linux 7 Reporter: mezhang <mezhang>
Component: mdadmAssignee: XiaoNi <xni>
Status: ASSIGNED --- QA Contact: Fine Fan <ffan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.7CC: afox, bharker, bubrown, czhong, guazhang, jbrassow, linville, mark.crossland, michael.radda, mjh, ncroxon, peter+fedora, xni
Target Milestone: rcFlags: ncroxon: needinfo? (czhong)
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description mezhang 2019-11-20 05:43:43 UTC
Description of problem:
mdcheck_continue.service cannot be started due to Invalid environment assignment, ignoring: MDADM_CHECK_DURATION='"6 hours"' in rhel7.7

Version-Release number of selected component (if applicable):
kernel-3.10.0-1062.el7.x86_64
mdadm-4.1-1.el7.x86_64

How reproducible:

new OS. 
install mdadm package and reboot OS. you will get this error in /var/log/messages.

~~~
Nov 20 00:19:30 rhel7u7 systemd[1]: [/usr/lib/systemd/system/mdcheck_continue.service:14] Invalid environment assignment, ignoring: MDADM_CHECK_DURATION='"6 hours"'
Nov 20 00:19:42 rhel7u7 systemd[1]: [/usr/lib/systemd/system/mdcheck_continue.service:14] Invalid environment assignment, ignoring: MDADM_CHECK_DURATION='"6 hours"'

~~~

Actual results:

# systemctl status mdcheck_continue.service  -l
● mdcheck_continue.service - MD array scrubbing - continuation
   Loaded: loaded (/usr/lib/systemd/system/mdcheck_continue.service; static; vendor preset: disabled)
   Active: inactive (dead)

Nov 19 22:34:48 rhel7u7 systemd[1]: [/usr/lib/systemd/system/mdcheck_continue.service:14] Invalid environment assignment, ignoring: MDADM_CHECK_DURATION='"6 hours"'
Nov 20 00:19:21 rhel7u7 systemd[1]: [/usr/lib/systemd/system/mdcheck_continue.service:14] Invalid environment assignment, ignoring: MDADM_CHECK_DURATION='"6 hours"'
Nov 20 00:19:30 rhel7u7 systemd[1]: [/usr/lib/systemd/system/mdcheck_continue.service:14] Invalid environment assignment, ignoring: MDADM_CHECK_DURATION='"6 hours"'
Nov 20 00:19:42 rhel7u7 systemd[1]: [/usr/lib/systemd/system/mdcheck_continue.service:14] Invalid environment assignment, ignoring: MDADM_CHECK_DURATION='"6 hours"'


Expected results:
 mdcheck_continue.service will be started normally.

Comment 2 Nigel Croxon 2019-11-21 17:09:34 UTC
The OS comes with userspace tool mdadm installed by default.

What optional packages did you check off during installation?

Comment 3 mezhang 2019-11-22 03:34:04 UTC
>What optional packages did you check off during installation?

I didn't install additional optional packages during installation.

Besides, my test environment is a vm.

Mengyi

Comment 4 mezhang 2019-11-22 03:52:55 UTC
Hi 

Addition error log is outputted. The detail is as below:

~~~
/usr/lib/systemd/system/mdcheck_start.timer:12] Failed to parse calendar specification, ignoring: Sun *-*-1..7 1:00:00
~~~

# cat /usr/lib/systemd/system/mdcheck_start.timer
#  This file is part of mdadm.
#
#  mdadm is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.

[Unit]
Description=MD array scrubbing

[Timer]
OnCalendar=Sun *-*-1..7 1:00:00   <--- 

[Install]
WantedBy= mdmonitor.service

Thank you.

Comment 5 MatthewH 2019-12-04 08:35:58 UTC
I’m getting the same issue downstream on CentOS 7.7 (see their issue https://bugs.centos.org/view.php?id=16665 )

As far as I can tell the problem is the systemd components included in the latest mdadm package are incompatible with the version of systemd included with RHEL/CentOS 7.

In my case I don’t just see these errors, but also can no longer automount my RAID array due to systemd ordering cycle problems.

Thanks

Comment 11 Jonathan Earl Brassow 2019-12-16 16:41:46 UTC
Failed to get exception for late RHEL7.8 fix.  Pushed to 7.9 (or zstream) for fix.

Comment 12 Nigel Croxon 2019-12-16 18:49:39 UTC
Need QA ack

Comment 13 XiaoNi 2019-12-17 06:25:42 UTC
Hi Mengyi

This should be fixed in mdadm-4.1-3.el7 already. 4.1-1 is old. So please ask customer to have a try
with the latest mdadm package (4.1-3)

Thanks
Xiao

Comment 15 Michael Radda (HEROLD) 2020-01-09 10:30:07 UTC
Hi Xiao!

i have also this issue. I have patched our RHEL7 systems and i only get mdadm package 4.1-1. 
also, when i browse RHEL REPO, (....7.7/x86_64/os/Packages/m/) there are only these packages: mdadm-4.1-1.el7.x86_64.rpm, mdadm-4.1-rc1_2.el7.x86_64.rpm.

so please can you tell who to get mdadm-4.1-3

thanks
Michael