~cjwatson/mojo/snap-git-paths

« back to all changes in this revision

Viewing changes to contrib/jenkins/juju2-run-jenkins-job-bzr-spec

  • Committer: mergebot at canonical
  • Author(s): "Haw Loeung"
  • Date: 2020-09-14 04:18:46 UTC
  • mfrom: (565.1.4 force-destroy-model)
  • Revision ID: mergebot@juju-139df4-prod-is-toolbox-0.canonical.com-20200914041846-66ery4m24e5v9if3
Really destroy models with '--force' - LP:1884557

Without '--force' to 'destroy-model', models can be stuck in
'destroying' as Juju waits for application hooks to successfully
finish firing. Unfortunately, hooks can fail for various reasons[1].

[1]https://paste.ubuntu.com/p/nYHnGpX4sS/



Reviewed-on: https://code.launchpad.net/~hloeung/mojo/force-destroy-model/+merge/388105
Reviewed-by: Stuart Bishop <stuart.bishop@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    2.[0-2].*)
24
24
        JUJU_DESTROY_MODEL="juju destroy-model -y"
25
25
        ;;
26
 
    *)
 
26
    2.[3-5].*)
27
27
        # assumes anything newer than juju 2.2.x supports storage
28
28
        JUJU_DESTROY_MODEL="juju destroy-model -y --destroy-storage"
 
29
    *)
 
30
        # assumes anything newer than juju 2.2.x supports storage; anything 2.6.x and newer use '--force' per
 
31
        # LP:1884557 for units failing to successfully finish executing hooks.
 
32
        JUJU_DESTROY_MODEL="juju destroy-model -y --destroy-storage --force"
29
33
        ;;
30
34
esac
31
35