[Bug 1642402] Re: [ubuntu 16.10] mdmonitor.service does not use syslog or environment file

Dimitri John Ledkov launchpad at surgut.co.uk
Sat Mar 10 21:37:15 UTC 2018


The standard way to customize any systemd units on ubuntu is to use
drop-ins, or full replacements of units.

For example use: `systemctl edit foo.service' or `systemctl edit --full
foo.service'.

Including environmental files was only available as part of migration
from sysv-init / upstart, and is not the right way to override and
customize units by the administrator going forward.

By default logs go to journal, and are forwarded to syslog as well. What
does --syslog give you, which doesn't get logged into syslog already?

--test is not appropriate for the default cofiguration, nor this unit by
default, as such exit statuses would be treated as failures by systemd.
If one wishes to use --test disabling this unit, and making a custom one
is the way forward. As the meaning of --test is quite different.


** No longer affects: mdadm

** Changed in: mdadm (Ubuntu)
       Status: New => Opinion

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mdadm in Ubuntu.
https://bugs.launchpad.net/bugs/1642402

Title:
  [ubuntu 16.10] mdmonitor.service does not use syslog or environment
  file

Status in mdadm package in Ubuntu:
  Opinion

Bug description:
  Previously, the standard place to configure mdadm monitoring behavior
  has been /etc/default/mdadm, where DAEMON_OPTIONS and so forth can be
  set. By default these options include "--syslog", and often people add
  a "--test" option there so that they get a test notification when the
  monitoring daemon restarts.

  Currently, the mdmonitor.service unit does not load /etc/default/mdadm
  or provide any other mechanism for customization:

  > cat /lib/systemd/system/mdmonitor.service
  # [...snip...]

  [Unit]
  Description=MD array monitor
  DefaultDependencies=no

  [Service]
  ExecStart=/sbin/mdadm --monitor --scan

  Also, as you can see the monitor no longer defaults to using --syslog;
  I don't know if that was intended as part of the change to systemd or
  was an accident. In any case, it appears that the monitoring results
  aren't logged to any system log.

  Moreover, there's no ability for the user to further customize the
  mdadm arguments.

  Should "EnvironmentFile=-/etc/default/mdadm" be added to the service
  description and DAEMON_OPTIONS passed along to mdadm? Should some
  other option be used for configuration? Currently there's a lot of
  advice on the internet about using /etc/default/mdadm to configure
  monitoring, but that doing any of that now seems to be a no-op.

  Versions: 
  I'm using a fully updated kubuntu 16.10 install.

  mdadm --version
  mdadm - v3.4 - 28th January 2016

  uname -provism
  Linux 4.8.0-27-generic #29-Ubuntu SMP Thu Oct 20 21:03:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/1642402/+subscriptions



More information about the foundations-bugs mailing list