destroy model fails when there are offers

Bug #1831546 reported by Ian Booth on 2019-06-04
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju
High
Tim McNamara

Bug Description

If you have an offer with connection(s) to that offer, destroy-model fails because it gets hung up on trying to remove the offered application, which normally is not allowed if there's an offer. But destroying a model should negate this. The destroy operation should (if it doesn't already) have an explicit step to force remove any offers, thus unblocking the subsequent application removal.

description: updated
Tim McNamara (tim-clicks) wrote :

Having trouble tracking this down. When applications are removed via remove-model, we remove offers[0]. Am also having difficulty reproducing this behaviour. With the latest 2.6, destroying a model with active offers completes successfully:

  juju add-model a &&
  juju deploy postgresql pg
  juju offer pg:db

  juju add-model b
  juju deploy vault
  juju consume a.pg
  juju relate pg vault

  # https://pypi.org/project/juju-wait/
  juju wait

  juju destroy-model -y a

Possibly related: if the destroy application operations are generated by remove-unit, then offers are not removed[1].

  [0]: https://github.com/juju/juju/blob/fda7e1f1e2bf007f44bbc7cd3a8aa71bc75c7f05/state/cleanup.go#L468
  [1]: https://github.com/juju/juju/blob/00d54bdb7387b771e26d9302f482671b9805b094/state/application.go#L2112

Changed in juju:
status: Triaged → In Progress
Ian Booth (wallyworld) on 2019-06-13
Changed in juju:
status: In Progress → Incomplete
Ian Booth (wallyworld) wrote :

Confirmed by the field folks as fixed in 2.6.4 candidate snap

Changed in juju:
status: Incomplete → Fix Committed

Great news

On Thu, 20 Jun 2019, 01:41 Ian Booth <<email address hidden> wrote:

> Confirmed by the field folks as fixed in 2.6.4 candidate
>

Anastasia (anastasia-macmood) wrote :

This is brilliant \o/ Well done, team :D

Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers