IP address sometimes not set or incorrect on pebble_ready event
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Harry Pidcock |
Bug Description
Per the report from "sed-i" in https:/
ENVIRONMENT
mickrok8s in multipass (4 cpus, 8G ram):
$ juju --version
2.9.0-ubuntu-amd64
$ microk8s kubectl version
Client Version: version.
DESCRIPTION
When I deploy and then add 3 units (alertmanager https:/
This does not happen if I manually (slowly) add the units one by one.
Expected: An IP address is ready (and correct) by the time pebble_ready fires.
Actual: Occasionally, when adding multiple units at once, IP address is not available (or old) when queried from within pebble_ready.
REPRODUCIBLE SCENARIO
While adding 3 units
Very consistently, the following code assigns None to bind_address, for 1-2 of the added units:
relation = self.model.
bind_address = self.model.
Similarly, unit-get occasionally returns an empty string under the same circumstances:
bind_address = check_output(
When restarting the machine
I have 4 units running, and then suddenly I sudo reboot. When the application (alertmanager) starts up, bind_address returns the IP address from the previous boot.
tags: | added: sidecar-charn |
tags: |
added: sidecar-charm removed: sidecar-charn |
Changed in juju: | |
milestone: | 2.9.4 → 2.9.5 |
Changed in juju: | |
milestone: | 2.9.5 → 2.9.6 |
Changed in juju: | |
assignee: | nobody → Harry Pidcock (hpidcock) |
status: | Triaged → In Progress |
Changed in juju: | |
milestone: | 2.9.6 → 2.9.7 |
Changed in juju: | |
status: | In Progress → Fix Committed |
milestone: | 2.9.7 → 3.0.0 |
milestone: | 3.0.0 → 2.9.7 |
status: | Fix Committed → Fix Released |
Changed in juju: | |
milestone: | 2.9.7 → 2.9.6 |
Changed in juju: | |
milestone: | 2.9.6 → 2.9.7 |
status: | Fix Released → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
It makes sense that for pod-spec charms they might not have a bind address at the time the charm code runs, since if they haven't declared a pod spec yet, there is no workload pod.
However, the with sidecar charms, the pod is running both the charm container and the workload container, and by the time pebble_ready fires there should be a valid IP address for the pod. (I would actually expect us to have a valid IP by the time 'install' fires.)