Merge lp:~paulgear/charms/trusty/cassandra/devel into lp:charms/trusty/cassandra

Proposed by Paul Gear
Status: Merged
Merged at revision: 379
Proposed branch: lp:~paulgear/charms/trusty/cassandra/devel
Merge into: lp:charms/trusty/cassandra
Diff against target: 56 lines (+14/-4)
3 files modified
hooks/actions.py (+2/-4)
hooks/helpers.py (+2/-0)
hooks/hooks.py (+10/-0)
To merge this branch: bzr merge lp:~paulgear/charms/trusty/cassandra/devel
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
charmers Pending
Review via email: mp+298856@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Paul Gear (paulgear) wrote :

Currently testing; please do not merge yet. This is merely here to easily share diffs against trunk.

385. By Paul Gear

Revert old version checks and let's just pretend DSE 5.0 == Cassandra 3.0

386. By Paul Gear

Remove debug logging now that DSE 5.0 == Cassandra 3.0 is confirmed

Revision history for this message
Paul Gear (paulgear) wrote :

This is passing in is-mojo-ci now. Tagging Stuart for review.

Revision history for this message
Paul Gear (paulgear) wrote :

To clarify the purpose of this branch, it's to fix the handling of DSE 5.0, and to make it possible to install everything via proxy in an egress-filtered environment (i.e. our CI).

Revision history for this message
Stuart Bishop (stub) wrote :

All good, bar a single pedantic point I don't really care about.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/actions.py'
--- hooks/actions.py 2016-06-09 10:59:24 +0000
+++ hooks/actions.py 2016-07-01 05:04:34 +0000
@@ -133,10 +133,8 @@
133133
134@action134@action
135def set_proxy():135def set_proxy():
136 config = hookenv.config()136 import hooks
137 if config['http_proxy']:137 hooks.set_proxy()
138 os.environ['http_proxy'] = config['http_proxy']
139 os.environ['https_proxy'] = config['http_proxy']
140138
141139
142@action140@action
143141
=== modified file 'hooks/helpers.py'
--- hooks/helpers.py 2016-06-09 10:59:24 +0000
+++ hooks/helpers.py 2016-07-01 05:04:34 +0000
@@ -324,6 +324,8 @@
324 dse_ver = get_package_version('dse-full')324 dse_ver = get_package_version('dse-full')
325 if not dse_ver:325 if not dse_ver:
326 return None326 return None
327 elif LooseVersion(dse_ver) >= LooseVersion('5.0'):
328 return '3.0'
327 elif LooseVersion(dse_ver) >= LooseVersion('4.7'):329 elif LooseVersion(dse_ver) >= LooseVersion('4.7'):
328 return '2.1'330 return '2.1'
329 else:331 else:
330332
=== modified file 'hooks/hooks.py'
--- hooks/hooks.py 2016-02-26 16:47:03 +0000
+++ hooks/hooks.py 2016-07-01 05:04:34 +0000
@@ -18,12 +18,22 @@
18from charmhelpers.core import hookenv18from charmhelpers.core import hookenv
1919
2020
21def set_proxy():
22 import os
23 config = hookenv.config()
24 if config['http_proxy']:
25 os.environ['ftp_proxy'] = config['http_proxy']
26 os.environ['http_proxy'] = config['http_proxy']
27 os.environ['https_proxy'] = config['http_proxy']
28
29
21def bootstrap():30def bootstrap():
22 try:31 try:
23 import bcrypt # NOQA: flake832 import bcrypt # NOQA: flake8
24 import cassandra # NOQA: flake833 import cassandra # NOQA: flake8
25 except ImportError:34 except ImportError:
26 packages = ['python3-bcrypt', 'python3-cassandra']35 packages = ['python3-bcrypt', 'python3-cassandra']
36 set_proxy()
27 fetch.configure_sources(update=True)37 fetch.configure_sources(update=True)
28 fetch.apt_install(packages, fatal=True)38 fetch.apt_install(packages, fatal=True)
29 import bcrypt # NOQA: flake839 import bcrypt # NOQA: flake8

Subscribers

People subscribed via source and target branches

to all changes: