Merge ~barryprice/charm-nrpe/+git/nrpe-charm:master into ~nrpe-charmers/charm-nrpe:master

Proposed by Barry Price
Status: Merged
Approved by: Junien F
Approved revision: dc6048a6a1496cf23f4846ea5d9b89a79645e82b
Merged at revision: c5e33a0d0b946364ca77db45bab90e06429f1f71
Proposed branch: ~barryprice/charm-nrpe/+git/nrpe-charm:master
Merge into: ~nrpe-charmers/charm-nrpe:master
Diff against target: 32 lines (+8/-2)
2 files modified
hooks/nrpe_helpers.py (+1/-1)
hooks/nrpe_utils.py (+7/-1)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Junien F Approve
Canonical IS Reviewers Pending
Review via email: mp+382414@code.launchpad.net

Commit message

Don't install recommends, to avoid installing rpcbind LP:1873171

Also fix a found unrelated bug in how we call nproc.

To post a comment you must log in.
Revision history for this message
Junien F (axino) wrote :

+1000

review: Approve
Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision c5e33a0d0b946364ca77db45bab90e06429f1f71

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/hooks/nrpe_helpers.py b/hooks/nrpe_helpers.py
index e769c5a..b8cbca0 100644
--- a/hooks/nrpe_helpers.py
+++ b/hooks/nrpe_helpers.py
@@ -508,7 +508,7 @@ class SubordinateCheckDefinitions(dict):
508508
509 def proc_count(self):509 def proc_count(self):
510 """ Return number number of processing units """510 """ Return number number of processing units """
511 return int(subprocess.check_output('nproc --all'))511 return int(subprocess.check_output(['nproc', '--all']))
512512
513 def parse_netlinks(self, ifaces):513 def parse_netlinks(self, ifaces):
514 """Parses a list of strings, or a single string514 """Parses a list of strings, or a single string
diff --git a/hooks/nrpe_utils.py b/hooks/nrpe_utils.py
index 0fe733c..2c29459 100644
--- a/hooks/nrpe_utils.py
+++ b/hooks/nrpe_utils.py
@@ -45,7 +45,13 @@ def determine_packages():
45def install_packages(service_name):45def install_packages(service_name):
46 """ Install packages """46 """ Install packages """
47 fetch.apt_update()47 fetch.apt_update()
48 fetch.apt_install(determine_packages(), fatal=True)48 apt_options = [
49 # avoid installing rpcbind LP#1873171
50 '--no-install-recommends',
51 # and retain the default option too
52 '--option=Dpkg::Options::=--force-confold',
53 ]
54 fetch.apt_install(determine_packages(), options=apt_options, fatal=True)
4955
5056
51def remove_host_export_fragments(service_name):57def remove_host_export_fragments(service_name):

Subscribers

People subscribed via source and target branches