ams get hook failed: "registry-client-relation-changed" when deploying with aar
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Anbox Cloud |
Fix Released
|
Medium
|
Gary.Wang |
Bug Description
A user deploys ams and aar in one juju deploy command, which means juju will deploy them at the same time. But ams runs into a hook error. aar is deployed properly though.
App Version Status Scale Charm Channel Rev Exposed Message
aar 1.25.1-0fe31... active 1 aar 1.25/stable 952 no
ams 1.25.1-0fe31... error 1 ams 1.25/edge 994 no hook failed: "registry-
aar/0* active idle 4 98.83.118.9 3000/tcp
ams/0* error idle 2 44.205.6.129 hook failed: "registry-
In ams juju log, it shows:
2025-04-07 00:58:35 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "relation-changed" hook
2025-04-07 00:58:35 WARNING unit.ams/0.juju-log server.go:326 registry-client:26: <class '__main_
2025-04-07 00:58:35 ERROR unit.ams/0.juju-log server.go:326 registry-client:26: Waiting for ams to start to share certificate
2025-04-07 00:58:35 ERROR unit.ams/0.juju-log server.go:326 registry-client:26: AMS not yet started
2025-04-07 00:58:35 ERROR unit.ams/0.juju-log server.go:326 registry-client:26: Uncaught exception while in charm code:
Traceback (most recent call last):
File "/var/lib/
main(
File "/var/lib/
return _main.main(
File "/var/lib/
manager.run()
File "/var/lib/
self._emit()
File "/var/lib/
_emit_
File "/var/lib/
event_
File "/var/lib/
framework.
File "/var/lib/
self.
File "/var/lib/
custom_
File "/var/lib/
return callable(*args, **kwargs) # type: ignore
File "/var/lib/
self.
File "/var/lib/
self.
File "/var/lib/
current_certs = self.get_
File "/var/lib/
return json.loads(
File "/usr/lib/
return _default_
File "/usr/lib/
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/
raise JSONDecodeError
json.decoder.
2025-04-07 00:58:36 ERROR juju.worker.
2025-04-07 00:58:36 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "relation-changed" hook
It looks the charm wants to get a token for aar but ams is not running yet. [1]
then set the unit state to error which stops ams configuration.
Probably should check if ams is running in [1] before attempting to configure aar.
A workaround is to deploy aar and ams without a relation between them. Then add the relation after they are up and running.
[1] https:/
Changed in anbox-cloud: | |
milestone: | none → 1.25.2 |
status: | New → In Progress |
assignee: | nobody → Gary.Wang (gary-wzl77) |
importance: | Undecided → Medium |
Changed in anbox-cloud: | |
status: | In Progress → Fix Committed |
Changed in anbox-cloud: | |
status: | Fix Committed → Fix Released |