The Client.WatchAll API command never responds when the model has no machines
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Critical
|
Eric Snow |
Bug Description
I'm using this API call:
https:/
with version 2.0-beta2-
and deploying to an openstack cloud (canonistack lcy02).
I have 2 models:
fginther@sandman:~$ juju list-models
NAME OWNER LAST CONNECTION
lcy02-ctl admin@local 1 hour ago
jd-test* admin@local 13 minutes ago
Whenever I target jd-test, the Client.WatchAll call never returns if the model has no machines. It will wait for a response forever. However, as soon as I 'juju add-machine' in another terminal the method returns a response and all appears well again. The problem only occurs when the target model has no machines.
Targeting the controller model, 'lcy02-ctl', works just fine. This model always has at least one machine, the bootstrap instance.
I can supply debug traces of the response and requests if it would help.
tags: | added: landscape |
tags: | added: kanban-cross-team |
tags: | removed: kanban-cross-team |
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 2.0-beta4 |
tags: | added: juju-release-support |
Changed in juju-core: | |
importance: | High → Critical |
Changed in juju-core: | |
assignee: | nobody → Eric Snow (ericsnowcurrently) |
Changed in juju-core: | |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | In Progress → Incomplete |
tags: | added: 2.0-count |
Changed in juju-core: | |
status: | Incomplete → New |
tags: | added: kanban-cross-team |
Changed in juju-core: | |
status: | New → Triaged |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
affects: | juju-core → juju |
Changed in juju: | |
milestone: | 2.0-beta4 → none |
milestone: | none → 2.0-beta4 |
Here are the steps I took to try (and fail) to reproduce:
-------------- lp1560201. go
git up master
godeps -u dependencies.tsv
go install ./...
juju bootstrap --upload-tools test-a lxd
juju create-model model-a
go run /tmp/test-
--------------
(test-lp1560201.go is attached)
The critical part of the attached code is the following section:
--------------
return err
func (c *testCommand) Run(ctx *cmd.Context) error {
client, err := c.NewAPIClient()
if err != nil {
}
defer client.Close()
watcher, err := client.WatchAll()
return err
panic( "???")
fmt.Fprintln( ctx.Stdout, "did not block")
if err != nil {
}
if watcher == nil {
}
return nil
}
--------------
It did not block.