Pressing ctrl~C can leave juju in a weird broken(?) state

Bug #2012252 reported by Simon Richardson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

Whilst developing, I didn't correctly setup the APIServer (I missed a dependency) and went to check out why, I saw that the dependency engine was crash looping (this is normal). So I ctrl-C'd the bootstrap process, which then followed up with a welcoming method:

Extract from the `/var/log/juju/machine-0.log`:

github.com/juju/juju/worker/apiserver.ManifoldConfig.Validate:107: empty DBAccessorName not valid
github.com/juju/juju/worker/apiserver.ManifoldConfig.start:151:
2023-03-20 10:43:12 ERROR juju.worker.dependency engine.go:695 "api-server" manifold worker returned unexpected error: empty DBAccessorName not valid
2023-03-20 10:43:18 DEBUG juju.worker.apicaller connect.go:116 connecting with current password
2023-03-20 10:43:18 DEBUG juju.api apiclient.go:820 looked up localhost -> [127.0.0.1]
2023-03-20 10:43:19 DEBUG juju.worker.apicaller connect.go:160 [916e57] failed to connect
2023-03-20 10:43:19 DEBUG juju.worker.dependency engine.go:618 "api-caller" manifold worker stopped: [916e57] "machine-0" cannot open api: unable to connect to API: dial tcp 127.0.0.1:17070: connect: connection refused
stack trace:
dial tcp 127.0.0.1:17070: connect: connection refused
github.com/juju/juju/api.gorillaDialWebsocket:751:
github.com/juju/juju/api.dialer.dial1:1171:
github.com/juju/juju/api.dialer.dial:1146: unable to connect to API
github.com/juju/juju/api.dialWebsocketMulti:1042:
github.com/juju/juju/api.dialAPI:700:
github.com/juju/juju/api.Open:218:
github.com/juju/juju/worker/apicaller.connectFallback:161:
github.com/juju/juju/worker/apicaller.ScaryConnect:216:
github.com/juju/juju/worker/apicaller.ManifoldConfig.startFunc.func1:97: [916e57] "machine-0" cannot open api
2023-03-20 10:43:19 ERROR juju.worker.dependency engine.go:695 "api-caller" manifold worker returned unexpected error: [916e57] "machine-0" cannot open api: unable to connect to API: dial tcp 127.0.0.1:17070: connect: connection refused
2023-03-20 10:43:21 DEBUG juju.worker.dbaccessor connector.go:77 attempt 1: server 240.60.0.120:17666: connected
2023-03-20 10:43:25 DEBUG juju.worker.dependency engine.go:618 "api-server" manifold worker stopped: empty DBAccessorName not valid
stack trace:
github.com/juju/juju/worker/apiserver.ManifoldConfig.Validate:107: empty DBAccessorName not valid
github.com/juju/juju/worker/apiserver.ManifoldConfig.start:151:
2023-03-20 10:43:25 ERROR juju.worker.dependency engine.go:695 "api-server" manifold worker returned unexpected error: empty DBAccessorName not valid
2023-03-20 10:43:35 DEBUG juju.worker.apicaller connect.go:116 connecting with current password
2023-03-20 10:43:35 DEBUG juju.api apiclient.go:820 looked up localhost -> [127.0.0.1]
2023-03-20 10:43:36 DEBUG juju.worker.apicaller connect.go:160 [916e57] failed to connect
2023-03-20 10:43:36 DEBUG juju.worker.dependency engine.go:618 "api-caller" manifold worker stopped: [916e57] "machine-0" cannot open api: unable to connect to API: dial tcp 127.0.0.1:17070: connect: connection refused
stack trace:
dial tcp 127.0.0.1:17070: connect: connection refused
github.com/juju/juju/api.gorillaDialWebsocket:751:
github.com/juju/juju/api.dialer.dial1:1171:
github.com/juju/juju/api.dialer.dial:1146: unable to connect to API
github.com/juju/juju/api.dialWebsocketMulti:1042:
github.com/juju/juju/api.dialAPI:700:
github.com/juju/juju/api.Open:218:
github.com/juju/juju/worker/apicaller.connectFallback:161:
github.com/juju/juju/worker/apicaller.ScaryConnect:216:
github.com/juju/juju/worker/apicaller.ManifoldConfig.startFunc.func1:97: [916e57] "machine-0" cannot open api
2023-03-20 10:43:36 ERROR juju.worker.dependency engine.go:695 "api-caller" manifold worker returned unexpected error: [916e57] "machine-0" cannot open api: unable to connect to API: dial tcp 127.0.0.1:17070: connect: connection refused

Extract from the bootstrap logs. Notice the end which states that we can create a new model:

juju bootstrap lxd test --build-agent
Creating Juju controller "test" on lxd/default
Building local Juju agent binary version 3.2-beta1 for amd64
To configure your system to better support LXD containers, please see: https://linuxcontainers.org/lxd/docs/master/explanation/performance_tuning/
Launching controller instance(s) on lxd/default...
 - juju-1a4826-0 (arch=amd64)
Installing Juju agent on bootstrap instance
Waiting for address
Attempting to connect to 240.60.0.120:22
Connected to 240.60.0.120
Running machine configuration script...
Bootstrap agent now started
Contacting Juju controller at 240.60.0.120 to verify accessibility...
^C
Ctrl-C pressed, stopping bootstrap and cleaning up resources

Now you can run
        juju add-model <model-name>
to create a new model to deploy workloads.

summary: - Pressing ctrl~C can leave juju in a broken state
+ Pressing ctrl~C can leave juju in a weird broken(?) state
Changed in juju:
importance: Medium → Low
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.