Merge lp://staging/~alexlist/charms/trusty/swift-storage/nrpe-rebased into lp://staging/~openstack-charmers-archive/charms/trusty/swift-storage/next

Proposed by Alexander List
Status: Needs review
Proposed branch: lp://staging/~alexlist/charms/trusty/swift-storage/nrpe-rebased
Merge into: lp://staging/~openstack-charmers-archive/charms/trusty/swift-storage/next
Diff against target: 931 lines (+691/-32)
15 files modified
charm-helpers-hooks.yaml (+1/-0)
config.yaml (+14/-0)
files/nagios/check_swift_service (+25/-0)
files/nagios/check_swift_storage.py (+136/-0)
files/sudo/swift-storage (+1/-0)
hooks/charmhelpers/contrib/charmsupport/nrpe.py (+219/-0)
hooks/charmhelpers/contrib/charmsupport/volumes.py (+159/-0)
hooks/swift_storage_hooks.py (+58/-2)
hooks/swift_storage_utils.py (+33/-2)
metadata.yaml (+3/-0)
revision (+1/-1)
templates/050-swift-storage (+24/-0)
templates/rsyncd.conf (+5/-23)
unit_tests/test_swift_storage_relations.py (+10/-3)
unit_tests/test_swift_storage_utils.py (+2/-1)
To merge this branch: bzr merge lp://staging/~alexlist/charms/trusty/swift-storage/nrpe-rebased
Reviewer Review Type Date Requested Status
James Page Needs Fixing
Review via email: mp+231406@code.staging.launchpad.net

This proposal supersedes a proposal from 2014-07-31.

Description of the change

This change adds nrpe-external-master support to the charm.

Contains:

- re-sync of charmsupport
- renamed basic checks for swift ring hashes and replication
- status checks for swift storage services
- sudo permissions for above status checks

Rebase on -next as of 2014-08-19

To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote : Posted in a previous version of this proposal

This merge proposal appears to have more than just the nrpe support - lots of changes around how rsync is managed as well?

Was this intentional? if so I would prefer that they where split out into two MP's to make it easier to test/review.

review: Needs Information
Revision history for this message
Jacek Nykis (jacekn) wrote : Posted in a previous version of this proposal

> This merge proposal appears to have more than just the nrpe support - lots of
> changes around how rsync is managed as well?
>
> Was this intentional? if so I would prefer that they where split out into two
> MP's to make it easier to test/review.

Hi James,

Yes it was intentional. The swift-storage charm assumed full control over rsync config which could lead to broken configuration when used with subordinate charms.

So the rsync management changes are prerequisite for n-e-m support because n-e-m needs to be able to add rsync stanzas to the config without destroying swift config (and the swift charm needs to be able to update its config without breaking n-e-m config)

Revision history for this message
Gareth Woolridge (moon127) wrote : Posted in a previous version of this proposal

James,

Rebase of Jacek's earlier work to apply cleanly to /next as we needed to pull in some other updates to PS4.

Can you respond to Jacek's earlier comment above? The nagios-external-master support and rsync changes go hand in hand.

Revision history for this message
James Page (james-page) wrote :

OK _ sorry it took me a while to get back to this; currently upgrades are broken and one of the unit tests fails due to incorrect ordering in the expected calls list - other than that LGTM.

review: Needs Fixing
Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#642 swift-storage-next for alexlist mp231406
charm_lint_check

This build:
http://10.98.191.181:8080/job/charm_lint_check/642/

MP URL:
https://code.launchpad.net/~alexlist/charms/trusty/swift-storage/nrpe-rebased/+merge/231406

Proposed branch:
lp:~alexlist/charms/trusty/swift-storage/nrpe-rebased

Results summary:
    LINT FAIL: lint-check failed

LINT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_lint_check/make-lint.642:
hooks/swift_storage_hooks.py:45:1: E302 expected 2 blank lines, found 1
hooks/swift_storage_hooks.py:104:1: E302 expected 2 blank lines, found 1
hooks/swift_storage_hooks.py:135:22: E251 unexpected spaces around keyword / parameter equals
hooks/swift_storage_hooks.py:135:24: E251 unexpected spaces around keyword / parameter equals
hooks/swift_storage_hooks.py:139:1: E302 expected 2 blank lines, found 1
hooks/swift_storage_utils.py:96:1: E302 expected 2 blank lines, found 1
hooks/swift_storage_utils.py:240:1: E302 expected 2 blank lines, found 1
hooks/swift_storage_utils.py:249:1: W391 blank line at end of file
make: *** [lint] Error 1

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#459 swift-storage-next for alexlist mp231406
charm_unit_test

This build:
http://10.98.191.181:8080/job/charm_unit_test/459/

MP URL:
https://code.launchpad.net/~alexlist/charms/trusty/swift-storage/nrpe-rebased/+merge/231406

Proposed branch:
lp:~alexlist/charms/trusty/swift-storage/nrpe-rebased

Results summary:
    UNIT FAIL: unit-test failed

UNIT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_unit_test/unit-test.459:
 call('/srv/node', owner='swift', group='swift'),
 call('/etc/rsyncd.d', owner='root', group='root')]

======================================================================
FAIL: test_fetch_swift_rings (unit_tests.test_swift_storage_utils.SwiftStorageUtilsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/checkout/swift-storage/unit_tests/test_swift_storage_utils.py", line 99, in test_fetch_swift_rings
    self.assertEquals(wgets, self.check_call.call_args_list)
AssertionError: [call(['wget', 'http://someproxynode/rings/account.ring.gz', '-O', '/etc/swift/account.ring.gz']), call(['wget', 'http://someproxynode/rings/object.ring.gz', '-O', '/etc/swift/object.ring.gz']), call(['wget', 'http://someproxynode/rings/container.ring.gz', '-O', '/etc/swift/container.ring.gz'])] != [call(['wget', 'http://someproxynode/rings/account.ring.gz', '--retry-connrefused', '-t', '10', '-O', '/etc/swift/account.ring.gz']),
 call(['wget', 'http://someproxynode/rings/object.ring.gz', '--retry-connrefused', '-t', '10', '-O', '/etc/swift/object.ring.gz']),
 call(['wget', 'http://someproxynode/rings/container.ring.gz', '--retry-connrefused', '-t', '10', '-O', '/etc/swift/container.ring.gz'])]

Name Stmts Miss Cover Missing
-----------------------------------------------------
swift_storage_context 40 0 100%
swift_storage_hooks 70 16 77% 72, 77, 107-137
swift_storage_utils 111 8 93% 241-248
-----------------------------------------------------
TOTAL 221 24 89%
----------------------------------------------------------------------
Ran 31 tests in 1.384s

FAILED (failures=2)
make: *** [unit_test] Error 1

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#653 swift-storage-next for alexlist mp231406
charm_lint_check

This build:
http://10.98.191.181:8080/job/charm_lint_check/653/

MP URL:
https://code.launchpad.net/~alexlist/charms/trusty/swift-storage/nrpe-rebased/+merge/231406

Proposed branch:
lp:~alexlist/charms/trusty/swift-storage/nrpe-rebased

Results summary:
    LINT FAIL: lint-check failed

LINT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_lint_check/make-lint.653:
hooks/swift_storage_hooks.py:45:1: E302 expected 2 blank lines, found 1
hooks/swift_storage_hooks.py:104:1: E302 expected 2 blank lines, found 1
hooks/swift_storage_hooks.py:135:22: E251 unexpected spaces around keyword / parameter equals
hooks/swift_storage_hooks.py:135:24: E251 unexpected spaces around keyword / parameter equals
hooks/swift_storage_hooks.py:139:1: E302 expected 2 blank lines, found 1
hooks/swift_storage_utils.py:96:1: E302 expected 2 blank lines, found 1
hooks/swift_storage_utils.py:240:1: E302 expected 2 blank lines, found 1
hooks/swift_storage_utils.py:249:1: W391 blank line at end of file
make: *** [lint] Error 1

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #4234 swift-storage-next for alexlist mp231406
    LINT FAIL: lint-test failed

LINT Results (max last 2 lines):
make: *** [lint] Error 1
ERROR:root:Make target returned non-zero.

Full lint test output: http://paste.ubuntu.com/10965097/
Build: http://10.245.162.77:8080/job/charm_lint_check/4234/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #4251 swift-storage-next for alexlist mp231406
    LINT FAIL: lint-test failed

LINT Results (max last 2 lines):
make: *** [lint] Error 1
ERROR:root:Make target returned non-zero.

Full lint test output: http://paste.ubuntu.com/10965294/
Build: http://10.245.162.77:8080/job/charm_lint_check/4251/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #3977 swift-storage-next for alexlist mp231406
    UNIT FAIL: unit-test failed

UNIT Results (max last 2 lines):
make: *** [unit_test] Error 1
ERROR:root:Make target returned non-zero.

Full unit test output: http://paste.ubuntu.com/10965295/
Build: http://10.245.162.77:8080/job/charm_unit_test/3977/

Unmerged revisions

45. By Alexander List

[alexlist] move Nagios checks from scripts/ to files/, add service checks, add sudo permissions for service checks

44. By Alexander List

[alexlist] Initial support for nrpe-external-master, fix rsync configuration to support /etc/rsync.d

43. By Alexander List

[alexlist] re-sync charm-helpers, import charmsupport

42. By Alexander List

[alexlist] add config parameters for nrpe-external-master support

41. By Alexander List

[alexlist] add charmsupport dependency

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches