<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 --- - org.freedesktop.timedate1 SetNTP should not always enable the ntpd.service"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=55938">55938</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>org.freedesktop.timedate1 SetNTP should not always enable the ntpd.service
          </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>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>twelve.eighty@gmail.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>When using systemd, NetworkManager, NTP and then networkmanager-dispatcher-ntpd
to start NTP after NetworkManager has established a connection, the
ntpd.service service gets enabled by a call to gdbus:

gdbus call \
        --system \
        --object-path /org/freedesktop/timedate1 \
        --dest org.freedesktop.timedate1 \
        --method org.freedesktop.timedate1.SetNTP true false

The problem is that the org.freedesktop.timedate1.SetNTP method appears to
*enable* the ntpd.service and then start it. This should not be done, since in
a NetworkManager scenario, the ntpd.service should be left disabled and only
*started* when a connection is made.

The result of this bug is that upon a reboot, ntpd.service is automatically
started, BEFORE network manager creates a connection. Even after ntpd.service
is disabled again, the next time a connection is made, ntpd.service is
re-enabled.

I believe this is the problem:
<a href="http://cgit.freedesktop.org/systemd/systemd/tree/src/timedate/timedated.c">http://cgit.freedesktop.org/systemd/systemd/tree/src/timedate/timedated.c</a>

Line 871: r = enable_ntp(connection, &error);

I think that should be removed, so that only the remaining start_ntp() call is
made.</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>