Bootstrapping continues after being interrupted

Bug #1968122 reported by Jordan Barrett
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Simon Richardson

Bug Description

On Juju 2.9-latest, if you interrupt `juju bootstrap` with a Ctrl-C, it says that it's "stopping bootstrap", yet it continues the process:
```
$ juju bootstrap localhost foo2
Creating Juju controller "foo2" on localhost/localhost
Looking for packaged Juju agent version 2.9.29 for amd64
^C
Ctrl-C pressed, stopping bootstrap and cleaning up resources
No packaged binary found, preparing local Juju agent binary
To configure your system to better support LXD containers, please see: https://github.com/lxc/lxd/blob/master/doc/production-setup.md
Launching controller instance(s) on localhost/localhost...
 - juju-78b160-0 (arch=amd64)
Installing Juju agent on bootstrap instance
Fetching Juju Dashboard 0.8.1
Waiting for address
ERROR failed to bootstrap model: cancelled
```

If you interrupt it late enough, it actually still creates the controller:
```
$ juju bootstrap localhost foo2
Creating Juju controller "foo2" ...
...
Running machine configuration script...
^C
Ctrl-C pressed, stopping bootstrap and cleaning up resources
Bootstrap agent now started
Contacting Juju controller at 10.228.51.139 to verify accessibility...
Initial model "default" added

$ juju controllers
Controller ...
foo2* ...
```

This new controller is completely broken - if you try to do anything with it (deploy, add-model, even status), it just hangs forever.

Tags: bootstrap lxd
Revision history for this message
Vitaly Antonenko (anvial) wrote :

Hi Jordan,

Can you more in detail describe the moment when you catch this issue.

I try to ^C while 'Running machine configuration script...', but cannot reproduce the bug. Here is my paste:

https://pastebin.ubuntu.com/p/gFXNbyK8nh/

tags: added: bootstrap lxd
Revision history for this message
Jordan Barrett (barrettj12) wrote :

@anvial: the issue is apparent in the first log, where even after pressing Ctrl-C, it continues with the bootstrapping steps:
```
Launching controller instance(s) on localhost/localhost...
 - juju-6b8de5-0 (arch=amd64)
Installing Juju agent on bootstrap instance
Fetching Juju Dashboard 0.8.1
...
```

I just tried to reproduce on 2.9.30 and observed the same behaviour. I'm pressing Ctrl-C immediately after Juju prints `Running machine configuration script...`.

https://pastebin.ubuntu.com/p/rRv2T2f2Mx/

This is Juju v2.9.30-82fdde7 on Ubuntu 20.04 LTS. Maybe you and I have different LXD configurations?

Revision history for this message
Jordan Barrett (barrettj12) wrote :

I'm still noticing this bug on both Juju 2.9 and 3.0, and on multiple clouds. Here's an example from just today, with Juju 3.0 and AWS:
------------------------------------------------------------
$ juju bootstrap aws
Creating Juju controller "aws-us-east-1" on aws/us-east-1
^C
Ctrl-C pressed, stopping bootstrap and cleaning up resources
Looking for packaged Juju agent version 2.9.35 for amd64
Located Juju agent version 2.9.35-ubuntu-amd64 at https://juju-dist-aws.s3.amazonaws.com/agents/agent/2.9.35/juju-2.9.35-linux-amd64.tgz
Launching controller instance(s) on aws/us-east-1...
 - i-0710a33555e8e58d4 (arch=amd64 mem=8G cores=2)
Installing Juju agent on bootstrap instance
Fetching Juju Dashboard 0.8.1
Waiting for address
ERROR failed to bootstrap model: cancelled
------------------------------------------------------------

Harry Pidcock (hpidcock)
Changed in juju:
importance: Undecided → Medium
milestone: none → 3.2-beta1
status: New → Triaged
Changed in juju:
milestone: 3.2-beta1 → 3.2-rc1
Revision history for this message
Simon Richardson (simonrichardson) wrote :
Changed in juju:
assignee: nobody → Simon Richardson (simonrichardson)
status: Triaged → In Progress
Changed in juju:
milestone: 3.2-rc1 → 3.2.0
Changed in juju:
milestone: 3.2.0 → 3.2.1
Changed in juju:
milestone: 3.2.1 → 3.2.0
status: In Progress → Fix Released
milestone: 3.2.0 → 3.2.1
status: Fix Released → Fix Committed
John A Meinel (jameinel)
Changed in juju:
milestone: 3.2.1 → 3.2.2
Changed in juju:
status: Fix Committed → Fix Released
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.