Merge ~hloeung/jenkins-agent-charm:master into jenkins-agent-charm:master

Proposed by Haw Loeung
Status: Merged
Approved by: Haw Loeung
Approved revision: abdfdfb58466258b9500151108aa18561ce1eaca
Merged at revision: 38e093ef3492335669f89a4ccd47865c09936fab
Proposed branch: ~hloeung/jenkins-agent-charm:master
Merge into: jenkins-agent-charm:master
Diff against target: 33 lines (+3/-2)
2 files modified
reactive/jenkins_slave.py (+2/-1)
tox.ini (+1/-1)
Reviewer Review Type Date Requested Status
Gareth Woolridge Approve
Canonical IS Reviewers Pending
Review via email: mp+409638@code.launchpad.net

Commit message

Fix issue with being stuck in maintenance status on setting up NRPE checks - LP:1945446

To post a comment you must log in.
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
Gareth Woolridge (moon127) wrote :

Thanks for that fix!

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

Change successfully merged at revision 38e093ef3492335669f89a4ccd47865c09936fab

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reactive/jenkins_slave.py b/reactive/jenkins_slave.py
2index 314fbd0..dcb947d 100644
3--- a/reactive/jenkins_slave.py
4+++ b/reactive/jenkins_slave.py
5@@ -115,6 +115,7 @@ def configure_jenkins_slave():
6 @reactive.when_not('nagios-nrpe.configured')
7 def configure_nagios(nagios):
8 status.maintenance('setting up NRPE checks')
9+ reactive.clear_flag('jenkins-slave.active')
10
11 # Use charmhelpers.contrib.charmsupport's nrpe to determine hostname
12 hostname = nrpe.get_nagios_hostname()
13@@ -218,7 +219,7 @@ def slave_relation():
14
15
16 def file_to_units(local_path, unit_path, perms=None, owner='root', group='root'):
17- """ copy a file from the charm onto our unit(s) """
18+ """copy a file from the charm onto our unit(s)"""
19 file_perms = perms
20 if not perms:
21 # Let's try manually work it out
22diff --git a/tox.ini b/tox.ini
23index 220ff5d..6e52aab 100644
24--- a/tox.ini
25+++ b/tox.ini
26@@ -9,7 +9,7 @@ setenv =
27 PYTHONPATH = .
28
29 [testenv:unit]
30-commands = pytest -v --ignore {toxinidir}/tests/functional --cov=lib --cov=reactive --cov=actions --cov-report=term-missing --cov-branch
31+commands = pytest -v --ignore {toxinidir}/tests/functional --cov=reactive --cov-report=term-missing --cov-branch
32 deps = -r{toxinidir}/tests/unit/requirements.txt
33 setenv = PYTHONPATH={toxinidir}/lib
34

Subscribers

People subscribed via source and target branches