Some providers release wrong resources when destroying hosted models

Bug #1536792 reported by Cheryl Jennings
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Anastasia

Bug Description

When destroying hosted models, resources associated with another model with the same name may also be released (i.e. security groups, disks, instances).
This currently affects Joyent, AWS and GCE providers.
In case of GCE the resources involved are Disks.
In case of AWS the involved resources are security groups, volumes and instances.

AWS and GCE will be fixed in Juju 2.0-alpha2. Joyent still needs to be fixed.

Tags: 2.0-count
Changed in juju-core:
status: New → Fix Committed
importance: Undecided → Critical
milestone: none → 2.0-alpha2
description: updated
description: updated
Changed in juju-core:
status: Fix Committed → In Progress
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-alpha2 → 2.0-beta1
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta1 → 2.0-beta2
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta2 → 2.0-beta3
Changed in juju-core:
assignee: nobody → Anastasia (anastasia-macmood)
Revision history for this message
Anastasia (anastasia-macmood) wrote :

This is the scenario that I am running:

1. Bootstrap 2 controllers (by default, I'll get 2 host models with same name as well - "default").
2. Add a machine to each hosted non-admin model.
3. Remove one of the machines.
4. Make sure that the other controller has all its artifacts intact.
5. Destroy one controller
6. Make sure that the other controller is intact.
7. Destroy remaining controller.

JOYENT failures:

3. Remove on of the machine - I can't specify which model to remove from:
>juju remove-machine 0 -m=default
ERROR model local.tags:admin@local:=default not found

If I omit -m flag, the command returns fine but no machines are destroyed.

6. Once one controller is successfully destroyed, I cannot get status nor run list-models against the remaining controller. Command never returns.

7. Killing remaining controller fails with:
Unable to open API: open connection timed out
Unable to connect to the API server. Destroying through provider.

Revision history for this message
Anastasia (anastasia-macmood) wrote :

The above scenario runs fine on AWS.

Revision history for this message
Anastasia (anastasia-macmood) wrote :

I think that Joyent cloud itself does not tag.

Even though we are passing tags to cloudapi.CreateMachine, machine that is created by this call has no tags.

TAGS passed in as parameters to Joyent create machine:
[LOG] 0:00.042 DEBUG juju.provider.joyent Now tags are: map[juju-model-uuid:deadbeef-0bad-400d-8000-4b1d0d06f00d juju-is-controller:true tag.group:juju tag.env:joyent test model]

TAGS inspection post-creation:
[LOG] 0:00.046 INFO juju.provider.joyent machine created with tags map[]

cloudapi accepts tags and passes them on but they seem to be ignored.

Revision history for this message
Anastasia (anastasia-macmood) wrote :

Joyent tags must be prefixed by "tag." when passed into CreateMachine call.

However, once the machine is created, the prefix seem to be stripped.

2016-03-24 06:28:44 DEBUG juju.provider.joyent environ_instance.go:153 Now tags are: map[tag.juju-model-uuid:ad628a97-3aab-4938-827d-4c402ecc0c2b tag.juju-is-controller:true tag.group:juju tag.env:admin]
2016-03-24 06:28:53 INFO juju.provider.joyent environ_instance.go:167 provisioning instance "467a17be-4cce-4b94-bf5d-1b705e90e4e2"
2016-03-24 06:28:53 INFO juju.provider.joyent environ_instance.go:168 machine created with tags map[env:admin juju-model-uuid:ad628a97-3aab-4938-827d-4c402ecc0c2b juju-is-controller:true group:juju]
2

 I am doing more investigations and coding but this looks very promising \o/

Revision history for this message
Anastasia (anastasia-macmood) wrote :
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
tags: added: 2.0-count
affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta3 → none
milestone: none → 2.0-beta3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.