<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Error message when working directory does not exist can be misleading"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89864">89864</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Error message when working directory does not exist can be misleading
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rbarlow@redhat.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>If the WorkingDirectory directive in a unit is configured for a directory that
does not exist, the error message that is printed is a little confusing to
read.

For example, we have a systemd service template[0] that sets the working
directory to /var/run/pulp/. If that folder does not exist when the unit is
started, this is the error message that is printed:

Failed at step CHDIR spawning /usr/bin/celery: No such file or directory

I say "can be" misleading, because I see that technically it is saying that
CHDIR failed *when* spawning /usr/bin/celery (which is correct). Unfortunately,
it might read to some people[1] that /usr/bin/celery didn't exist, which can be
confusing. I think it might be helpful if it instead told me that it could not
find /var/run/pulp. Maybe something like this would be nice:

While spawning /usr/bin/celery, failed to chdir /var/run/pulp: No such file or
directory

Thanks, and let me know if I can provide any more information!

[0]
<a href="https://github.com/pulp/pulp/blob/e6ea3131796df60de3f7e3b98acc2ef108f517f7/server/pulp/server/async/manage_workers.py#L27-L38">https://github.com/pulp/pulp/blob/e6ea3131796df60de3f7e3b98acc2ef108f517f7/server/pulp/server/async/manage_workers.py#L27-L38</a>
[1] Like me ☺</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>