Skip to content

Commit

Permalink
fix the passing of collector list to openstack_config script
Browse files Browse the repository at this point in the history
we expect collector_list to be a list of 2 collectors, when
there are more than 1 collector configured. corrected the way
the list was being passed to openstack_config script.

Change-Id: I64e51874c08f4f96c763b46eb94b1caa95bfd8ee
Closes-Bug: #1679859
  • Loading branch information
Raj Reddy committed Apr 5, 2017
1 parent 271c4c2 commit 9bffe94
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions fabfile/tasks/issu_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ def issu_contrail_switch_collector_in_compute_node(*args):
for i in range(0, max_collectors):
collector_list += "%s:8086 " %(hstr_to_ip(get_control_host_string(env.roledefs['collector'][host_num])))
host_num = (host_num + 1) % num_collectors
import glob
file_list = glob.glob('/etc/contrail/contrail-tor-agent*.conf')
file_list = sudo('ls /etc/contrail/contrail-tor-agent*')
if file_list.succeeded:
file_list = file_list.split()
else:
file_list = []
file_list.append('/etc/contrail/contrail-vrouter-agent.conf')
for cfile in file_list:
run('openstack-config --set %s DEFAULT collectors %s' % (cfile, collector_list))
run('openstack-config --set /etc/contrail/contrail-vrouter-nodemgr.conf COLLECTOR server_list %s' % (collector_list))
run('openstack-config --set %s DEFAULT collectors "%s"' % (cfile, collector_list))
run('openstack-config --set /etc/contrail/contrail-vrouter-nodemgr.conf COLLECTOR server_list "%s"' % (collector_list))

@task
@roles('compute')
Expand Down

0 comments on commit 9bffe94

Please sign in to comment.