Skip to content

Commit 0fc9385

Browse files
committed
Merge pull request #34 from QuentinPerez/patch-2
Wait after the boot that all services are done
2 parents cbe2090 + 93ef236 commit 0fc9385

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

driver/scaleway.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type Driver struct {
3939
name string
4040
image string
4141
stopping bool
42+
created bool
4243
// size string
4344
// userDataFile string
4445
// ipv6 bool
@@ -178,6 +179,7 @@ func (d *Driver) Create() (err error) {
178179
}
179180
log.Infof("Starting server...")
180181
err = api.StartServer(cl, d.ServerID, false)
182+
d.created = true
181183
return
182184
}
183185

@@ -205,6 +207,10 @@ func (d *Driver) GetState() (st state.State, err error) {
205207
case "starting":
206208
st = state.Starting
207209
case "running":
210+
if d.created {
211+
time.Sleep(60 * time.Second)
212+
d.created = false
213+
}
208214
st = state.Running
209215
case "stopping":
210216
st = state.Stopping

0 commit comments

Comments
 (0)