Merge lp://staging/~verterok/charms/trusty/apache2/hostname-resolution-fix into lp://staging/~tanuki/charms/trusty/apache2/trunk

Proposed by Guillermo Gonzalez
Status: Merged
Approved by: Guillermo Gonzalez
Approved revision: 70
Merged at revision: 69
Proposed branch: lp://staging/~verterok/charms/trusty/apache2/hostname-resolution-fix
Merge into: lp://staging/~tanuki/charms/trusty/apache2/trunk
Diff against target: 142 lines (+71/-1)
3 files modified
hooks/hooks.py (+49/-0)
hooks/tests/test_config_changed.py (+3/-1)
hooks/tests/test_hooks.py (+19/-0)
To merge this branch: bzr merge lp://staging/~verterok/charms/trusty/apache2/hostname-resolution-fix
Reviewer Review Type Date Requested Status
Celso Providelo (community) Approve
Review via email: mp+272109@code.staging.launchpad.net

Commit message

update /etc/hosts to have hostname resolution in the unit

Description of the change

update /etc/hosts to have hostname resolution in the unit

To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) wrote :

Guillermo,

Thanks for working on this. We have discussed the approach on IRC and here is the relevant snippet:

{{{
11:11 <cprov> verterok: I confess, I'd take a way less bright route and simply check if hostname is in /etc/hosts, if not >> "{unit_private_addres} {hostname}"
11:11 <cprov> verterok: supporting a resolution map looks promising if exposed via config
11:12 <verterok> cprov: I shamelessly "reused" the code form the neutron-gateway charm :)
11:13 <verterok> cprov: I can simplify it if you prefer it simpler
11:14 <cprov> verterok: yeah, there might be a 'reason' behind that code. I don't mind using it for a while in SPI and see what apache-ers think about it in a MP
11:14 <cprov> verterok: as long as it solves our problem, either charm solution would do it.
11:14 <verterok> cprov: it solves the issue with mod_unique_id
11:15 <verterok> tested in local deploy
11:15 <cprov> verterok: yup, so no need on our side to frontload work/problems, let's deal with them in the apache2 charm MP
}}}

and a minor style nitpick inline for your consideration.

Pre-approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches