~wjh-fresh/maas/maas2.1_XSpowerType

« back to all changes in this revision

Viewing changes to src/provisioningserver/rackdservices/ntp.py

  • Committer: MAAS Lander
  • Author(s): Blake Rouse
  • Date: 2017-02-14 20:48:08 UTC
  • mfrom: (5584.1.1 rpc-client-now-2.1)
  • Revision ID: maas_lander-20170214204808-1eznwz38ol8u5ysl
[r=blake-rouse][bug=1626654][author=blake-rouse] Backport r5725: Add new getClientNow that ensures a connection to a region controller before returning a client. Use the new getClientNow across the rack controller getClient calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
        subsequently obtained configuration objects, allowing this service to
67
67
        determine whether a change needs to be applied to the NTP server.
68
68
        """
69
 
        client = self._rpc_service.getClient()
 
69
        client = yield self._rpc_service.getClientNow()
70
70
        time_configuation = yield client(
71
71
            GetTimeConfiguration, system_id=client.localIdent)
72
72
        controller_type = yield client(