Wait for midolman to start

Midolman takes some time to start and thus
to make the properties file with the host
id available. Let him 15 spare seconds to
start

Change-Id: I1e10c2c7dd42b874f99df677207080b1012302fe
This commit is contained in:
Alex Ruiz Estradera 2016-08-29 16:29:22 +02:00
parent 65364a2ae3
commit 2437031f21

View File

@ -135,6 +135,7 @@ Puppet::Type.type(:midonet_host_registry).provide(:midonet_api_caller) do
def call_get_host()
begin
sleep 15
return File.read('/etc/midonet_host_id.properties').split('=')[1].sub("\n","")
rescue
raise 'Midonet agent is not running on the host you are trying to register'