Juju keeps creating OpenStack VMs if it cannot allocate a floating IP
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Angelos Kolaitis |
Bug Description
### Summary
When attempting to create a new machine with OpenStack clouds, Juju uses the allocate-public-ip constraint to decide whether it should allocate and/or attach a floating IP to the Nova instance.
If it fails to allocate a public IP, it abandons the machine creation loop, but does not cleanup the nova instance. It then restarts the loop, which leads to multiple machines being created and abandoned.
### Reproduce
1. Have an OpenStack project, allocate and attach all floating IPs to reach the project quota.
2. In a configured controller on this cloud, attempt to add a new machine with `juju add-machine --constraints 'allocate-
3. Wait for Juju to start machine
### juju status output
The output of `juju status` alternates between:
```
Machine State DNS Inst id Series AZ Message
0 pending pending focal instance "83951fe2-
```
and
```
Machine State DNS Inst id Series AZ Message
0 pending pending focal failed to start machine 0 (cannot allocate a public IP as needed: failed to allocate a floating ip
caused by: request (https:/
```
until it finally times out and becomes:
```
0 down pending focal cannot allocate a public IP as needed: failed to allocate a floating ip
caused by: request (https:/
```
### openstack server list
Even though the machine is never created successfully, Juju creates and abandons a number of Nova instances:
```
ubuntu@wayfarer ~ $ o server list
+------
| ID | Name | Status | Networks | Image | Flavor |
+------
| 7128bfa0-
| 51cf173a-
| 4f0c2f91-
| e3851eee-
| d6a33325-
| fc5266f3-
| edfe3afb-
| 8b5bcea2-
| 83951fe2-
| 14659ea9-
| 0866922f-
...
```
### Debugging
I believe the issue comes from https:/
I see that Juju will terminate an instance if it fails to assign the public IP (e.terminateIns
### Notes
This bug does not occur when bootstrapping new Juju controllers for OpenStack clouds.
Changed in juju: | |
milestone: | none → 2.9-next |
status: | New → Triaged |
Changed in juju: | |
importance: | Undecided → High |
status: | In Progress → Fix Committed |
Changed in juju: | |
milestone: | 2.9.30 → 2.9.31 |
Changed in juju: | |
status: | Fix Committed → Fix Released |
https:/ /github. com/juju/ juju/pull/ 13959