Merge lp:~chris-gondolin/charms/precise/nrpe-external-master/trunk into lp:charms/nrpe-external-master
Proposed by
Chris Stratford
Status: | Merged |
---|---|
Approved by: | JuanJo Ciarlante |
Approved revision: | 28 |
Merged at revision: | 28 |
Proposed branch: | lp:~chris-gondolin/charms/precise/nrpe-external-master/trunk |
Merge into: | lp:charms/nrpe-external-master |
Diff against target: |
34 lines (+16/-1) 1 file modified
hooks/config-changed (+16/-1) |
To merge this branch: | bzr merge lp:~chris-gondolin/charms/precise/nrpe-external-master/trunk |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
JuanJo Ciarlante (community) | Approve | ||
Review via email: mp+205189@code.launchpad.net |
Description of the change
The charm currently assumes "unit-get private-address" returns an IP address. This isn't always the case. This change attempts to ensure that $IPADDRESS really is an IP address (specifically an IPv4 address), so that the Nagios host check uses that IP address and does not rely on the results of a DNS lookup (which can return multiple addresses)
To post a comment you must log in.
LGTM, please address this 1 ~nit, consider 1 suggestion: {1,3}\. [0-9]{1, 3}\.[0- 9]{1,3} \.[0-9] {1,3}$'
1) please anchor the regex, to be: '^[0-9]
2) if you want, you could do: host -4 -t a ${addr} | awk 'NR==1 { print $NF }'