Update github.com/Microsoft/hcsshim to v0.8.10
Brings in a variety of changes, mostly to the containerd shim. There is also a change to the Windows layer unpack code which fixes #4301. Release link: https://github.com/microsoft/hcsshim/releases/tag/v0.8.10 Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
This commit is contained in:
		
							
								
								
									
										49
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/service.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/service.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
			
		||||
package hcs
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
 | 
			
		||||
	hcsschema "github.com/Microsoft/hcsshim/internal/schema2"
 | 
			
		||||
	"github.com/Microsoft/hcsshim/internal/vmcompute"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// GetServiceProperties returns properties of the host compute service.
 | 
			
		||||
func GetServiceProperties(ctx context.Context, q hcsschema.PropertyQuery) (*hcsschema.ServiceProperties, error) {
 | 
			
		||||
	operation := "hcsshim::GetServiceProperties"
 | 
			
		||||
 | 
			
		||||
	queryb, err := json.Marshal(q)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	propertiesJSON, resultJSON, err := vmcompute.HcsGetServiceProperties(ctx, string(queryb))
 | 
			
		||||
	events := processHcsResult(ctx, resultJSON)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, &HcsError{Op: operation, Err: err, Events: events}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if propertiesJSON == "" {
 | 
			
		||||
		return nil, ErrUnexpectedValue
 | 
			
		||||
	}
 | 
			
		||||
	properties := &hcsschema.ServiceProperties{}
 | 
			
		||||
	if err := json.Unmarshal([]byte(propertiesJSON), properties); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	return properties, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ModifyServiceSettings modifies settings of the host compute service.
 | 
			
		||||
func ModifyServiceSettings(ctx context.Context, settings hcsschema.ModificationRequest) error {
 | 
			
		||||
	operation := "hcsshim::ModifyServiceSettings"
 | 
			
		||||
 | 
			
		||||
	settingsJSON, err := json.Marshal(settings)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	resultJSON, err := vmcompute.HcsModifyServiceSettings(ctx, string(settingsJSON))
 | 
			
		||||
	events := processHcsResult(ctx, resultJSON)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return &HcsError{Op: operation, Err: err, Events: events}
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										3
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -28,8 +28,7 @@ type System struct {
 | 
			
		||||
	waitBlock      chan struct{}
 | 
			
		||||
	waitError      error
 | 
			
		||||
	exitError      error
 | 
			
		||||
 | 
			
		||||
	os, typ string
 | 
			
		||||
	os, typ        string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func newSystem(id string) *System {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user