[systemd-bugs] [Bug 87323] New: Easier management of mount targets as dependencies of services

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Dec 15 02:06:01 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=87323

            Bug ID: 87323
           Summary: Easier management of mount targets as dependencies of
                    services
           Product: systemd
           Version: unspecified
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: enhancement
          Priority: medium
         Component: general
          Assignee: systemd-bugs at lists.freedesktop.org
          Reporter: stephen at redhat.com
        QA Contact: systemd-bugs at lists.freedesktop.org

Let's say I have a service target called 'pulp_celerybeat' that requires some
content from the /var/lib/pulp directory in order to start.  

This directory contains RPM content (and quite a lot of it), so users may want
to move this to a network share.

When I do, this service no longer starts because it can happen that
/var/lib/pulp isn't mounted.

I've fixed this by creating:
  /etc/systemd/system/pulp_celerybeat.service.d/amendments.conf

With:
  [Unit]
  RequireMountsFor=/var/lib/pulp

Easy enough.

But systemd knows about all the mount targets.  It also knows that
pulp_celerybeat uses /var/lib/pulp by this in the unit file:

  [Service]
  WorkingDirectory=/var/lib/pulp/celery/

Would it be possible to do this dependency management automatically?

Alternatively, supporting some directive like "RequiresDir" that we could ship
in the packaged unit files would be useful, so if a user does move our storage
to a network share, systemd would set the right mount dependencies
automatically.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20141215/bef1b5d9/attachment.html>


More information about the systemd-bugs mailing list