Skip to content

Commit

Permalink
SM-Mitaka/Liberty: restart nova-compute only if compute is there
Browse files Browse the repository at this point in the history
Partial-Bug: #1610726

Currently nova-compute is being restart for all roles even if compute is not
there. This causes non-computes nodes to be registered as compute nodes.

This possibly causes failures to the launch of more and more VMs.

currently sanity run is report many VMs to be ACTIVE.

TESTING:
Ran sanity (still running), 60 test cases passed, 44 reported failed for
multi-node setup (HA)

Mutli-Interface Setup: 25 passed, 8 failed.

Change-Id: I187e1e873dfdeb5ae7e17490d74faf9d3eb8dd20
  • Loading branch information
Dheeraj Gautam committed Aug 9, 2016
1 parent e693271 commit 8d36b9e
Showing 1 changed file with 19 additions and 5 deletions.
Expand Up @@ -7,6 +7,7 @@
$contrail_logoutput = false,
$keystone_ip = $::contrail::params::keystone_ip,
$keystone_ip_to_use = $::contrail::params::keystone_ip_to_use,
$host_roles = $::contrail::params::host_roles,
) {
if ($host_control_ip in $openstack_ip_list) {
#Make ha-mon start later
Expand Down Expand Up @@ -64,15 +65,28 @@

if ($::operatingsystem == 'Centos' or $::operatingsystem == 'Fedora') {
$openstack_restart_command = "service openstack-nova-api restart && service openstack-nova-conductor restart && service openstack-nova-scheduler restart"
$nova_restart_cmd = "service nova-compute restart"
} else {
$openstack_restart_command = "service supervisor-openstack restart ; service nova-compute restart"
$openstack_restart_command = "service supervisor-openstack restart"
$nova_restart_cmd = "service nova-compute restart"
}

exec { 'supervisor-openstack-restart':
command => $openstack_restart_command,
provider => shell,
logoutput => $contrail_logoutput,
if 'openstack' in $host_roles {
exec { 'supervisor-openstack-restart':
command => $openstack_restart_command,
provider => shell,
logoutput => $contrail_logoutput,
}
}

if 'compute' in $host_roles {
exec { 'nova-compute-restart':
command => $nova_restart_cmd,
provider => shell,
logoutput => $contrail_logoutput,
}
}

}
}
#end of post-openstack

0 comments on commit 8d36b9e

Please sign in to comment.