Merge pull request #10465 from containerd/dependabot/go_modules/github.com/Microsoft/hcsshim-0.12.5
build(deps): bump github.com/Microsoft/hcsshim from 0.12.4 to 0.12.5
This commit is contained in:
		
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							| @@ -7,7 +7,7 @@ require ( | ||||
| 	github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 | ||||
| 	github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 | ||||
| 	github.com/Microsoft/go-winio v0.6.2 | ||||
| 	github.com/Microsoft/hcsshim v0.12.4 | ||||
| 	github.com/Microsoft/hcsshim v0.12.5 | ||||
| 	github.com/checkpoint-restore/checkpointctl v1.2.1 | ||||
| 	github.com/checkpoint-restore/go-criu/v7 v7.1.0 | ||||
| 	github.com/containerd/btrfs/v2 v2.0.0 | ||||
|   | ||||
							
								
								
									
										4
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								go.sum
									
									
									
									
									
								
							| @@ -8,8 +8,8 @@ github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0/go.mod | ||||
| github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= | ||||
| github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= | ||||
| github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= | ||||
| github.com/Microsoft/hcsshim v0.12.4 h1:Ev7YUMHAHoWNm+aDSPzc5W9s6E2jyL1szpVDJeZ/Rr4= | ||||
| github.com/Microsoft/hcsshim v0.12.4/go.mod h1:Iyl1WVpZzr+UkzjekHZbV8o5Z9ZkxNGx6CtY2Qg/JVQ= | ||||
| github.com/Microsoft/hcsshim v0.12.5 h1:bpTInLlDy/nDRWFVcefDZZ1+U8tS+rz3MxjKgu9boo0= | ||||
| github.com/Microsoft/hcsshim v0.12.5/go.mod h1:tIUGego4G1EN5Hb6KC90aDYiUI2dqLSTTOCjVNpOgZ8= | ||||
| github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= | ||||
| github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= | ||||
| github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| // Code generated by protoc-gen-go. DO NOT EDIT. | ||||
| // versions: | ||||
| // 	protoc-gen-go v1.32.0 | ||||
| // 	protoc-gen-go v1.33.0 | ||||
| // 	protoc        v4.23.2 | ||||
| // source: github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto | ||||
|  | ||||
|   | ||||
							
								
								
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| // Code generated by protoc-gen-go. DO NOT EDIT. | ||||
| // versions: | ||||
| // 	protoc-gen-go v1.32.0 | ||||
| // 	protoc-gen-go v1.33.0 | ||||
| // 	protoc        v4.23.2 | ||||
| // source: github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.proto | ||||
|  | ||||
|   | ||||
							
								
								
									
										12
									
								
								vendor/github.com/Microsoft/hcsshim/hcn/hcn.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								vendor/github.com/Microsoft/hcsshim/hcn/hcn.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -336,6 +336,18 @@ func DisableHostPortSupported() error { | ||||
| 	return platformDoesNotSupportError("DisableHostPort") | ||||
| } | ||||
|  | ||||
| // AccelnetSupported returns an error if the HCN version does not support Accelnet Feature. | ||||
| func AccelnetSupported() error { | ||||
| 	supported, err := GetCachedSupportedFeatures() | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	if supported.Accelnet { | ||||
| 		return nil | ||||
| 	} | ||||
| 	return platformDoesNotSupportError("Accelnet") | ||||
| } | ||||
|  | ||||
| // RequestType are the different operations performed to settings. | ||||
| // Used to update the settings of Endpoint/Namespace objects. | ||||
| type RequestType string | ||||
|   | ||||
							
								
								
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -89,6 +89,8 @@ var ( | ||||
| 	DisableHostPortVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 15, Minor: 1}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}} | ||||
| 	// HNS 15.4 allows for Modify Loadbalancer support | ||||
| 	ModifyLoadbalancerVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 15, Minor: 4}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}} | ||||
| 	// HNS 15.4 allows for Accelnet support | ||||
| 	AccelnetVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 15, Minor: 4}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}} | ||||
| ) | ||||
|  | ||||
| // GetGlobals returns the global properties of the HCN Service. | ||||
|   | ||||
							
								
								
									
										1
									
								
								vendor/github.com/Microsoft/hcsshim/hcn/hcnnetwork.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/github.com/Microsoft/hcsshim/hcn/hcnnetwork.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -73,6 +73,7 @@ const ( | ||||
| 	None                NetworkFlags = 0 | ||||
| 	EnableNonPersistent NetworkFlags = 8 | ||||
| 	DisableHostPort     NetworkFlags = 1024 | ||||
| 	EnableIov           NetworkFlags = 8192 | ||||
| ) | ||||
|  | ||||
| // HostComputeNetwork represents a network | ||||
|   | ||||
							
								
								
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -39,6 +39,7 @@ type SupportedFeatures struct { | ||||
| 	NestedIpSet              bool        `json:"NestedIpSet"` | ||||
| 	DisableHostPort          bool        `json:"DisableHostPort"` | ||||
| 	ModifyLoadbalancer       bool        `json:"ModifyLoadbalancer"` | ||||
| 	Accelnet                 bool        `json:"Accelnet"` | ||||
| } | ||||
|  | ||||
| // AclFeatures are the supported ACL possibilities. | ||||
| @@ -118,6 +119,7 @@ func getSupportedFeatures() (SupportedFeatures, error) { | ||||
| 	features.NestedIpSet = isFeatureSupported(globals.Version, NestedIpSetVersion) | ||||
| 	features.DisableHostPort = isFeatureSupported(globals.Version, DisableHostPortVersion) | ||||
| 	features.ModifyLoadbalancer = isFeatureSupported(globals.Version, ModifyLoadbalancerVersion) | ||||
| 	features.Accelnet = isFeatureSupported(globals.Version, AccelnetVersion) | ||||
|  | ||||
| 	log.L.WithFields(logrus.Fields{ | ||||
| 		"version":           globals.Version, | ||||
|   | ||||
							
								
								
									
										46
									
								
								vendor/github.com/Microsoft/hcsshim/hnsaccelnet.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								vendor/github.com/Microsoft/hcsshim/hnsaccelnet.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| //go:build windows | ||||
|  | ||||
| package hcsshim | ||||
|  | ||||
| import ( | ||||
| 	"errors" | ||||
|  | ||||
| 	"github.com/Microsoft/hcsshim/internal/hns" | ||||
| ) | ||||
|  | ||||
| // HNSNnvManagementMacAddress represents management mac address | ||||
| // which needs to be excluded from VF reassignment | ||||
| type HNSNnvManagementMacAddress = hns.HNSNnvManagementMacAddress | ||||
|  | ||||
| // HNSNnvManagementMacList represents a list of management | ||||
| // mac addresses for exclusion from VF reassignment | ||||
| type HNSNnvManagementMacList = hns.HNSNnvManagementMacList | ||||
|  | ||||
| var ( | ||||
| 	ErrorEmptyMacAddressList = errors.New("management mac_address list is empty") | ||||
| ) | ||||
|  | ||||
| // SetNnvManagementMacAddresses sets a list of | ||||
| // management mac addresses in hns for exclusion from VF reassignment. | ||||
| func SetNnvManagementMacAddresses(managementMacAddresses []string) (*HNSNnvManagementMacList, error) { | ||||
| 	if len(managementMacAddresses) == 0 { | ||||
| 		return nil, ErrorEmptyMacAddressList | ||||
| 	} | ||||
| 	nnvManagementMacList := &HNSNnvManagementMacList{} | ||||
| 	for _, mac := range managementMacAddresses { | ||||
| 		nnvManagementMacList.MacAddressList = append(nnvManagementMacList.MacAddressList, HNSNnvManagementMacAddress{MacAddress: mac}) | ||||
| 	} | ||||
| 	return nnvManagementMacList.Set() | ||||
| } | ||||
|  | ||||
| // GetNnvManagementMacAddresses retrieves a list of | ||||
| // management mac addresses in hns for exclusion from VF reassignment. | ||||
| func GetNnvManagementMacAddresses() (*HNSNnvManagementMacList, error) { | ||||
| 	return hns.GetNnvManagementMacAddressList() | ||||
| } | ||||
|  | ||||
| // DeleteNnvManagementMacAddresses delete list of | ||||
| // management mac addresses in hns which are excluded from VF reassignment. | ||||
| func DeleteNnvManagementMacAddresses() (*HNSNnvManagementMacList, error) { | ||||
| 	return hns.DeleteNnvManagementMacAddressList() | ||||
| } | ||||
							
								
								
									
										60
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hns/hnsaccelnet.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hns/hnsaccelnet.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| //go:build windows | ||||
|  | ||||
| package hns | ||||
|  | ||||
| import ( | ||||
| 	"encoding/json" | ||||
|  | ||||
| 	"github.com/sirupsen/logrus" | ||||
| ) | ||||
|  | ||||
| // HNSNnvManagementMacAddress represents management mac address | ||||
| // which needs to be excluded from VF reassignment | ||||
| type HNSNnvManagementMacAddress struct { | ||||
| 	MacAddress string `json:",omitempty"` | ||||
| } | ||||
|  | ||||
| // HNSNnvManagementMacList represents a list of management | ||||
| // mac addresses for exclusion from VF reassignment | ||||
| type HNSNnvManagementMacList struct { | ||||
| 	MacAddressList []HNSNnvManagementMacAddress `json:",omitempty"` | ||||
| } | ||||
|  | ||||
| // HNSNnvManagementMacRequest makes a HNS call to modify/query NnvManagementMacList | ||||
| func HNSNnvManagementMacRequest(method, path, request string) (*HNSNnvManagementMacList, error) { | ||||
| 	nnvManagementMacList := &HNSNnvManagementMacList{} | ||||
| 	err := hnsCall(method, "/accelnet/"+path, request, &nnvManagementMacList) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return nnvManagementMacList, nil | ||||
| } | ||||
|  | ||||
| // Set ManagementMacAddressList by sending "POST" NnvManagementMacRequest to HNS. | ||||
| func (nnvManagementMacList *HNSNnvManagementMacList) Set() (*HNSNnvManagementMacList, error) { | ||||
| 	operation := "Set" | ||||
| 	title := "hcsshim::nnvManagementMacList::" + operation | ||||
| 	logrus.Debugf(title+" id=%s", nnvManagementMacList.MacAddressList) | ||||
|  | ||||
| 	jsonString, err := json.Marshal(nnvManagementMacList) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return HNSNnvManagementMacRequest("POST", "", string(jsonString)) | ||||
| } | ||||
|  | ||||
| // Get ManagementMacAddressList by sending "GET" NnvManagementMacRequest to HNS. | ||||
| func GetNnvManagementMacAddressList() (*HNSNnvManagementMacList, error) { | ||||
| 	operation := "Get" | ||||
| 	title := "hcsshim::nnvManagementMacList::" + operation | ||||
| 	logrus.Debugf(title) | ||||
| 	return HNSNnvManagementMacRequest("GET", "", "") | ||||
| } | ||||
|  | ||||
| // Delete ManagementMacAddressList by sending "DELETE" NnvManagementMacRequest to HNS. | ||||
| func DeleteNnvManagementMacAddressList() (*HNSNnvManagementMacList, error) { | ||||
| 	operation := "Delete" | ||||
| 	title := "hcsshim::nnvManagementMacList::" + operation | ||||
| 	logrus.Debugf(title) | ||||
| 	return HNSNnvManagementMacRequest("DELETE", "", "") | ||||
| } | ||||
							
								
								
									
										23
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hns/hnsendpoint.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hns/hnsendpoint.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -10,6 +10,28 @@ import ( | ||||
| 	"github.com/sirupsen/logrus" | ||||
| ) | ||||
|  | ||||
| // EndpointState represents the states of an HNS Endpoint lifecycle. | ||||
| type EndpointState uint16 | ||||
|  | ||||
| // EndpointState const | ||||
| // The lifecycle of an Endpoint goes through created, attached, AttachedSharing - endpoint is being shared with other containers, | ||||
| // detached, after being attached, degraded and finally destroyed. | ||||
| // Note: This attribute is used by calico to define stale containers and is dependent on HNS v1 api, if we move to HNS v2 api we will need | ||||
| // to update the current calico code and cordinate the change with calico. Reach out to Microsoft to facilate the change via HNS. | ||||
| const ( | ||||
| 	Uninitialized   EndpointState = iota | ||||
| 	Created         EndpointState = 1 | ||||
| 	Attached        EndpointState = 2 | ||||
| 	AttachedSharing EndpointState = 3 | ||||
| 	Detached        EndpointState = 4 | ||||
| 	Degraded        EndpointState = 5 | ||||
| 	Destroyed       EndpointState = 6 | ||||
| ) | ||||
|  | ||||
| func (es EndpointState) String() string { | ||||
| 	return [...]string{"Uninitialized", "Attached", "AttachedSharing", "Detached", "Degraded", "Destroyed"}[es] | ||||
| } | ||||
|  | ||||
| // HNSEndpoint represents a network endpoint in HNS | ||||
| type HNSEndpoint struct { | ||||
| 	Id                 string            `json:"ID,omitempty"` | ||||
| @@ -34,6 +56,7 @@ type HNSEndpoint struct { | ||||
| 	Namespace          *Namespace        `json:",omitempty"` | ||||
| 	EncapOverhead      uint16            `json:",omitempty"` | ||||
| 	SharedContainers   []string          `json:",omitempty"` | ||||
| 	State              EndpointState     `json:",omitempty"` | ||||
| } | ||||
|  | ||||
| // SystemType represents the type of the system on which actions are done | ||||
|   | ||||
							
								
								
									
										2
									
								
								vendor/modules.txt
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/modules.txt
									
									
									
									
										vendored
									
									
								
							| @@ -21,7 +21,7 @@ github.com/Microsoft/go-winio/pkg/fs | ||||
| github.com/Microsoft/go-winio/pkg/guid | ||||
| github.com/Microsoft/go-winio/pkg/security | ||||
| github.com/Microsoft/go-winio/vhd | ||||
| # github.com/Microsoft/hcsshim v0.12.4 | ||||
| # github.com/Microsoft/hcsshim v0.12.5 | ||||
| ## explicit; go 1.21 | ||||
| github.com/Microsoft/hcsshim | ||||
| github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Akihiro Suda
					Akihiro Suda