~kos.tsakalozos/charms/trusty/hdp-storm/trunk

« back to all changes in this revision

Viewing changes to hooks/slave-relation-changed

  • Committer: Charles Butler
  • Date: 2014-12-09 17:40:32 UTC
  • mfrom: (13.1.1 hdp-storm)
  • Revision ID: chuck@dasroot.net-20141209174032-an5xc0we3fzqlu65
[r=lazypower] amir sanjar 2014-11-12 enable storm for HP Cloud

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    if nimbusReady !='Ready':
27
27
        sys.exit(0)
28
28
    nimbus_hostname = relation_get('nimbus_hostname')
 
29
    nimbus_ip = relation_get('private-address')
29
30
    #copy(com.slave_supervisord_conf, com.supervisord_conf_file)
30
31
    mergeFiles(com.supervisord_conf_file, com.slave_supervisord_conf)
31
 
    log('nimbus-relation-joined nimbus_hostname={}'.format(nimbus_hostname))
32
 
    fileSetKV(com.storm_yaml_path, "nimbus.host:", " \""+nimbus_hostname+"\"")
33
 
    fileSetKV(com.storm_yaml_path, "drpc.servers:", "\n- \""+nimbus_hostname+"\"")
 
32
    log('nimbus-relation-joined nimbus_ip={}'.format(nimbus_ip))
 
33
    fileSetKV(com.storm_yaml_path, "nimbus.host:", " \""+nimbus_ip+"\"")
 
34
    fileSetKV(com.storm_yaml_path, "drpc.servers:", "\n- \""+nimbus_ip+"\"")
 
35
    fileSetKV(com.hosts_path, nimbus_ip+' ', nimbus_hostname)
 
36
 
34
37
    host.service_restart("supervisor")
35
38
    
36
39