Cannot bootstrap or destroy local env after cancelling bootstrap

Bug #1273295 reported by Michael Nelson
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Andrew Wilkins

Bug Description

Cancelling local bootstrap (ie. by not authenticating for sudo) leaves an inconsistent state, so that you can't subsequently bootstrap or destroy-environment without manually deleting files.

This looks related but different to bug 1272590

{{{
# Run bootstrap, but then prompted for password because my sudoers only
# allows this user to run juju from various locations. Cancelled to find
# out exactly what juju wants to run:

$ juju bootstrap
[sudo] password for michael:
Sorry, user michael is not allowed to execute '/bin/bash -s' as root on dev.lcy02.canonistack.

$ juju bootstrap
ERROR Get http://10.0.3.1:8040/provider-state: dial tcp 10.0.3.1:8040: connection refused

# Can't destroy environment...

$ juju destroy-environment local -y
ERROR Get http://10.0.3.1:8040/provider-state: dial tcp 10.0.3.1:8040: connection refused

$ juju destroy-environment local -y --force
ERROR exit status 1
ERROR exit status 1

$ juju bootstrap
ERROR Get http://10.0.3.1:8040/provider-state: dial tcp 10.0.3.1:8040: connection refused

$ which juju
/home/michael/golang/bin/juju

$ bzr revno /home/michael/golang/src/launchpad.net/juju-core/
2262

# Update sudoers, new shell, remove the local state and everything is fine:

$ rm -rf $HOME/.juju/local && rm $HOME/.juju/environments/local.jenv

$ juju bootstrap
Logging to /home/michael/.juju/local/log/cloud-init-output.log on remote host
Fetching tools: wget --no-verbose -O $bin/tools.tar.gz 'http://10.0.3.1:8040/tools/releases/juju-1.17.1.1-saucy-amd64.tgz'
Starting MongoDB server (juju-db-michael-local)
Bootstrapping Juju machine agent
Starting Juju machine agent (juju-agent-michael-local)

$ juju status
environment: local
machines:
  "0":
    agent-state: started
    agent-version: 1.17.1.1
    dns-name: localhost
    instance-id: localhost
    series: saucy
services: {}

}}}

Related branches

description: updated
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
tags: added: destroy-environment local-provider lxc
Curtis Hovey (sinzui)
tags: added: regression
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: none → 1.18.0
Revision history for this message
John A Meinel (jameinel) wrote :

We still need to investigate this, but bootstrap now deletes the .jenv if the bootstrap did fail to complete.
https://bugs.launchpad.net/juju-core/+bug/1247152 was part of that

Revision history for this message
Michael Nelson (michael.nelson) wrote :

I still see the same issue: http://paste.ubuntu.com/7005758/

Revision history for this message
Martin Packman (gz) wrote :

Andrew, it seems your latest fix to bootstrap cleaning up after itself in bug 1247152 hasn't also resolved this issue.

Changed in juju-core:
assignee: nobody → Andrew Wilkins (axwalk)
Andrew Wilkins (axwalk)
Changed in juju-core:
status: Triaged → In Progress
Martin Packman (gz)
Changed in juju-core:
status: In Progress → Fix Committed
milestone: 1.18.0 → 1.17.5
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → 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.