NRPE Fails to find an IP on AWS

Bug #1287393 reported by Charles Butler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nrpe (Juju Charms Collection)
Fix Released
Medium
Charles Butler

Bug Description

During the monitors-joined relationship hook, the script sources an older copy of charm-helpers-sh - net.sh script.

while at one point this was working, in more recent revisions it fails to parse the IP Address. the NRPE charm needs a method to parse the IP from the host without relying on this depreciated package.

Tags: audit

Related branches

Changed in nrpe (Juju Charms Collection):
status: New → Triaged
importance: Undecided → Medium
status: Triaged → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
Matt Bruzek (mbruzek) wrote :

Changing this bug to in progress while the review comments are considered

Changed in nrpe (Juju Charms Collection):
status: Fix Committed → In Progress
Revision history for this message
Charles Butler (lazypower) wrote :

-- self monologue for future reference begins now --

Agreed - i had to go back through the deployment to remember why i did this. The exact output on AWS from unit-get private-address is as follows:

unit-get private-address
domU-12-31-39-06-79-5E.compute-1.internal

The need for nslookup was the resolve that address to an IPV4 format
nslookup $(unit-get private-address) | grep Add | grep -v '#' | cut -f 2 -d ' '
10.208.126.172

So - in summation, I suppose this should be a fallback method if private-address is not in numeric form. I wasn't considering LXC the primary provider for this modification when it was written, thus it was not tested elsewhere. Should be a simple fix.

Revision history for this message
Charles Butler (lazypower) wrote :

So, instead of removing the dependency, i've embedded net.sh from charm-helpers-sh package (which will cause havok on trusty since the package only exists in precise repositories) - with an addition of returning $host if found. This was the accepted method of fix for MySQL.

Re-Opening for review

Changed in nrpe (Juju Charms Collection):
status: In Progress → Fix Committed
Changed in nrpe (Juju Charms Collection):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.