Skip to content

Commit

Permalink
Merge "Configure nova aggregate only in case of hybrid setups with so…
Browse files Browse the repository at this point in the history
…me computes using docker and some using libvirt hypervisor."
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Apr 13, 2015
2 parents 6be0ed6 + 74fae7f commit 227d5c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fabfile/tasks/provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,15 @@ def setup_nova_aggregate():

@task
def setup_nova_aggregate_node(*args):
docker = any(['docker' == get_hypervisor(compute_host)
for compute_host in env.roledefs['compute']])
libvirt = any(['libvirt' == get_hypervisor(compute_host)
for compute_host in env.roledefs['compute']])
if not (libvirt and docker):
# Not a hybrid setup(libvirt + docker)
# No need for the compute aggregate
return

for compute_host in env.roledefs['compute']:
hypervisor = get_hypervisor(compute_host)
host_name = None
Expand Down
4 changes: 4 additions & 0 deletions fabfile/tasks/tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ def get_test_features(feature=None):
with settings(hide('everything'), host_string=cfgm_host):
remote_test_dir = get_remote_path(env.test_repo_dir)
if not exists(remote_test_dir):
print "Setting up test enviroinment in the first cfgm..."
print "Will take maximum of 2 minutes"
execute(setup_test_env)
with cd('%s/tools/' % remote_test_dir):
features = sudo(cmd)
Expand All @@ -363,6 +365,8 @@ def run_sanity(feature='sanity', test=None):

if os.environ.has_key('GUESTVM_IMAGE'):
env_vars = env_vars + ' ci_image=%s' %(os.environ['GUESTVM_IMAGE'])
elif env.has_key('guestvm_image'):
env_vars = env_vars + ' ci_image=%s' % env.get('guestvm_image')

if feature in ('upgrade','upgrade_only'):
with settings(host_string = env.roledefs['cfgm'][0]):
Expand Down

0 comments on commit 227d5c7

Please sign in to comment.