Update github.com/Microsoft/hcsshim to v0.8.15
Fixes #4915 Release info: https://github.com/microsoft/hcsshim/releases/tag/v0.8.15 Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
This commit is contained in:
1
vendor/github.com/Microsoft/hcsshim/internal/hcs/callback.go
generated
vendored
1
vendor/github.com/Microsoft/hcsshim/internal/hcs/callback.go
generated
vendored
@@ -106,6 +106,7 @@ func newSystemChannels() notificationChannels {
|
||||
hcsNotificationSystemStartCompleted,
|
||||
hcsNotificationSystemPauseCompleted,
|
||||
hcsNotificationSystemResumeCompleted,
|
||||
hcsNotificationSystemSaveCompleted,
|
||||
} {
|
||||
channels[notif] = make(notificationChannel, 1)
|
||||
}
|
||||
|
||||
7
vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go
generated
vendored
7
vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go
generated
vendored
@@ -312,6 +312,13 @@ func IsOperationInvalidState(err error) bool {
|
||||
return err == ErrVmcomputeOperationInvalidState
|
||||
}
|
||||
|
||||
// IsAccessIsDenied returns true when err is caused by
|
||||
// `ErrVmcomputeOperationAccessIsDenied`.
|
||||
func IsAccessIsDenied(err error) bool {
|
||||
err = getInnerError(err)
|
||||
return err == ErrVmcomputeOperationAccessIsDenied
|
||||
}
|
||||
|
||||
func getInnerError(err error) error {
|
||||
switch pe := err.(type) {
|
||||
case nil:
|
||||
|
||||
32
vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
generated
vendored
32
vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
generated
vendored
@@ -407,6 +407,38 @@ func (computeSystem *System) Resume(ctx context.Context) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Save the compute system
|
||||
func (computeSystem *System) Save(ctx context.Context, options interface{}) (err error) {
|
||||
operation := "hcsshim::System::Save"
|
||||
|
||||
// hcsSaveComputeSystemContext is an async peration. Start the outer span
|
||||
// here to measure the full save time.
|
||||
ctx, span := trace.StartSpan(ctx, operation)
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(trace.StringAttribute("cid", computeSystem.id))
|
||||
|
||||
saveOptions, err := json.Marshal(options)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
computeSystem.handleLock.RLock()
|
||||
defer computeSystem.handleLock.RUnlock()
|
||||
|
||||
if computeSystem.handle == 0 {
|
||||
return makeSystemError(computeSystem, operation, "", ErrAlreadyClosed, nil)
|
||||
}
|
||||
|
||||
result, err := vmcompute.HcsSaveComputeSystem(ctx, computeSystem.handle, string(saveOptions))
|
||||
events, err := processAsyncHcsResult(ctx, err, result, computeSystem.callbackNumber, hcsNotificationSystemSaveCompleted, &timeout.SystemSave)
|
||||
if err != nil {
|
||||
return makeSystemError(computeSystem, operation, "", err, events)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (computeSystem *System) createProcess(ctx context.Context, operation string, c interface{}) (*Process, *vmcompute.HcsProcessInformation, error) {
|
||||
computeSystem.handleLock.RLock()
|
||||
defer computeSystem.handleLock.RUnlock()
|
||||
|
||||
Reference in New Issue
Block a user