1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #27803 from darrenstahlmsft/RevendorHcsshim

Update hcsshim to v0.5.2
This commit is contained in:
John Howard 2016-10-26 18:03:10 -07:00 committed by GitHub
commit 36d3ffe059
4 changed files with 20 additions and 3 deletions

View file

@ -48,7 +48,7 @@ esac
# the following lines are in sorted order, FYI
clone git github.com/Azure/go-ansiterm 388960b655244e76e24c75f48631564eaefade62
clone git github.com/Microsoft/hcsshim v0.5.1
clone git github.com/Microsoft/hcsshim v0.5.2
clone git github.com/Microsoft/go-winio v0.3.5
clone git github.com/Sirupsen/logrus f76d643702a30fbffecdfe50831e11881c96ceb3 https://github.com/aaronlehmann/logrus
clone git github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a

View file

@ -1,4 +1,4 @@
// Shim for the Host Compute Service (HSC) to manage Windows Server
// Shim for the Host Compute Service (HCS) to manage Windows Server
// containers and Hyper-V containers.
package hcsshim

View file

@ -30,6 +30,11 @@ type VsidPolicy struct {
VSID uint
}
type PaPolicy struct {
Type string
PA string
}
// Subnet is assoicated with a network and represents a list
// of subnets available to the network
type Subnet struct {
@ -58,6 +63,7 @@ type HNSNetwork struct {
DNSSuffix string `json:",omitempty"`
DNSServerList string `json:",omitempty"`
DNSServerCompartment uint32 `json:",omitempty"`
ManagementIP string `json:",omitempty"`
}
// HNSEndpoint represents a network endpoint in HNS
@ -74,6 +80,7 @@ type HNSEndpoint struct {
GatewayAddress string `json:",omitempty"`
EnableInternalDNS bool `json:",omitempty"`
PrefixLength uint8 `json:",omitempty"`
IsRemoteEndpoint bool `json:",omitempty"`
}
type hnsNetworkResponse struct {

View file

@ -1,6 +1,12 @@
package hcsshim
import "github.com/Sirupsen/logrus"
import (
"sync"
"github.com/Sirupsen/logrus"
)
var prepareLayerLock sync.Mutex
// PrepareLayer finds a mounted read-write layer matching layerId and enables the
// the filesystem filter for use on that layer. This requires the paths to all
@ -24,6 +30,10 @@ func PrepareLayer(info DriverInfo, layerId string, parentLayerPaths []string) er
return err
}
// This lock is a temporary workaround for a Windows bug. Only allowing one
// call to prepareLayer at a time vastly reduces the chance of a timeout.
prepareLayerLock.Lock()
defer prepareLayerLock.Unlock()
err = prepareLayer(&infop, layerId, layers)
if err != nil {
err = makeErrorf(err, title, "layerId=%s flavour=%d", layerId, info.Flavour)