Merge lp:~aluria/charms/precise/nrpe-external-master/donotremove-hostdefs into lp:charms/nrpe-external-master

Proposed by Alvaro Uría on 2016-04-05
Status: Needs review
Proposed branch: lp:~aluria/charms/precise/nrpe-external-master/donotremove-hostdefs
Merge into: lp:charms/nrpe-external-master
Diff against target: 20 lines (+9/-1)
1 file modified
hooks/config-changed (+9/-1)
To merge this branch: bzr merge lp:~aluria/charms/precise/nrpe-external-master/donotremove-hostdefs
Reviewer Review Type Date Requested Status
Pete Vander Giessen Disapprove on 2016-10-06
Liam Young 2016-04-05 Approve on 2016-06-21
Review Queue (community) automated testing Approve on 2016-04-10
Marco Ceppi 2016-08-04 Pending
Tom Haddon 2016-08-04 Pending
Review via email: mp+290957@code.launchpad.net
To post a comment you must log in.
43. By Alvaro Uría on 2016-04-05

[aluria,r=] selective host defs removals

44. By Alvaro Uría on 2016-04-05

[aluria,r=] corrected and tested service defs matching

45. By Alvaro Uría on 2016-04-06

[aluria,r=] concat rm or set -e will make script fail

Review Queue (review-queue) wrote :

The results (PASS) are in and available here: http://juju-ci.vapour.ws:8080/job/charm-bundle-test-aws/3532/

review: Approve (automated testing)
Review Queue (review-queue) wrote :

The results (PASS) are in and available here: http://juju-ci.vapour.ws:8080/job/charm-bundle-test-lxc/3482/

review: Approve (automated testing)
Liam Young (gnuoy) wrote :

LGTM, thanks

review: Approve
Cory Johns (johnsca) wrote :

The listed maintainer of this is Tom Haddon. Does this charm make sense to be owned by an "is-team" or similar? I'm reluctant to move forward with merging this until we verify the proper point of contact and can sort out the proper place to move the repo to out of lp:charms and proper namespace to put this into the store under, per the new non-ingestion charm store process (see https://github.com/juju/docs/issues/1264)

Alternatively, Marco, is there any exemption for older precise charms for the new process?

Antonio Rosales (arosales) wrote :

Tom,
Should this charm be deprecated in-liu of https://jujucharms.com/nrpe/ ?

aluria,
Is the precise version of this charm essential, or would Trusty or Xenail work for you. If so suggest to use https://jujucharms.com/nrpe/ as that has the development focus.

-thanks,
Antonio

Alvaro Uría (aluria) wrote :

> Tom,
> Should this charm be deprecated in-liu of https://jujucharms.com/nrpe/ ?
>
> aluria,
> Is the precise version of this charm essential, or would Trusty or Xenail work
> for you. If so suggest to use https://jujucharms.com/nrpe/ as that has the
> development focus.

BootStack has already migrated to trusty nrpe version for their deploys. This MP fixed a bug on old version still used on a few of our Stacks but could be safely deprecated if wanted (and we will work on transitioning rather than fixing old code).

Thank you,
-Alvaro.

>
> -thanks,
> Antonio

Tom Haddon (mthaddon) wrote :

Yes, nrpe-external-master is deprecated in favour of nrpe, and it'd be good to unpromulgate it. The nrpe charm implements the nrpe-external-master interface in addition to the nrpe interface.

Pete Vander Giessen (petevg) wrote :

Since this is a PR against a deprecated charm, we should close this entry in the review queue out.

review: Disapprove

Unmerged revisions

45. By Alvaro Uría on 2016-04-06

[aluria,r=] concat rm or set -e will make script fail

44. By Alvaro Uría on 2016-04-05

[aluria,r=] corrected and tested service defs matching

43. By Alvaro Uría on 2016-04-05

[aluria,r=] selective host defs removals

42. By Alvaro Uría on 2016-04-05

[aluria,r=] multiple subordinates per host will remove previous host definitions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/config-changed'
2--- hooks/config-changed 2015-05-21 15:52:29 +0000
3+++ hooks/config-changed 2016-04-06 09:18:05 +0000
4@@ -117,7 +117,15 @@
5 export HOSTCHECK_INHERIT=$(config-get hostcheck_inherit)
6 export HOSTGROUPS=$(config-get hostgroups)
7 cheetah fill --env --oext compiled templates/host.cfg.tmpl
8-rm -f /var/lib/nagios/export/host__*.cfg
9+## selective removal of host defs
10+## unmatched host__${hostname}.cfg with any service__${hostname}_.*.cfg
11+EXPORT_DIR=/var/lib/nagios/export
12+
13+for host in ${EXPORT_DIR}/host__*;do
14+ hostname=$(echo $host | sed "s:^${EXPORT_DIR}/host__\(.*\).cfg$:\1:")
15+ ls ${EXPORT_DIR}/service__* 2>/dev/null | egrep -qo "^${EXPORT_DIR}/service__${hostname}_.*.cfg$" || rm -f $host
16+done
17+##
18 cp templates/host.cfg.compiled /var/lib/nagios/export/host__${NAGIOS_HOSTNAME}.cfg
19
20 #------------------------------------------------------

Subscribers

People subscribed via source and target branches

to all changes: