Merge lp:~bigdata-dev/charms/trusty/hdp-storm/trunk into lp:charms/trusty/hdp-storm

Proposed by Charles Butler
Status: Merged
Merged at revision: 17
Proposed branch: lp:~bigdata-dev/charms/trusty/hdp-storm/trunk
Merge into: lp:charms/trusty/hdp-storm
Diff against target: 110 lines (+18/-12)
5 files modified
hooks/common.py (+1/-0)
hooks/install (+2/-1)
hooks/nimbus-relation-joined (+6/-5)
hooks/slave-relation-changed (+6/-3)
tests/storm.yaml (+3/-3)
To merge this branch: bzr merge lp:~bigdata-dev/charms/trusty/hdp-storm/trunk
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+244212@code.launchpad.net

Description of the change

Includes amir's openstack changes

To post a comment you must log in.
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

+1 Chuck, LGTM.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/common.py'
--- hooks/common.py 2014-09-03 04:10:49 +0000
+++ hooks/common.py 2014-12-09 20:28:56 +0000
@@ -8,3 +8,4 @@
8storm_yaml_path = os.path.join(os.path.sep, storm_conf_path, 'storm.yaml')8storm_yaml_path = os.path.join(os.path.sep, storm_conf_path, 'storm.yaml')
9storm_local_dir = os.path.join(os.path.sep, 'tmp', 'storm', 'local')9storm_local_dir = os.path.join(os.path.sep, 'tmp', 'storm', 'local')
10storm_data_dir = os.path.join(os.path.sep, 'home', 'storm')10storm_data_dir = os.path.join(os.path.sep, 'home', 'storm')
11hosts_path = os.path.join(os.path.sep, 'etc', 'hosts')
1112
=== modified file 'hooks/install'
--- hooks/install 2014-09-03 04:10:49 +0000
+++ hooks/install 2014-12-09 20:28:56 +0000
@@ -8,6 +8,7 @@
8from bdutils import setDirPermission, fileSetKV8from bdutils import setDirPermission, fileSetKV
9from shutil import copy9from shutil import copy
10from charmhelpers.core.hookenv import open_port10from charmhelpers.core.hookenv import open_port
11from charmhelpers.lib.utils import get_unit_hostname
1112
12sys.path.insert(0, os.path.join(os.environ['CHARM_DIR'], 'lib'))13sys.path.insert(0, os.path.join(os.environ['CHARM_DIR'], 'lib'))
1314
@@ -42,7 +43,7 @@
42 open_port(8081)43 open_port(8081)
43 open_port(8080)44 open_port(8080)
44 open_port(6627)45 open_port(6627)
4546 fileSetKV(com.hosts_path, hookenv.unit_get('private-address')+' ', get_unit_hostname())
4647
47if __name__ == "__main__":48if __name__ == "__main__":
48 # execute a hook based on the name the program is called by49 # execute a hook based on the name the program is called by
4950
=== modified file 'hooks/nimbus-relation-joined'
--- hooks/nimbus-relation-joined 2014-09-03 17:52:32 +0000
+++ hooks/nimbus-relation-joined 2014-12-09 20:28:56 +0000
@@ -7,6 +7,7 @@
7import common as com7import common as com
8from bdutils import fileGetKV, fileSetKV, mergeFiles, is_jvm_service_active8from bdutils import fileGetKV, fileSetKV, mergeFiles, is_jvm_service_active
9from shutil import copy9from shutil import copy
10from charmhelpers.lib.utils import get_unit_hostname
1011
11sys.path.insert(0, os.path.join(os.environ['CHARM_DIR'], 'lib'))12sys.path.insert(0, os.path.join(os.environ['CHARM_DIR'], 'lib'))
1213
@@ -24,14 +25,14 @@
24@hooks.hook('nimbus-relation-joined')25@hooks.hook('nimbus-relation-joined')
25def nimbus_relation_joined():26def nimbus_relation_joined():
26 log('nimbus-relation-joined called')27 log('nimbus-relation-joined called')
27 master_hostname = hookenv.unit_private_ip()28 master_ip = hookenv.unit_private_ip()
28 if not is_jvm_service_active("nimbus"):29 if not is_jvm_service_active("nimbus"):
29 mergeFiles(com.supervisord_conf_file, com.nimbus_supervisord_conf)30 mergeFiles(com.supervisord_conf_file, com.nimbus_supervisord_conf)
30 log('nimbus-relation-joined nimbus_hostname={}'.format(master_hostname))31 log('nimbus-relation-joined nimbus_ip={}'.format(master_ip))
31 fileSetKV(com.storm_yaml_path, "nimbus.host:", " \""+master_hostname+"\"")32 fileSetKV(com.storm_yaml_path, "nimbus.host:", " \""+master_ip+"\"")
32 fileSetKV(com.storm_yaml_path, "drpc.servers:", "\n- \""+master_hostname+"\"")33 fileSetKV(com.storm_yaml_path, "drpc.servers:", "\n- \""+master_ip+"\"")
33 host.service_restart("supervisor")34 host.service_restart("supervisor")
34 relation_set(nimbus_hostname = master_hostname)35 relation_set(nimbus_hostname = get_unit_hostname())
35 relation_set(nimbus_ready = 'Ready')36 relation_set(nimbus_ready = 'Ready')
36 37
3738
3839
=== modified file 'hooks/slave-relation-changed'
--- hooks/slave-relation-changed 2014-09-03 04:10:49 +0000
+++ hooks/slave-relation-changed 2014-12-09 20:28:56 +0000
@@ -26,11 +26,14 @@
26 if nimbusReady !='Ready':26 if nimbusReady !='Ready':
27 sys.exit(0)27 sys.exit(0)
28 nimbus_hostname = relation_get('nimbus_hostname')28 nimbus_hostname = relation_get('nimbus_hostname')
29 nimbus_ip = relation_get('private-address')
29 #copy(com.slave_supervisord_conf, com.supervisord_conf_file)30 #copy(com.slave_supervisord_conf, com.supervisord_conf_file)
30 mergeFiles(com.supervisord_conf_file, com.slave_supervisord_conf)31 mergeFiles(com.supervisord_conf_file, com.slave_supervisord_conf)
31 log('nimbus-relation-joined nimbus_hostname={}'.format(nimbus_hostname))32 log('nimbus-relation-joined nimbus_ip={}'.format(nimbus_ip))
32 fileSetKV(com.storm_yaml_path, "nimbus.host:", " \""+nimbus_hostname+"\"")33 fileSetKV(com.storm_yaml_path, "nimbus.host:", " \""+nimbus_ip+"\"")
33 fileSetKV(com.storm_yaml_path, "drpc.servers:", "\n- \""+nimbus_hostname+"\"")34 fileSetKV(com.storm_yaml_path, "drpc.servers:", "\n- \""+nimbus_ip+"\"")
35 fileSetKV(com.hosts_path, nimbus_ip+' ', nimbus_hostname)
36
34 host.service_restart("supervisor")37 host.service_restart("supervisor")
35 38
3639
3740
=== modified file 'tests/storm.yaml'
--- tests/storm.yaml 2014-09-18 00:19:05 +0000
+++ tests/storm.yaml 2014-12-09 20:28:56 +0000
@@ -1,19 +1,19 @@
1hdp-storm-cluster: 1hdp-storm-cluster:
2 services: 2 services:
3 "hdp-zookeeper": 3 "hdp-zookeeper":
4 charm: "cs:~asanjar/trusty/hdp-zookeeper"4 charm: "cs:trusty/hdp-zookeeper"
5 num_units: 35 num_units: 3
6 annotations: 6 annotations:
7 "gui-x": "466.40822141386604"7 "gui-x": "466.40822141386604"
8 "gui-y": "248.59259441628797"8 "gui-y": "248.59259441628797"
9 "nimbus-server": 9 "nimbus-server":
10 charm: "cs:~asanjar/trusty/hdp-storm"10 charm: "hdp-storm"
11 num_units: 111 num_units: 1
12 annotations: 12 annotations:
13 "gui-x": "947.5838407971116"13 "gui-x": "947.5838407971116"
14 "gui-y": "526.3994677946897"14 "gui-y": "526.3994677946897"
15 "storm-worker": 15 "storm-worker":
16 charm: "cs:~asanjar/trusty/hdp-storm"16 charm: "hdp-storm"
17 num_units: 117 num_units: 1
18 annotations: 18 annotations:
19 "gui-x": "950.2287444616625"19 "gui-x": "950.2287444616625"

Subscribers

People subscribed via source and target branches