<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - RFE: NOTIFY_SOCKET ERRNO is not implemented"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=80749">80749</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>RFE: NOTIFY_SOCKET ERRNO is not implemented
          </td>
        </tr>

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

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

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

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

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

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

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description of problem:

  NOTIFY_SOCKET specification of systemd [1] describes the ERRNO argument,
that would allow for passing error numbers for 'systemctl status' return,
but it's not implemented [2],[3]

  I discovered it during the design of this specifications: [4]



   I'm am proposing a new dbus field for this message (ERRNO, along with PID,
Code, Status). 

   Initially I thought of using the ExecStatus code, but this is overwritten at
final daemon exit.

   Also, I think this message has potential [4] to be used as a complement 
to the status string which can be passed via NOTIFY_SOCKET, but as a 
numeric error when a daemon is having any trouble and running in degraded 
mode. Specially when using some HA solution like pacemaker and we need to
notify that the service is degraded, but we don't want to bring the service
down to communicate an exit code.


[1] <a href="http://www.freedesktop.org/software/systemd/man/sd_notify.html">http://www.freedesktop.org/software/systemd/man/sd_notify.html</a>
[2]
<a href="http://cgit.freedesktop.org/systemd/systemd/tree/src/core/service.c?id=194bbe33382f5365be3865ed1779147cb#n3201">http://cgit.freedesktop.org/systemd/systemd/tree/src/core/service.c?id=194bbe33382f5365be3865ed1779147cb#n3201</a>
[3]
<a href="http://cgit.freedesktop.org/systemd/systemd/tree/src/systemctl/systemctl.c?id=194bbe33382f5365be3865ed1779147cb#n2882">http://cgit.freedesktop.org/systemd/systemd/tree/src/systemctl/systemctl.c?id=194bbe33382f5365be3865ed1779147cb#n2882</a>
[4]
<a href="http://docs-draft.openstack.org/48/97748/1/check/gate-oslo-specs-docs/c4a464e/doc/build/html/">http://docs-draft.openstack.org/48/97748/1/check/gate-oslo-specs-docs/c4a464e/doc/build/html/</a></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>