Merge pull request #5566 from stack72/triton-wait-for-image-creation

builder/triton: Wait for ImageCreation State
pull/4523/merge
James Nugent 9 years ago committed by GitHub
commit 61f8cbbd1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,9 +4,8 @@ import (
"context"
"errors"
"net/http"
"time"
"sort"
"time"
"github.com/hashicorp/packer/packer"
"github.com/joyent/triton-go/client"
@ -200,7 +199,7 @@ func (d *driverTriton) WaitForImageCreation(imageId string, timeout time.Duratio
if image == nil {
return false, err
}
return image.OS != "", err
return image.State == "active", err
},
3*time.Second,
timeout,

Loading…
Cancel
Save