Merge pull request #5566 from stack72/triton-wait-for-image-creation
builder/triton: Wait for ImageCreation State
This commit is contained in:
commit
61f8cbbd1b
|
@ -4,9 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
|
||||||
|
|
||||||
"sort"
|
"sort"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/hashicorp/packer/packer"
|
"github.com/hashicorp/packer/packer"
|
||||||
"github.com/joyent/triton-go/client"
|
"github.com/joyent/triton-go/client"
|
||||||
|
@ -200,7 +199,7 @@ func (d *driverTriton) WaitForImageCreation(imageId string, timeout time.Duratio
|
||||||
if image == nil {
|
if image == nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
return image.OS != "", err
|
return image.State == "active", err
|
||||||
},
|
},
|
||||||
3*time.Second,
|
3*time.Second,
|
||||||
timeout,
|
timeout,
|
||||||
|
|
Loading…
Reference in New Issue