Skip to content

Commit

Permalink
Merge "Initialize hostnames list before appending it in get_all_hostn…
Browse files Browse the repository at this point in the history
…ames function. Expose the config_nova flag to setup_without_openstack task add_reserved_ports task should check for the declatation of openstack node and execute, if not declared, the task will execute in the host poulated in env.host_string" into R3.0
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Apr 8, 2016
2 parents 50b129f + dbe38cc commit 0f48284
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fabfile/tasks/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ def pre_check():
exit(1)
else:
print "\nINFO: \n\tOpenstack and cfgm nodes are same, No need for contrail_internal_vip to be specified in testbed.py."
execute('add_openstack_reserverd_ports')
execute('add_openstack_reserved_ports')

def role_to_ip_dict(role=None):
role_to_ip_dict = {}
Expand Down
7 changes: 4 additions & 3 deletions fabfile/tasks/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,10 @@ def add_reserved_ports_node(ports, *args):
@task
@EXECUTE_TASK
@roles('openstack')
def add_openstack_reserverd_ports():
ports = '35357,35358,33306'
execute('add_reserved_ports_node', ports, env.host_string)
def add_openstack_reserved_ports():
if env.roledefs['openstack']:
ports = '35357,35358,33306'
execute('add_reserved_ports_node', ports, env.host_string)


@task
Expand Down
7 changes: 4 additions & 3 deletions fabfile/tasks/provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ def setup_contrail_horizon():
def setup_openstack_node(*args):
"""Provisions openstack services in one or list of nodes. USAGE: fab setup_openstack_node:user@1.1.1.1,user@2.2.2.2"""
#qpidd_changes_for_ubuntu()
execute('add_openstack_reserverd_ports')
execute('add_openstack_reserved_ports')
for host_string in args:
# Frame the command line to provision openstack
cmd = frame_vnc_openstack_cmd(host_string)
Expand Down Expand Up @@ -2478,10 +2478,11 @@ def setup_all(reboot='True'):

@roles('build')
@task
def setup_without_openstack(manage_nova_compute='yes', reboot='True'):
def setup_without_openstack(manage_nova_compute='yes', config_nova='yes', reboot='True'):
"""Provisions required contrail packages in all nodes as per the role definition except the openstack.
User has to provision the openstack node with their custom openstack pakckages.
If manage_nova_compute = no; Only vrouter services is provisioned, nova-compute will be skipped in the compute node.
If config_nova = no; No nova config related configuration will executed on nova.conf file.
"""
execute('setup_common')
execute('setup_ha')
Expand All @@ -2497,7 +2498,7 @@ def setup_without_openstack(manage_nova_compute='yes', reboot='True'):
execute('verify_collector')
execute('setup_webui')
execute('verify_webui')
execute('setup_vrouter', manage_nova_compute)
execute('setup_vrouter', manage_nova_compute, config_nova)
execute('prov_config')
execute('prov_database')
execute('prov_analytics')
Expand Down
1 change: 1 addition & 0 deletions fabfile/utils/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def get_all_hostnames():
# Maintaining backward compatability with old testbed.py
hostnames = env.hostnames['all']
else:
hostnames = []
for host in env.roledefs['all']:
# Return hostnames in the same order in which the 'all'
# role is defined.
Expand Down

0 comments on commit 0f48284

Please sign in to comment.