Merge lp://staging/~freyes/charms/trusty/memcached/lp1423439 into lp://staging/charms/trusty/memcached

Proposed by Felipe Reyes
Status: Superseded
Proposed branch: lp://staging/~freyes/charms/trusty/memcached/lp1423439
Merge into: lp://staging/charms/trusty/memcached
Diff against target: 1383 lines (+668/-111)
16 files modified
Makefile (+1/-1)
hooks/charmhelpers/contrib/hahelpers/cluster.py (+52/-4)
hooks/charmhelpers/contrib/network/ip.py (+84/-1)
hooks/charmhelpers/contrib/network/ufw.py (+46/-3)
hooks/charmhelpers/core/fstab.py (+2/-2)
hooks/charmhelpers/core/hookenv.py (+272/-39)
hooks/charmhelpers/core/host.py (+30/-8)
hooks/charmhelpers/core/services/base.py (+43/-19)
hooks/charmhelpers/core/services/helpers.py (+14/-6)
hooks/charmhelpers/core/strutils.py (+42/-0)
hooks/charmhelpers/core/unitdata.py (+1/-1)
hooks/charmhelpers/fetch/__init__.py (+21/-13)
hooks/charmhelpers/fetch/giturl.py (+7/-5)
hooks/memcached_hooks.py (+19/-0)
hooks/memcached_utils.py (+6/-2)
unit_tests/test_memcached_hooks.py (+28/-7)
To merge this branch: bzr merge lp://staging/~freyes/charms/trusty/memcached/lp1423439
Reviewer Review Type Date Requested Status
Jorge Niedbalski (community) Needs Fixing
Review via email: mp+264718@code.staging.launchpad.net

This proposal has been superseded by a proposal from 2015-07-22.

Description of the change

Dear Charmers,

This is the final patch needed to fix the bug 1423439, this MP is a sync up with charm-helpers to get the new functionality added in https://code.launchpad.net/~freyes/charm-helpers/lp1423439/+merge/263399 and minor modifications to make use of them.

How this works:

 - This patch will make memcache to just set the default's firewall policy to accept and during installation a DENY rule is added to make sure memcached's port is secured.
- When a new relation is added the units that are going to be allowed to access the service are added as to the firewall in the _first_ position, this will allow the firewall to match those hosts correctly and not apply the DENY rule that was added during the installation.

Here is a bundler used for testing:
foo:
  series: trusty
  services:
    memcached:
      charm: local:trusty/memcached
      num_units: 2
      options:
        size: 512
        allow-ufw-ip6-softfail: true
    mediawiki:
      charm: cs:trusty/mediawiki
    mysql:
      charm: cs:trusty/mysql
      options:
        dataset-size: 128M
    munin:
      charm: cs:trusty/munin
  relations:
    - ["mediawiki:db", "mysql:db"]
    - ["memcached", "mediawiki"]
    - ["munin:munin", "mysql:munin"]
    - ["munin:munin", "memcached:munin"]

$ juju deployer -c memcached.yaml -d -v foo
# when everything has settled down
$ telnet $(juju deployer -f memcached) 11211
2015-07-14 11:40:40 Service: memcached address: 10.0.3.215
Trying 10.0.3.215...
^C
$ telnet $(juju deployer -f memcached) 4949
2015-07-14 11:42:28 Service: memcached address: 10.0.3.215
Trying 10.0.3.215...
Connected to 10.0.3.215.
Escape character is '^]'.
Connection closed by foreign host.
# this case the port is open, but munin's daemon closed the connection because we aren't in the list of allowed hosts.

Best,

To post a comment you must log in.
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

Felipe,

The overall change looks good to me. However I have some issues passing the tests with python 2.7 (http://paste.ubuntu.com/11922162/), also I found a minor issue on the code (commented).

Please fix these issues before to get my +1.

Thanks.

review: Needs Fixing
75. By Felipe Reyes

Fix unit tests

76. By Felipe Reyes

Fix nrpe port

Revision history for this message
Felipe Reyes (freyes) wrote :

@niedbalski, thanks for the review, I fixed the open_port() number and the unit tests.

77. By Felipe Reyes

fix amulet tests

Unmerged revisions

77. By Felipe Reyes

fix amulet tests

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