haproxy failed: unable to find required use_backend
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Charm |
Fix Released
|
Medium
|
Björn Tillenius | ||
landscape-server (Juju Charms Collection) |
Invalid
|
Undecided
|
Björn Tillenius |
Bug Description
I deployed two units of landscape-server (lp:landscape-charm). I then removed the first one:
juju destroy-unit landscape-server/0
haproxy failed:
2015-05-25 19:50:49 INFO unit.haproxy/
2015-05-25 19:50:49 INFO unit.haproxy/
2015-05-25 19:50:49 INFO unit.haproxy/
2015-05-25 19:50:49 INFO unit.haproxy/
2015-05-25 19:50:49 INFO unit.haproxy/
2015-05-25 19:50:49 INFO unit.haproxy/
2015-05-25 19:50:49 INFO unit.haproxy/
2015-05-25 19:50:49 INFO unit.haproxy/
2015-05-25 19:50:49 ERROR juju.worker.
In juju status:
units:
haproxy/0:
haproxy.cfg does mention landscape-
frontend haproxy-0-443
bind 0.0.0.0:443 ssl crt /var/lib/
default_backend landscape-https
mode http
http-request set-header X-Forwarded-Proto https
acl message path_beg -i /message-system
acl api path_beg -i /api
acl package-upload path_beg -i /upload
use_backend landscape-message if message
use_backend landscape-api if api
use_backend landscape-
but no such backend indeed:
# grep package-upload /etc/haproxy/
acl package-upload path_beg -i /upload
use_backend landscape-
Related branches
- 🤖 Landscape Builder: Approve (test results)
- Free Ekanayaka (community): Approve
- Adam Collard (community): Approve
-
Diff: 358 lines (+111/-38)6 files modifiedhooks/leader-elected (+9/-0)
lib/relations/haproxy.py (+9/-8)
lib/relations/tests/test_haproxy.py (+71/-9)
lib/services.py (+3/-6)
lib/tests/stubs.py (+4/-9)
lib/tests/test_services.py (+15/-6)
affects: | haproxy (Juju Charms Collection) → landscape-server (Juju Charms Collection) |
Changed in landscape-server (Juju Charms Collection): | |
status: | New → In Progress |
assignee: | nobody → Björn Tillenius (bjornt) |
Changed in landscape-charm: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Björn Tillenius (bjornt) |
Changed in landscape-server (Juju Charms Collection): | |
status: | In Progress → Invalid |
Changed in landscape-charm: | |
status: | In Progress → Fix Committed |
tags: | removed: kanban |
Changed in landscape-charm: | |
status: | Fix Committed → Fix Released |
At first sight it seems indeed a leader change problem. I think we should take the chance to move to juju builtin leader election, that will offer the primitives and hooks (leader-changed) to handle this properly.