Merge "Add waiting for Neutron-API are ready for answer."

This commit is contained in:
Jenkins 2014-10-20 12:48:16 +00:00 committed by Gerrit Code Review
commit cd6c3c8ed5

View File

@ -174,6 +174,26 @@ class neutron::server (
provider => $::neutron::params::service_provider,
}
# In Juno Neutron API ready for answer not yet when server starts.
exec {'waiting-for-neutron-api':
tries => 30,
try_sleep => 4,
onlyif => "test -r /root/openrc",
command => "bash -c \"source /root/openrc ; neutron net-list\" 2>&1 > /dev/null",
path => '/usr/sbin:/usr/bin:/sbin:/bin',
require => File['/root/openrc']
}
Service['neutron-server'] -> Exec['waiting-for-neutron-api']
Exec['waiting-for-neutron-api'] -> Anchor['neutron-api-up']
Exec['waiting-for-neutron-api'] -> Service<| title == 'neutron-dhcp-service' |>
Exec['waiting-for-neutron-api'] -> Service<| title == 'neutron-l3' |>
Exec['waiting-for-neutron-api'] -> Service<| title == 'neutron-metadata-agent' |> # it's not a mistake, for pacemakered
Exec['waiting-for-neutron-api'] -> Service<| title == 'p_neutron-metadata-agent' |> # and not services -- names are different
Exec['waiting-for-neutron-api'] -> Service<| title == 'neutron-ovs-agent-service' |>
Exec['waiting-for-neutron-api'] -> Neutron_net<||>
Exec['waiting-for-neutron-api'] -> Neutron_subnet<||>
Exec['waiting-for-neutron-api'] -> Neutron_router<||>
anchor {'neutron-api-up':}
Anchor['neutron-server'] ->