Merge lp://staging/~freyes/charms/trusty/nova-cloud-controller/bug-989337 into lp://staging/~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next
- Trusty Tahr (14.04)
- bug-989337
- Merge into next
Status: | Merged |
---|---|
Approved by: | Edward Hope-Morley |
Approved revision: | 134 |
Merged at revision: | 129 |
Proposed branch: | lp://staging/~freyes/charms/trusty/nova-cloud-controller/bug-989337 |
Merge into: | lp://staging/~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next |
Diff against target: |
268 lines (+145/-1) 10 files modified
hooks/nova_cc_context.py (+25/-0) hooks/nova_cc_hooks.py (+9/-0) hooks/nova_cc_utils.py (+3/-1) metadata.yaml (+2/-0) templates/folsom/nova.conf (+5/-0) templates/grizzly/nova.conf (+5/-0) templates/havana/nova.conf (+4/-0) templates/icehouse/nova.conf (+4/-0) unit_tests/test_nova_cc_contexts.py (+87/-0) unit_tests/test_nova_cc_hooks.py (+1/-0) |
To merge this branch: | bzr merge lp://staging/~freyes/charms/trusty/nova-cloud-controller/bug-989337 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jorge Niedbalski (community) | Approve | ||
Edward Hope-Morley | Pending | ||
James Troup | Pending | ||
OpenStack Charmers | Pending | ||
Review via email: mp+244857@code.staging.launchpad.net |
This proposal supersedes a proposal from 2014-12-15.
Commit message
Description of the change
This branch extends the charm to install python-memcache, and configure nova.conf adding the key memcached_servers when a relationship with memcached service is established.
If multiple units of memcached are available, all of them are used (memcached_servers = host1:port1,
To secure memcached access this relies in the memcached charm ability to use iptables rules to only allow access to related machines[0]
This patch can be tested using the deployer file available at https:/
[0] http://
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_unit_test #579 nova-cloud-
UNIT FAIL: unit-test failed
UNIT Results (max last 4 lines) from
/var/lib/
Ran 4 tests in 0.150s
FAILED (errors=2)
make: *** [unit_test] Error 1
Full unit output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_amulet_test #304 nova-cloud-
AMULET OK: believed to pass, but you should confirm results
AMULET Results (max last 4 lines) from
/var/lib/
juju-test.conductor DEBUG : Tearing down osci-sv05 juju environment
juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv05"
WARNING cannot delete security group "juju-osci-sv05-0". Used by another environment?
juju-test INFO : Results: 3 passed, 0 failed, 0 errored
Full amulet output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_unit_test #582 nova-cloud-
UNIT FAIL: unit-test failed
UNIT Results (max last 4 lines) from
/var/lib/
Ran 4 tests in 0.153s
FAILED (errors=2)
make: *** [unit_test] Error 1
Full unit output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_lint_check #774 nova-cloud-
LINT OK: believed to pass, but you should confirm results
LINT Results (max last 4 lines) from
/var/lib/
I: config.yaml: option haproxy-
I: config.yaml: option ssl_cert has no default value
I: config.yaml: option nvp-l3-uuid has no default value
I: config.yaml: option os-internal-network has no default value
Full lint output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_amulet_test #307 nova-cloud-
AMULET FAIL: amulet-test failed
AMULET Results (max last 4 lines) from
/var/lib/
return self.read(buflen)
File "/usr/lib/
return self._sslobj.
socket.error: [Errno 110] Connection timed out
Full amulet output: http://
Build: http://
Edward Hope-Morley (hopem) wrote : Posted in a previous version of this proposal | # |
I'm getting a couple of unit test failures here. Looks like a couple of extra mocks needed - see attached u/t output.
Edward Hope-Morley (hopem) wrote : Posted in a previous version of this proposal | # |
Hmm can't attach so pasting:
$ make unit_test
Starting unit tests...
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
test_instance_
test_instance_
Failure: OSError ([Errno 2] No such file or directory) ... ERROR
Failure: OSError ([Errno 2] No such file or directory) ... ERROR
=======
ERROR: Failure: OSError ([Errno 2] No such file or directory)
-------
Traceback (most recent call last):
File "/usr/lib/
addr.filename, addr.module)
File "/usr/lib/
return self.importFrom
File "/usr/lib/
mod = load_module(
File "/home/
import nova_cc_utils as utils
File "hooks/
nova_
File "hooks/
self)
File "hooks/
res = func(*args, **kwargs)
File "hooks/
config_data = json.loads(
File "/usr/lib/
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 2] No such file or directory
=======
ERROR: Failure: OSError ([Errno 2] No such file or directory)
-------
Traceback (most recent call last):
File "/usr/lib/
addr.filename, addr.module)
File "/usr/lib/
return self.importFrom
File "/usr/lib/
mod = load_module(
File "/home/
import nova_cc_utils as utils
File "hooks/
nova_
File "hooks/
self)
File "hooks/
res = func(*args, **kwa...
Edward Hope-Morley (hopem) wrote : Posted in a previous version of this proposal | # |
FWIW, other than the above this lgtm
Felipe Reyes (freyes) wrote : Posted in a previous version of this proposal | # |
Edward, I fixed the broken tests, the patch was a little bit larger than what I expected, but they are working OK now.
Name Stmts Miss Cover Missing
-------
hooks/nova_
hooks/nova_cc_hooks 447 146 67% 132-135, 148-149, 173, 184-185, 189, 224, 229-234, 245, 325-328, 336-339, 345-348, 358-374, 383-385, 395-409, 413-422, 508, 518, 522-523, 576, 582-592, 597-608, 618-628, 633-672, 682-697, 705-709, 734-743, 767, 772-780, 806, 861, 865-868
hooks/nova_cc_utils 442 111 75% 296-301, 312-315, 325-326, 382, 384, 428-430, 434, 448-456, 463-468, 472-486, 592-594, 599-602, 607, 611, 635-636, 650-652, 673-674, 680-703, 707-713, 717-723, 729, 735, 742, 753-757, 842, 902-908, 912-914, 918-921, 925-937
-------
TOTAL 1055 369 65%
-------
Ran 99 tests in 7.518s
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_lint_check #922 nova-cloud-
LINT OK: passed
LINT Results (max last 5 lines):
I: config.yaml: option os-admin-network has no default value
I: config.yaml: option haproxy-
I: config.yaml: option ssl_cert has no default value
I: config.yaml: option nvp-l3-uuid has no default value
I: config.yaml: option os-internal-network has no default value
Full lint test output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_unit_test #757 nova-cloud-
UNIT OK: passed
UNIT Results (max last 5 lines):
hooks/
hooks/
TOTAL 1055 369 65%
Ran 99 tests in 8.707s
OK
Full unit test output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_amulet_test #340 nova-cloud-
AMULET OK: passed
AMULET Results (max last 5 lines):
juju-
juju-
juju-
WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
juju-test INFO : Results: 3 passed, 0 failed, 0 errored
Full amulet test output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_lint_check #979 nova-cloud-
LINT OK: passed
LINT Results (max last 5 lines):
I: config.yaml: option os-admin-network has no default value
I: config.yaml: option haproxy-
I: config.yaml: option ssl_cert has no default value
I: config.yaml: option nvp-l3-uuid has no default value
I: config.yaml: option os-internal-network has no default value
Full lint test output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_unit_test #814 nova-cloud-
UNIT OK: passed
UNIT Results (max last 5 lines):
hooks/
hooks/
TOTAL 1055 369 65%
Ran 99 tests in 8.712s
OK
Full unit test output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_amulet_test #359 nova-cloud-
AMULET OK: passed
AMULET Results (max last 5 lines):
juju-
juju-
juju-
WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
juju-test INFO : Results: 3 passed, 0 failed, 0 errored
Full amulet test output: http://
Build: http://
Edward Hope-Morley (hopem) wrote : Posted in a previous version of this proposal | # |
Felipe, thanks for working on this it is much needed.
So some initial comments;
* could you please rename the cache-relation-* to memcache-relation-*
* is there are reason for replacing config() with hookenv.config()? I know it is not the nicest coding style but it is the same across all charms so to do it differently here would be breaking convention.
* some more comments inline
Felipe Reyes (freyes) wrote : Posted in a previous version of this proposal | # |
Hi,
> * could you please rename the cache-relation-* to memcache-relation-*
I initially used memcache-relation-* hooks, but they weren't triggered, a quick look to mediawiki charm also uses cache-relation-* for memcache, I'll give it another try to double check this.
> * is there are reason for replacing config() with hookenv.config()? I know
> it is not the nicest coding style but it is the same across all charms so to
> do it differently here would be breaking convention.
I know, but importing config() function made fail the mocking due to the way the modules are imported, if this is a blocker I totally understand and I can revisit this to find a way to make the tests happy.
Best,
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_lint_check #1151 nova-cloud-
LINT OK: passed
LINT Results (max last 5 lines):
I: config.yaml: option os-admin-network has no default value
I: config.yaml: option haproxy-
I: config.yaml: option ssl_cert has no default value
I: config.yaml: option nvp-l3-uuid has no default value
I: config.yaml: option os-internal-network has no default value
Full lint test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_unit_test #985 nova-cloud-
UNIT OK: passed
UNIT Results (max last 5 lines):
hooks/
hooks/
TOTAL 1054 369 65%
Ran 99 tests in 9.596s
OK
Full unit test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_amulet_test #493 nova-cloud-
AMULET FAIL: amulet-test failed
AMULET Results (max last 5 lines):
"
WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
juju-test INFO : Results: 2 passed, 0 failed, 1 errored
ERROR subprocess encountered error code 124
make: *** [test] Error 124
Full amulet test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_lint_check #1159 nova-cloud-
LINT OK: passed
LINT Results (max last 5 lines):
I: config.yaml: option os-admin-network has no default value
I: config.yaml: option haproxy-
I: config.yaml: option ssl_cert has no default value
I: config.yaml: option nvp-l3-uuid has no default value
I: config.yaml: option os-internal-network has no default value
Full lint test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_unit_test #993 nova-cloud-
UNIT OK: passed
UNIT Results (max last 5 lines):
hooks/
hooks/
TOTAL 1055 370 65%
Ran 98 tests in 10.450s
OK
Full unit test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_amulet_test #501 nova-cloud-
AMULET FAIL: amulet-test failed
AMULET Results (max last 5 lines):
subprocess.
WARNING cannot delete security group "juju-osci-sv05-0". Used by another environment?
juju-test INFO : Results: 0 passed, 2 failed, 1 errored
ERROR subprocess encountered error code 2
make: *** [test] Error 2
Full amulet test output: http://
Build: http://
Felipe Reyes (freyes) wrote : Posted in a previous version of this proposal | # |
> juju-test.
> juju-test.conductor DEBUG : Tearing down osci-sv07 juju environment
> juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv07ERROR:
> "
> WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
> juju-test INFO : Results: 2 passed, 0 failed, 1 errored
> ERROR subprocess encountered error code 124
Should I do something with this error?
Felipe Reyes (freyes) : Posted in a previous version of this proposal | # |
Felipe Reyes (freyes) wrote : Posted in a previous version of this proposal | # |
By the way, this patch can be tested using the bundler file available at https:/
Thanks,
James Troup (elmo) wrote : Posted in a previous version of this proposal | # |
memcache (by design) has no ACLs and is not safe to deploy without some sort of protection (e.g. local iptables rules or being run on a private network not accessible to anything but trusted machines). How is this MP dealing with that?
Edward Hope-Morley (hopem) wrote : Posted in a previous version of this proposal | # |
Could this work - https:/
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_lint_check #1236 nova-cloud-
LINT OK: passed
LINT Results (max last 5 lines):
I: config.yaml: option os-admin-network has no default value
I: config.yaml: option haproxy-
I: config.yaml: option ssl_cert has no default value
I: config.yaml: option nvp-l3-uuid has no default value
I: config.yaml: option os-internal-network has no default value
Full lint test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_unit_test #1070 nova-cloud-
UNIT OK: passed
UNIT Results (max last 5 lines):
hooks/
hooks/
TOTAL 1057 370 65%
Ran 99 tests in 10.551s
OK
Full unit test output: http://
Build: http://
Edward Hope-Morley (hopem) wrote : Posted in a previous version of this proposal | # |
We should already be leveraging split network support here e.g. have memcached running on the os-admin-network if defined. That should suffice.
Edward Hope-Morley (hopem) wrote : Posted in a previous version of this proposal | # |
See inline comment
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
UOSCI bot says:
charm_amulet_test #539 nova-cloud-
AMULET OK: passed
AMULET Results (max last 5 lines):
juju-
juju-
juju-
WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
juju-test INFO : Results: 3 passed, 0 failed, 0 errored
Full amulet test output: http://
Build: http://
Jorge Niedbalski (niedbalski) wrote : Posted in a previous version of this proposal | # |
Will not be so easy to enable SASL support on the proposal, mostly since the memcache client requires to support it, and the default python-memcache module seems to not support it. We could use python-
Felipe Reyes (freyes) wrote : Posted in a previous version of this proposal | # |
@elmo, I'm addressing your concerns about memcached security adding iptables rules to allow access only to related machines, I would like to get your feedback on that MP[0]
[0] https:/
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
charm_lint_check #202 nova-cloud-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
charm_unit_test #165 nova-cloud-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
charm_amulet_test #120 nova-cloud-
AMULET OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
charm_lint_check #83 nova-cloud-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
charm_lint_check #89 nova-cloud-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
charm_unit_test #118 nova-cloud-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
charm_unit_test #121 nova-cloud-
UNIT OK: passed
Jorge Niedbalski (niedbalski) wrote : Posted in a previous version of this proposal | # |
All LGTM. Unit and Amulet tests passing, the python written memcache charm has already landed. So just a very minor string refactor required.
Thanks Felipe
Felipe Reyes (freyes) wrote : Posted in a previous version of this proposal | # |
@niedbalski, updated MP to address your comment.
Thanks for reviewing it :)
Edward Hope-Morley (hopem) wrote : Posted in a previous version of this proposal | # |
Felipe, this mostly lgtm but I have a couple of nits. This is top of my list of reviews though!
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
charm_lint_check #183 nova-cloud-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
charm_unit_test #216 nova-cloud-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal | # |
charm_amulet_test #236 nova-cloud-
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
ERROR subprocess encountered error code 1
make: *** [test] Error 1
Full amulet test output: http://
Build: http://
Felipe Reyes (freyes) wrote : | # |
Edward, thanks for reviewing my patch. I pushed this new version that addresses your comments.
Best,
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #189 nova-cloud-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #218 nova-cloud-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #238 nova-cloud-
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
ERROR subprocess encountered error code 1
make: *** [test] Error 1
Full amulet test output: http://
Build: http://
Edward Hope-Morley (hopem) wrote : | # |
OK this lgtm +1
Jorge Niedbalski (niedbalski) : | # |
UOSCI bot says: controller- next for freyes mp239671
charm_lint_check #771 nova-cloud-
LINT OK: believed to pass, but you should confirm results
LINT Results (max last 4 lines) from jenkins/ workspace/ charm_lint_ check/make- lint.771: client- timeout has no default value
/var/lib/
I: config.yaml: option haproxy-
I: config.yaml: option ssl_cert has no default value
I: config.yaml: option nvp-l3-uuid has no default value
I: config.yaml: option os-internal-network has no default value
Full lint output: http:// paste.ubuntu. com/8694351/ 10.98.191. 181:8080/ job/charm_ lint_check/ 771/
Build: http://