Merge lp:~paulgear/charms/trusty/ntp/fix-divide-by-zero into lp:charms/trusty/ntp
| Status: | Merged |
|---|---|
| Merged at revision: | 20 |
| Proposed branch: | lp:~paulgear/charms/trusty/ntp/fix-divide-by-zero |
| Merge into: | lp:charms/trusty/ntp |
| Diff against target: |
1092 lines (+778/-102) 4 files modified
files/nagios/check_ntpmon.py (+282/-99) hooks/ntp_hooks.py (+2/-1) tests/00-setup (+2/-2) unit_tests/test_check_ntpmon.py (+492/-0) |
| To merge this branch: | bzr merge lp:~paulgear/charms/trusty/ntp/fix-divide-by-zero |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Tim Van Steenburgh | 2015-04-09 | Approve on 2015-05-15 | |
| Adam Israel | Approve on 2015-05-13 | ||
| Whit Morriss (community) | Approve on 2015-04-16 | ||
|
Review via email:
|
|||
Description of the Change
I've fixed the upstream version of check_ntpmon.py; this commit merges the current head version from https:/
- 19. By Charles Butler on 2015-04-16
-
[r=lazypower] Charles Butler 2015-04-16 [lazypower] Ammended unit test to specify private-address
Brad Marshall 2015-04-01 [merge] [bradm] Fixed unit name on the test
Whit Morriss 2015-03-31 specify unit
Brad Marshall 2015-03-31 [bradm] Merge in nrpe fixes
Brad Marshall 2015-03-27 [bradm] Remove the total_source line
Brad Marshall 2015-03-27 [bradm] Tidied up extra unneeded lines.
Brad Marshall 2015-03-27 [bradm] Deploy ntp subordinate before adding relation to ntpmaster, c...
Brad Marshall 2015-03-27 [bradm] Apply the timeout to the sentry
Brad Marshall 2015-03-27 [bradm] Add missing type to nagios_servicegroups
Brad Marshall 2015-03-27 [bradm] Fixed nagios_servicegroup setting
Brad Marshall 2015-03-27 [bradm] Added default empty string to nagios_servicegroup, unit tests...
Brad Marshall 2015-03-25 [merge] [bradm] Fixed conflicts with upstream
Brad Marshall 2015-03-17 [bradm] Add docs on auto peers and peers config options.
Brad Marshall 2015-03-16 [bradm] Fixed use_iburst variable to work properly
Brad Marshall 2015-03-16 [bradm] Added use_iburst config variable, tidy up warning message
Brad Marshall 2015-03-16 [bradm] Fixed formatting on warning
Brad Marshall 2015-03-16 [bradm] Not using brackets inside strings
Brad Marshall 2015-03-16 [bradm] Add backslash for continued line
Brad Marshall 2015-03-16 [bradm] Added restrict line for new ntp sources to ntp.conf. Add peer...
Brad Marshall 2015-03-16 [bradm] Gave source a default value, made auto_peers a boolean
Brad Marshall 2015-03-16 [bradm] Add auto_peers config option
Brad Marshall 2015-03-16 [bradm] First cut of ntp peers relationship
| Paul Gear (paulgear) wrote : | # |
Hi Whit,
I have a reasonably comprehensive test suite for it upstream: https:/
| Whit Morriss (whitmo) wrote : | # |
I think in this case what would be best is unit tests that exercise the
hook code (which seem to be generally missing, not your fault). The ntpmon
tests do look handy for exercising a deployment in general though.
-w
On Thu, Apr 16, 2015 at 6:14 PM, Paul Gear <email address hidden> wrote:
> Hi Whit,
>
> I have a reasonably comprehensive test suite for it upstream:
> https:/
> where would be the most appropriate point to run it?
> --
>
> https:/
> You are reviewing the proposed merge of
> lp:~paulgear/charms/trusty/ntp/fix-divide-by-zero into lp:charms/trusty/ntp.
>
--
---------------
D. Whit Morriss
Developer, Juju Ecosystem
Canonical USA
| Paul Gear (paulgear) wrote : | # |
I've done a quick rebase of this code to use the latest version of trunk. Is there anything else needed before this can be merged? Should I be asking for it to be merged another branch instead of trunk?
- 20. By Paul Gear on 2015-04-20
-
Merge merge upstream check_ntpmon.py
- 21. By Paul Gear on 2015-04-27
-
Update to upstream check_ntpmon
Notable changes:
- detects the case when ntpd is not running correctly
- always returns OK until ntpd has been running for long enough to get 8 successful polls - 22. By Paul Gear on 2015-04-27
-
Install new prerequisite for upstream check_ntpmon
| Adam Israel (aisrael) wrote : | # |
Hi Paul,
I had a chance to review your merge proposal today. The current tests pass cleanly. As far as your new test upstream, that could be integrated into the charm's tests/ directory; something like 20-test_
| Paul Gear (paulgear) wrote : | # |
> Hi Paul,
>
> I had a chance to review your merge proposal today. The current tests pass
> cleanly. As far as your new test upstream, that could be integrated into the
> charm's tests/ directory; something like 20-test_
> looks good to me, especially as it fixes a bug. You have my +1.
Thanks Adam. My impression of the charm tests/ directory was that it was intended for deployment tests rather than unit tests. Is that not the case? If not, I can easily add the test there.
Regards,
Paul
- 23. By Paul Gear on 2015-05-14
-
Add check_ntpmon unit tests from https:/
/github. com/paulgear/ check_ntpmon/ blob/master/ test_check_ ntpmon. py - 24. By Paul Gear on 2015-05-14
-
Move unit tests to where they belong, add path to tested module; install software dependency
- 25. By Paul Gear on 2015-05-14
-
Fix comment
| Paul Gear (paulgear) wrote : | # |
I've added the unit tests for check_ntpmon to the unit_tests directory now.

Thanks Paul!
LGTM +1. Merges cleanly, tests pass (demonstrating successful deployment).
My only gripe is that there are no unittests to cover this bug fix (or the python code in general). While this fix *looks* fine, having some test to prove it would be really nice!
-w