Merge lp:~stub/charms/trusty/cassandra/rsync-port into lp:charms/trusty/cassandra

Proposed by Stuart Bishop
Status: Merged
Merged at revision: 369
Proposed branch: lp:~stub/charms/trusty/cassandra/rsync-port
Merge into: lp:charms/trusty/cassandra
Diff against target: 60 lines (+8/-5)
3 files modified
hooks/actions.py (+1/-0)
tests/test_actions.py (+1/-0)
tests/test_integration.py (+6/-5)
To merge this branch: bzr merge lp:~stub/charms/trusty/cassandra/rsync-port
Reviewer Review Type Date Requested Status
Konstantinos Tsakalozos (community) Approve
Review Queue (community) automated testing Approve
charmers Pending
Review via email: mp+278671@code.launchpad.net

Description of the change

Open access to the rsync port.

This does nothing unless a subordinate is installing and configuring rsyncd, at which point it is a requirement. Since charms using ufw are in the minority, it seems better to open the point here in the Cassandra charm than require subordinates to somehow detect if ufw has been enabled and react appropriately.

(The nrpe port is already open for the same reasons)

To post a comment you must log in.
Revision history for this message
Review Queue (review-queue) wrote :

This item has failed automated testing! Results available here http://juju-ci.vapour.ws:8080/job/charm-bundle-test-lxc/1562/

review: Needs Fixing (automated testing)
367. By Stuart Bishop

Fix firewall unit test

Revision history for this message
Review Queue (review-queue) wrote :

This item has failed automated testing! Results available here http://juju-ci.vapour.ws:8080/job/charm-bundle-test-aws/1545/

review: Needs Fixing (automated testing)
368. By Stuart Bishop

Merge test suite fixes from spike

Revision history for this message
Review Queue (review-queue) wrote :

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

review: Approve (automated testing)
Revision history for this message
Review Queue (review-queue) wrote :

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

review: Approve (automated testing)
Revision history for this message
Review Queue (review-queue) wrote :

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

review: Approve (automated testing)
Revision history for this message
Review Queue (review-queue) wrote :

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

review: Approve (automated testing)
Revision history for this message
Review Queue (review-queue) wrote :

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

review: Approve (automated testing)
Revision history for this message
Review Queue (review-queue) wrote :

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

review: Approve (automated testing)
Revision history for this message
Konstantinos Tsakalozos (kos.tsakalozos) wrote :

The tests run for too long and this makes the review process rather hard. This patch is small enough to verify that is mostly harmless. Yet not being able to run the tests in reasonable times might be a blocker for larger patches.

In this particular case we are ok with the merge. Thank you for your time and effort.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/actions.py'
2--- hooks/actions.py 2015-10-22 04:50:10 +0000
3+++ hooks/actions.py 2015-11-27 08:10:40 +0000
4@@ -693,6 +693,7 @@
5 # to control access.
6 ufw.service('ssh', 'open')
7 ufw.service('nrpe', 'open') # Also NRPE for nagios checks.
8+ ufw.service('rsync', 'open') # Also rsync for data transfer and backups.
9
10 # Clients need client access. These protocols are configured to
11 # require authentication.
12
13=== modified file 'tests/test_actions.py'
14--- tests/test_actions.py 2015-09-10 07:22:22 +0000
15+++ tests/test_actions.py 2015-11-27 08:10:40 +0000
16@@ -857,6 +857,7 @@
17 # SSH and the client protocol ports are always fully open.
18 ufw.service.assert_has_calls([call('ssh', 'open'),
19 call('nrpe', 'open'),
20+ call('rsync', 'open'),
21 call(9042, 'open'),
22 call(9160, 'open')])
23
24
25=== modified file 'tests/test_integration.py'
26--- tests/test_integration.py 2015-08-19 09:57:40 +0000
27+++ tests/test_integration.py 2015-11-27 08:10:40 +0000
28@@ -187,7 +187,7 @@
29
30 def get_client_relinfo(self, relname):
31 # We only need one unit, even if rf > 1
32- s = self.deployment.sentry['cassandra/0']
33+ s = self.deployment.sentry['cassandra'][0]
34 relinfo = s.relation(relname, 'client:{}'.format(relname))
35 return relinfo
36
37@@ -287,11 +287,11 @@
38 # and data migrated. Instead, keep checking until our condition
39 # is met, or a timeout reached.
40 timeout = time.time() + 300
41- for unit_num in range(0, self.rf):
42- unit = 'cassandra/{}'.format(unit_num)
43+ for s in self.deployment.sentry['cassandra']:
44+ unit = s.info['unit_name']
45+ unit_num = s.info['unit']
46 with self.subTest(unit=unit):
47 while True:
48- s = self.deployment.sentry[unit]
49 # Attempting to diagnose Amulet failures. I suspect
50 # SSH host keys again, per Bug #802117
51 try:
52@@ -354,7 +354,8 @@
53 self.assertIsInstance(fail, AuthenticationFailed)
54
55 def test_cqlsh(self):
56- subprocess.check_output(['juju', 'ssh', 'cassandra/0',
57+ unit = self.deployment.sentry['cassandra'][0].info['unit_name']
58+ subprocess.check_output(['juju', 'ssh', unit,
59 'sudo -H cqlsh -e exit'],
60 stderr=subprocess.STDOUT)
61

Subscribers

People subscribed via source and target branches

to all changes: