~barryprice/juju-deployer/resolve-yaml-warnings

« back to all changes in this revision

Viewing changes to deployer/env/go.py

  • Committer: Tim Van Steenburgh
  • Date: 2017-09-25 20:26:15 UTC
  • mfrom: (212.1.2 juju-deployer)
  • Revision ID: tvansteenburgh@gmail.com-20170925202615-b7uzog4hsfdbx7zj
[james-page] Allow machine 0 to be terminates for juju 2 or later

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
            " Terminating machines %s", 'forcefully' if force else '')
133
133
 
134
134
        # Don't bother if there are no service unit machines
135
 
        if len(status['machines']) == 1:
 
135
        if len(status['machines']) == 1 and self.juju_version == 1:
136
136
            return
137
137
 
138
138
        # containers before machines, container hosts post wait.
172
172
            self.client.wait_for_no_machines(terminate_wait, callback)
173
173
 
174
174
    def _terminate_machine(self, mid, container_hosts=(), force=False):
175
 
        if mid == "0":
 
175
        if mid == "0" and self.juju_version == 1:
176
176
            return
177
177
        if mid in container_hosts:
178
178
            return