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
1=== modified file 'hooks/common.py'
2--- hooks/common.py 2014-09-03 04:10:49 +0000
3+++ hooks/common.py 2014-12-09 20:28:56 +0000
4@@ -8,3 +8,4 @@
5 storm_yaml_path = os.path.join(os.path.sep, storm_conf_path, 'storm.yaml')
6 storm_local_dir = os.path.join(os.path.sep, 'tmp', 'storm', 'local')
7 storm_data_dir = os.path.join(os.path.sep, 'home', 'storm')
8+hosts_path = os.path.join(os.path.sep, 'etc', 'hosts')
9
10=== modified file 'hooks/install'
11--- hooks/install 2014-09-03 04:10:49 +0000
12+++ hooks/install 2014-12-09 20:28:56 +0000
13@@ -8,6 +8,7 @@
14 from bdutils import setDirPermission, fileSetKV
15 from shutil import copy
16 from charmhelpers.core.hookenv import open_port
17+from charmhelpers.lib.utils import get_unit_hostname
18
19 sys.path.insert(0, os.path.join(os.environ['CHARM_DIR'], 'lib'))
20
21@@ -42,7 +43,7 @@
22 open_port(8081)
23 open_port(8080)
24 open_port(6627)
25-
26+ fileSetKV(com.hosts_path, hookenv.unit_get('private-address')+' ', get_unit_hostname())
27
28 if __name__ == "__main__":
29 # execute a hook based on the name the program is called by
30
31=== modified file 'hooks/nimbus-relation-joined'
32--- hooks/nimbus-relation-joined 2014-09-03 17:52:32 +0000
33+++ hooks/nimbus-relation-joined 2014-12-09 20:28:56 +0000
34@@ -7,6 +7,7 @@
35 import common as com
36 from bdutils import fileGetKV, fileSetKV, mergeFiles, is_jvm_service_active
37 from shutil import copy
38+from charmhelpers.lib.utils import get_unit_hostname
39
40 sys.path.insert(0, os.path.join(os.environ['CHARM_DIR'], 'lib'))
41
42@@ -24,14 +25,14 @@
43 @hooks.hook('nimbus-relation-joined')
44 def nimbus_relation_joined():
45 log('nimbus-relation-joined called')
46- master_hostname = hookenv.unit_private_ip()
47+ master_ip = hookenv.unit_private_ip()
48 if not is_jvm_service_active("nimbus"):
49 mergeFiles(com.supervisord_conf_file, com.nimbus_supervisord_conf)
50- log('nimbus-relation-joined nimbus_hostname={}'.format(master_hostname))
51- fileSetKV(com.storm_yaml_path, "nimbus.host:", " \""+master_hostname+"\"")
52- fileSetKV(com.storm_yaml_path, "drpc.servers:", "\n- \""+master_hostname+"\"")
53+ log('nimbus-relation-joined nimbus_ip={}'.format(master_ip))
54+ fileSetKV(com.storm_yaml_path, "nimbus.host:", " \""+master_ip+"\"")
55+ fileSetKV(com.storm_yaml_path, "drpc.servers:", "\n- \""+master_ip+"\"")
56 host.service_restart("supervisor")
57- relation_set(nimbus_hostname = master_hostname)
58+ relation_set(nimbus_hostname = get_unit_hostname())
59 relation_set(nimbus_ready = 'Ready')
60
61
62
63=== modified file 'hooks/slave-relation-changed'
64--- hooks/slave-relation-changed 2014-09-03 04:10:49 +0000
65+++ hooks/slave-relation-changed 2014-12-09 20:28:56 +0000
66@@ -26,11 +26,14 @@
67 if nimbusReady !='Ready':
68 sys.exit(0)
69 nimbus_hostname = relation_get('nimbus_hostname')
70+ nimbus_ip = relation_get('private-address')
71 #copy(com.slave_supervisord_conf, com.supervisord_conf_file)
72 mergeFiles(com.supervisord_conf_file, com.slave_supervisord_conf)
73- log('nimbus-relation-joined nimbus_hostname={}'.format(nimbus_hostname))
74- fileSetKV(com.storm_yaml_path, "nimbus.host:", " \""+nimbus_hostname+"\"")
75- fileSetKV(com.storm_yaml_path, "drpc.servers:", "\n- \""+nimbus_hostname+"\"")
76+ log('nimbus-relation-joined nimbus_ip={}'.format(nimbus_ip))
77+ fileSetKV(com.storm_yaml_path, "nimbus.host:", " \""+nimbus_ip+"\"")
78+ fileSetKV(com.storm_yaml_path, "drpc.servers:", "\n- \""+nimbus_ip+"\"")
79+ fileSetKV(com.hosts_path, nimbus_ip+' ', nimbus_hostname)
80+
81 host.service_restart("supervisor")
82
83
84
85=== modified file 'tests/storm.yaml'
86--- tests/storm.yaml 2014-09-18 00:19:05 +0000
87+++ tests/storm.yaml 2014-12-09 20:28:56 +0000
88@@ -1,19 +1,19 @@
89 hdp-storm-cluster:
90 services:
91 "hdp-zookeeper":
92- charm: "cs:~asanjar/trusty/hdp-zookeeper"
93+ charm: "cs:trusty/hdp-zookeeper"
94 num_units: 3
95 annotations:
96 "gui-x": "466.40822141386604"
97 "gui-y": "248.59259441628797"
98 "nimbus-server":
99- charm: "cs:~asanjar/trusty/hdp-storm"
100+ charm: "hdp-storm"
101 num_units: 1
102 annotations:
103 "gui-x": "947.5838407971116"
104 "gui-y": "526.3994677946897"
105 "storm-worker":
106- charm: "cs:~asanjar/trusty/hdp-storm"
107+ charm: "hdp-storm"
108 num_units: 1
109 annotations:
110 "gui-x": "950.2287444616625"

Subscribers

People subscribed via source and target branches