Bug 1774354 - [RHEL 7.9] mdcheck_continue.service cannot be started due to Invalid environment assignment, ignoring: MDADM_CHECK_DURATION='"6 hours"'
Summary: [RHEL 7.9] mdcheck_continue.service cannot be started due to Invalid environm...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: mdadm
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: XiaoNi
QA Contact: Fine Fan
URL:
Whiteboard:
: 1763195 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-20 05:43 UTC by mezhang
Modified: 2021-09-08 20:55 UTC (History)
19 users (show)

Fixed In Version: mdadm-4.1-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 20:16:25 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3976 0 None None None 2020-09-29 20:16:29 UTC

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

Comment 16 sdavis4fun 2020-02-01 09:47:36 UTC
XiaoNi,

I too, am experiencing this same issue. The Red Hat Satellite server reports "No packages marked for update". Currently installed version is (mdadm.x86_64  4.1-1.el7 @RedHatEnterpriseLinux7ServerRPMs) Searches on rpmfind, etc only have version 4.1-1.el7. Please assist in where to find version 4.1-3.el7? This bug appears to be shutting down 3rd party syslog-ng. Please help.

Comment 17 XiaoNi 2020-02-03 02:25:10 UTC
Hi all

4.1-3.el7 is in rhel7.8. But it still has this problem. I've sent patch to upstream. I'll fix this in
4.1-4.el7

Thanks
Xiao

Comment 20 Nigel Croxon 2020-04-17 16:38:34 UTC
*** Bug 1763195 has been marked as a duplicate of this bug. ***

Comment 21 Fine Fan 2020-04-29 01:33:23 UTC
Hi All,

I think this problem has been sloved on mdadm-4.1-5.el7

[root@RHEL79-202004220 ~]# cat  /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.9 Beta (Maipo)

[root@RHEL79-202004220 ~]# uname -a
Linux RHEL79-202004220.localdomain 3.10.0-1136.el7.x86_64 #1 SMP Fri Apr 17 11:40:59 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@RHEL79-202004220 ~]# 


[root@RHEL79-202004220 ~]# rpm -q mdadm
package mdadm is not installed


[root@RHEL79-202004220 ~]# rpm -ivh /mnt/Packages/mdadm-4.1-5.el7.x86_64.rpm 
warning: /mnt/Packages/mdadm-4.1-5.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
	libreport-filesystem is needed by mdadm-4.1-5.el7.x86_64

[root@RHEL79-202004220 ~]# rpm -ivh  /mnt/Packages/libreport-filesystem-2.1.11-53.el7.x86_64.rpm 
warning: /mnt/Packages/libreport-filesystem-2.1.11-53.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:libreport-filesystem-2.1.11-53.el################################# [100%]
[root@RHEL79-202004220 ~]# rpm -ivh /mnt/Packages/mdadm-4.1-5.el7.x86_64.rpm 
warning: /mnt/Packages/mdadm-4.1-5.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mdadm-4.1-5.el7                  ################################# [100%]
[root@RHEL79-202004220 ~]# 


[root@RHEL79-202004220 ~]# systemctl status mdcheck_continue.service
● mdcheck_continue.service - MD array scrubbing - continuation
   Loaded: loaded (/usr/lib/systemd/system/mdcheck_continue.service; static; vendor preset: disabled)
   Active: inactive (dead)
[root@RHEL79-202004220 ~]# reboot



[root@RHEL79-202004220 ~]# 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)
[root@RHEL79-202004220 ~]# 


[root@RHEL79-202004220 ~]# systemctl start mdcheck_continue.service
[root@RHEL79-202004220 ~]# 

BR
Fine

Comment 22 Andrew Bauer 2020-05-03 13:29:55 UTC
Now that mdcheck appears to run successfully via systemd, shouldn't the cron file be removed from the package?

>$ rpm -q mdadm
>mdadm-4.1-4.el7.x86_64

>$ rpm -ql mdadm | grep cron
>/etc/cron.d/raid-check

Comment 23 Martin Zahn 2020-09-14 08:38:25 UTC
The errors can be fixed with the following changes:

Environment="MDADM_CHECK_DURATION=6 hours"
OnCalendar=Sun *-*-* 1:00:00

Comment 25 errata-xmlrpc 2020-09-29 20:16:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (mdadm bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3976


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