Merge lp:~allenap/maas/respawn-cluster-until-it-works into lp:~maas-maintainers/maas/packaging
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Gavin Panella | ||||
Approved revision: | 328 | ||||
Merged at revision: | 327 | ||||
Proposed branch: | lp:~allenap/maas/respawn-cluster-until-it-works | ||||
Merge into: | lp:~maas-maintainers/maas/packaging | ||||
Diff against target: |
53 lines (+27/-11) 1 file modified
debian/maas-cluster-controller.maas-clusterd.upstart (+27/-11) |
||||
To merge this branch: | bzr merge lp:~allenap/maas/respawn-cluster-until-it-works | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raphaël Badin (community) | Approve | ||
Julian Edwards (community) | Approve | ||
Andres Rodriguez | Pending | ||
Review via email: mp+238331@code.launchpad.net |
Commit message
Force a delay and respawn of the cluster controller when the shared-secret has not yet been installed.
Description of the change
There's a race when installing the MAAS packages on a new installation *or* when upgrading. If the cluster is started before the region, it will find no shared-secret and crash. This is because the pre-start script in /etc/init/
I propose moving the pre-start check for the secret into the script section. If the script does not exist, print out an explanatory message, sleep for 5 seconds, then die. Upstart will then respawn the job. If the region has by now started then the cluster controller will be started too.
Thanks comrades!