Hook errors when config contains backends that haven't been related yet
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-haproxy |
Triaged
|
High
|
Unassigned |
Bug Description
haproxy hooks can fail if the services YAML config doesn't match the relations. The charm seems to assume 'mode tcp' and this can conflict with what relations specify in their relation data. For example:
2018-07-02 19:34:28 DEBUG reverseproxy-
o use incompatible tcp backend 'directory_public' (/etc/haproxy/
2018-07-02 19:34:28 DEBUG reverseproxy-
o use incompatible tcp backend 'alertmanager' (/etc/haproxy/
2018-07-02 19:34:28 DEBUG reverseproxy-
o use incompatible tcp backend 'prometheus' (/etc/haproxy/
2018-07-02 19:34:28 DEBUG reverseproxy-
o use incompatible tcp backend 'metrics_public' (/etc/haproxy/
2018-07-02 19:34:28 DEBUG reverseproxy-
o use incompatible tcp backend 'metrics_public' (/etc/haproxy/
2018-07-02 19:34:28 DEBUG reverseproxy-
o use incompatible tcp backend 'metrics_public' (/etc/haproxy/
2018-07-02 19:34:28 DEBUG reverseproxy-
2018-07-02 19:34:28 INFO juju-log reverseproxy:69: HAProxy configuration check failed, exiting.
This creates a weird serialization order dependence of configuration and relation. Configuration should be idempotent and resilient, and cleaning up these kinds of hook errors in production is fairly terrible with Juju 2.0. The hooks keep retrying and using resolved --no-retry will sometimes get "stuck" so mojo never sees a "steady state" to apply a manifest that might fix the issue.
Changed in charm-haproxy: | |
status: | New → Triaged |
importance: | Undecided → High |