Thread (3 messages) 3 messages, 3 authors, 2023-06-07

Re: [PATCH] Fix mdmonitor-oneshot.service fail to be executed

From: Paul Menzel <hidden>
Date: 2023-06-07 07:59:40

Dear Guanqin,


Thank you very much for your patch.

Am 07.06.23 um 08:57 schrieb Guanqin Miao:

For the commit message summary/title I’d suggest:

mdmonitor-oneshot.service: Pass `--syslog` to fix start failure
When we start mdmonitor-oneshot.service, we found an fail
a fail
for mdmonitor-oneshot.service:
Maybe even:

mdmonitor-oneshot.service fails with the error below:
mdadm: No mail address or alert command - not monitoring

According to the error information, We modified the Environment
s/We/we/
field and added the syslog parameter.The service can be
s/added/add/
Please add a space after the dot/period.
executed successfully.
Maybe:

Pass the switch `--syslog`, so alerts are reported to syslog and not by 
email or an alert program.
quoted hunk ↗ jump to hunk
---
  systemd/mdmonitor-oneshot.service | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/systemd/mdmonitor-oneshot.service b/systemd/mdmonitor-oneshot.service
index ba86b44e..032b8aad 100644
--- a/systemd/mdmonitor-oneshot.service
+++ b/systemd/mdmonitor-oneshot.service
@@ -10,7 +10,7 @@ Description=Reminder for degraded MD arrays
  Documentation=man:mdadm(8)
  
  [Service]
-Environment=MDADM_MONITOR_ARGS=--scan
+Environment=MDADM_MONITOR_ARGS="--scan --syslog"
Isn’t it more idiomatic for systemd to capture standard out and standard 
error directly? Adding `--syslog` here would add an unwanted redirection?
  EnvironmentFile=-/run/sysconfig/mdadm
  ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
  ExecStart=BINDIR/mdadm --monitor --oneshot $MDADM_MONITOR_ARGS
Could mdadm be fixed to allow to be started without email or alert program?


Kind regards,

Paul
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help