Restore fails with no instances found

Bug #1558158 reported by Martin Packman
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Cheryl Jennings
juju-core
Fix Released
High
Anastasia
1.25
Fix Released
High
Anastasia

Bug Description

From a recent change on master, the restore command now fails with "no instances found; perhaps the model was not bootstrapped".

<http://reports.vapour.ws/releases/issue/56e97663749a5630fd107ba9>
<http://reports.vapour.ws/releases/3755/job/functional-backup-restore/attempt/3829>

Instrumenting node failure for member 0: i-45c013de at 54.165.0.218
Deleting i-45c013de.
INSTANCE i-45c013de
Waiting for port to close on 54.165.0.218
Closed.
Starting restore.
Call of juju restore exited with an error

Restore failed:
2016-03-15 04:50:50 INFO juju.cmd supercommand.go:60 running juju [2.0-beta3 gc go1.2.1]
2016-03-15 04:50:50 INFO juju.environs.local/share config.go:521 Based on your "provisioner-safe-mode" setting, configuring "provisioner-harvest-mode" to "destroyed".
2016-03-15 04:50:50 INFO juju.provider.ec2 provider.go:48 opening model "functional-backup-restore"
2016-03-15 04:50:51 ERROR cmd supercommand.go:448 no instances found; perhaps the model was not bootstrapped

Martin Packman (gz)
tags: added: blocker
Changed in juju-core:
assignee: nobody → Cheryl Jennings (cherylj)
Revision history for this message
Cheryl Jennings (cherylj) wrote :

Injected by PR: https://github.com/juju/juju/pull/4467

The above PR changes how we keep track of our controllers. Previously, it was a list inside juju that was added to when new controllers were created, and pruned when removing controllers. After this PR, we simply tag ec2 instances with juju-is-controller:true, and run a query on ec2 instances with that tag to get the list of controllers.

This means that for this CI test, since we terminate the controller instance before attempting to restore, we no longer return any controllers for this model. This should be fine, since it means it should be eligible for restore -b, but the logic in restore was not updated to handle this behavior.

This should be a simple matter of updating restore to treat a controller instance list length of 0 the same as not being able to find a controller instance by ID.

Changed in juju-core:
status: Triaged → In Progress
Revision history for this message
Cheryl Jennings (cherylj) wrote :
Changed in juju-core:
status: In Progress → Fix Committed
Revision history for this message
Cheryl Jennings (cherylj) wrote :

These tests passed in the last run on master. Removing blocker tag.

tags: removed: blocker
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
Revision history for this message
Anastasia (anastasia-macmood) wrote :

For 1.25, providers that support tagging to keep track of instances are ec2 and openstack. Reported CI bug 1507637

So the approach that deals with the above error cannot be easily cherry-picked but adopted.

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

adapted even \o/

tags: added: 2.0-count
affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta3 → none
milestone: none → 2.0-beta3
Changed in juju-core:
assignee: nobody → Anastasia (anastasia-macmood)
importance: Undecided → High
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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