Broken Environment syntax in mdcheck_start/mdcheck_continue.service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all

In rhel7 we encounter one systemd service failed problem.

[root@intel-rosecity-07 ~]# systemctl start mdcheck_start
[root@intel-rosecity-07 ~]# systemctl status mdcheck_start -l
● mdcheck_start.service - MD array scrubbing
Loaded: loaded (/usr/lib/systemd/system/mdcheck_start.service; static; vendor preset: disabled)
   Active: inactive (dead)

Dec 17 09:16:59 intel-rosecity-07.khw1.lab.eng.bos.redhat.com systemd[1]: [/usr/lib/systemd/system/mdcheck_start.service:14] Invalid environment assignment, ignoring: MDADM_CHECK_DURATION="6 hours"

This patch can fix this problem. So is it a systemd syntax problem? The service can start sucessfully in rhel8.

diff --git a/systemd/mdcheck_start.service b/systemd/mdcheck_start.service
index f17f1aa..da62d5f 100644
--- a/systemd/mdcheck_start.service
+++ b/systemd/mdcheck_start.service
@@ -11,7 +11,7 @@ Wants=mdcheck_continue.timer

 [Service]
 Type=oneshot
-Environment= MDADM_CHECK_DURATION="6 hours"
+Environment= "MDADM_CHECK_DURATION=6 hours"
 EnvironmentFile=-/run/sysconfig/mdadm
 ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
 ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION}


Best Regards

Xiao






[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux