install hook fails on public or private address not found
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Won't Fix
|
Undecided
|
Unassigned | ||
Ceph RADOS Gateway Charm |
In Progress
|
Undecided
|
Unassigned | ||
EasyRSA Charm |
Fix Released
|
High
|
Gabriel Cocenza | ||
Elasticsearch Charm |
Fix Released
|
High
|
Unassigned | ||
Etcd Charm |
Fix Released
|
High
|
Gabriel Cocenza | ||
OpenStack RabbitMQ Server Charm |
New
|
Undecided
|
Unassigned | ||
memcached-charm |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Test run here:
https:/
Artifacts/
https:/
Juju controller crashdump:
https:/
Juju model crashdump:
https:/
---
This occurred on 3/6 of our Juju release runs on AWS last night.
The other 3 succeeded just fine. All 3 of these failing runs were within 1hr which made us a bit suspicious something went wrong with AWS. But juju status shows that we were able to get a public IP just fine.
---
Install hook Traceback:
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
2021-04-15 16:33:58 WARNING unit.easyrsa/
Related branches
- 🤖 prod-jenkaas-bootstack: Approve (continuous-integration)
- Andrea Ieri: Approve
- Linda Guo (community): Approve
- BootStack Reviewers: Pending requested
-
Diff: 217 lines (+54/-26)6 files modifieddev/null (+0/-1)
hooks/hooks.py (+51/-22)
metadata.yaml (+0/-2)
tests/functional/tests/tests.yaml (+0/-1)
tests/unit/requirements.txt (+1/-0)
tox.ini (+2/-0)
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 2.9-rc12 |
Changed in charm-easyrsa: | |
status: | Triaged → New |
importance: | High → Undecided |
Changed in charm-easyrsa: | |
assignee: | nobody → Gabriel Angelo Sgarbi Cocenza (gabrielcocenza) |
status: | Triaged → In Progress |
tags: | added: review-needed |
summary: |
- easyrsa install hook fails on public address not found + install hook fails on public address not found |
Changed in charm-easyrsa: | |
status: | In Progress → Fix Committed |
tags: |
added: backport-needed removed: review-needed |
Changed in charm-easyrsa: | |
milestone: | none → 1.22+ck3 |
Changed in charm-easyrsa: | |
milestone: | 1.22+ck3 → 1.23 |
tags: | removed: backport-needed |
tags: | added: network |
Changed in charm-easyrsa: | |
status: | Fix Committed → Fix Released |
Changed in charm-etcd: | |
milestone: | none → 1.24 |
Changed in charm-etcd: | |
assignee: | nobody → Gabriel Angelo Sgarbi Cocenza (gabrielcocenza) |
Changed in charm-etcd: | |
status: | Triaged → In Progress |
Changed in charm-elasticsearch: | |
importance: | Undecided → High |
Changed in charm-ceph-radosgw: | |
assignee: | nobody → Gabriel Angelo Sgarbi Cocenza (gabrielcocenza) |
status: | New → In Progress |
Changed in charm-etcd: | |
status: | In Progress → Fix Committed |
Changed in charm-etcd: | |
status: | Fix Committed → Fix Released |
Changed in charm-ceph-radosgw: | |
assignee: | Gabriel Angelo Sgarbi Cocenza (gabrielcocenza) → nobody |
Changed in charm-elasticsearch: | |
milestone: | none → 22.04 |
status: | New → Fix Released |
The easyrsa unit looks to be running on machine 1. drs() API. The logs show this:
Logs from machine 1 show the machine agent starting. One of the things that happens is that the IP addresses of the machine are recorded. This is done via a call to Go's net.InterfaceAd
2021-04-15 17:22:33 DEBUG juju.worker. dependency engine.go:564 "machiner" manifold worker started at 2021-04-15 17:22:33.977186529 +0000 UTC 127.0.0. 1 for machine 172.31. 43.239 for machine 252.43. 239.1 for machine machine: 127.0.0. 1 local-cloud: 172.31. 43.239 local-fan: 252.43. 239.1 local-machine:::1] machiner machiner.go:162 setting addresses for "machine-1" to [local- machine: 127.0.0. 1 local-cloud: 172.31. 43.239 local-fan: 252.43. 239.1 local-machine:::1] machiner machiner.go:112 "machine-1" started
2021-04-15 17:22:33 DEBUG juju.network network.go:142 no lxc bridge addresses to filter for machine
2021-04-15 17:22:33 DEBUG juju.network network.go:178 cannot get "lxdbr0" addresses: route ip+net: no such network interface (ignoring)
2021-04-15 17:22:33 DEBUG juju.network network.go:178 cannot get "virbr0" addresses: route ip+net: no such network interface (ignoring)
2021-04-15 17:22:33 DEBUG juju.network network.go:127 including address local-machine:
2021-04-15 17:22:33 DEBUG juju.network network.go:127 including address local-cloud:
2021-04-15 17:22:33 DEBUG juju.network network.go:127 including address local-fan:
2021-04-15 17:22:33 DEBUG juju.network network.go:127 including address local-machine:::1 for machine
2021-04-15 17:22:33 DEBUG juju.network network.go:196 addresses after filtering: [local-
2021-04-15 17:22:33 INFO juju.worker.
2021-04-15 17:22:34 INFO juju.worker.
There's no public IP address reported initially on startup. Compare this to machine 0, the controller, where these addresses are known when these logs were recorded:
2021-04-15 17:22:32 DEBUG juju.network network.go:127 including address public:34.239.49.54 for machine 172.31. 39.150 for machine 252.39. 150.1 for machine 127.0.0. 1 for machine
2021-04-15 17:22:32 DEBUG juju.network network.go:127 including address local-cloud:
2021-04-15 17:22:32 DEBUG juju.network network.go:127 including address local-fan:
2021-04-15 17:22:32 DEBUG juju.network network.go:127 including address local-machine:
2021-04-15 17:22:32 DEBUG juju.network network.go:127 including address local-machine:::1 for machine
Note the 34.* public address.
Juju does periodically update the machine addresses if they change. But it appears no public IP address becomes known prior to the easyrsa unit asking for the public address, hence the install hook error reporting that such an address is not found.
The fact that status has the public address means that it became available at some short time later, after the charm had initially asked for it. Charms need to be resilient to such scenarios. Juju will fire a config-changed hook when the host machine of a charm gets updated addresses. The charm needs to wait until the public address is available. Also, the charm should be using network-get and not unit-get pubic-address which is deprecated.