Merge lp:~abentley/charms/trusty/apache2/apache2-ports into lp:charms/trusty/apache2
Status: | Merged |
---|---|
Approved by: | David Britton |
Approved revision: | 63 |
Merged at revision: | 59 |
Proposed branch: | lp:~abentley/charms/trusty/apache2/apache2-ports |
Merge into: | lp:charms/trusty/apache2 |
Diff against target: |
287 lines (+133/-21) 5 files modified
hooks/hooks.py (+56/-16) hooks/tests/test_balancer_hook.py (+3/-3) hooks/tests/test_config_changed.py (+4/-1) hooks/tests/test_hooks.py (+65/-0) hooks/tests/test_vhost_config_relation.py (+5/-1) |
To merge this branch: | bzr merge lp:~abentley/charms/trusty/apache2/apache2-ports |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Britton (community) | Approve | ||
Adam Israel (community) | Approve | ||
Review Queue (community) | automated testing | Needs Fixing | |
Review via email: mp+245740@code.launchpad.net |
Commit message
Unify port handling.
Description of the change
This branch unifies open-port/
Multiple configuration options may refer to the same port. For example, a vhost_http_template might refer to port 80 and so might a vhost-config relation. But they can have conflicting ideas about whether a port should be open. If the vhost-config has an empty template, port 80 will be closed, even though the vhost_http_template wants it open. And of course, there can be multiple vhost-configs with their own conflicting opinions.
This code unifies the port handling, so that it is done in a single place. If any configuration mechanism wants a paticular port open, it is open. Otherwise it is closed. It also records the current list of ports, so that future hook runs can detect when a port has changed, and close the old port.
This items has failed automated testing! Results available here http:// reports. vapour. ws/charm- tests/charm- bundle- test-10870- results