diff --git a/buildman/server.py b/buildman/server.py index 72da134da..d8e096135 100644 --- a/buildman/server.py +++ b/buildman/server.py @@ -139,15 +139,16 @@ class BuilderServer(object): @trollius.coroutine def _work_checker(self): while self._current_status == 'running': + with database.CloseForLongOperation(app.config): + yield From(trollius.sleep(WORK_CHECK_TIMEOUT)) + logger.debug('Checking for more work for %d active workers', self._lifecycle_manager.num_workers()) job_item = self._queue.get(processing_time=self._lifecycle_manager.setup_time()) if job_item is None: logger.debug('No additional work found. Going to sleep for %s seconds', WORK_CHECK_TIMEOUT) - with database.CloseForLongOperation(app.config): - yield From(trollius.sleep(WORK_CHECK_TIMEOUT)) - continue + continue try: build_job = BuildJob(job_item) @@ -165,6 +166,8 @@ class BuilderServer(object): logger.debug('All workers are busy. Requeuing.') self._queue.incomplete(job_item, restore_retry=True, retry_after=0) + + @trollius.coroutine def _initialize(self, loop, host, websocket_port, controller_port, ssl=None): self._loop = loop diff --git a/buildman/templates/cloudconfig.yaml b/buildman/templates/cloudconfig.yaml index 09e6327ae..33f545750 100644 --- a/buildman/templates/cloudconfig.yaml +++ b/buildman/templates/cloudconfig.yaml @@ -1,5 +1,10 @@ #cloud-config +ssh_authorized_keys: +- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClk9Xh+wHZ3Iw7r2sQwyhpN2qMd7JEZ8ved9J+4cfJ8QKjZkecXVm5mEV5z92cZgUlM3Tr+4VjVWDtAuEQVyGi44I3vNjeRW8WOJ60JkcM/u+aAauN0Ep6+8WCH5iq+uFE9kRwmCLW28bpG1lOaL4MdsP/mY7fzgyYct3F5aZhHOHY2MvLrg54Hqa7MhuGjuW+sy6WQrhwowiNLUxpRdJ6TyIqQ5ukbtfE1W4OOMNZruHOELPw/uGMS1GClP/JzEyHpGblNhEKtmQXu89t0zRki6SerRnR3d18/s8JImGzRhaG560r3bHCvs1HZH9jZh2+p5cN0/3T7Dn0QSDwgAfJ Jake's Mac +- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCC0m+hVmyR3vn/xoxJe9+atRWBxSK+YXgyufNVDMcb7H00Jfnc341QH3kDVYZamUbhVh/nyc2RP7YbnZR5zORFtgOaNSdkMYrPozzBvxjnvSUokkCCWbLqXDHvIKiR12r+UTSijPJE/Yk702Mb2ejAFuae1C3Ec+qKAoOCagDjpQ3THyb5oaKE7VPHdwCWjWIQLRhC+plu77ObhoXIFJLD13gCi01L/rp4mYVCxIc2lX5A8rkK+bZHnIZwWUQ4t8SIjWxIaUo0FE7oZ83nKuNkYj5ngmLHQLY23Nx2WhE9H6NBthUpik9SmqQPtVYbhIG+bISPoH9Xs8CLrFb0VRjz Joey's Mac +- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCo6FhAP7mFFOAzM91gtaKW7saahtaN4lur42FMMztz6aqUycIltCmvxo+3FmrXgCG30maMNU36Vm1+9QRtVQEd+eRuoIWP28t+8MT01Fh4zPuE2Wca3pOHSNo3X81FfWJLzmwEHiQKs9HPQqUhezR9PcVWVkbMyAzw85c0UycGmHGFNb0UiRd9HFY6XbgbxhZv/mvKLZ99xE3xkOzS1PNsdSNvjUKwZR7pSUPqNS5S/1NXyR4GhFTU24VPH/bTATOv2ATH+PSzsZ7Qyz9UHj38tKC+ALJHEDJ4HXGzobyOUP78cHGZOfCB5FYubq0zmOudAjKIAhwI8XTFvJ2DX1P3 jimmyzelinskie + write_files: - path: /root/overrides.list permission: '0644'