Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions internal/oci/uvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ const (
annotationFullyPhysicallyBacked = "io.microsoft.virtualmachine.fullyphysicallybacked"
annotationDisableCompartmentNamespace = "io.microsoft.virtualmachine.disablecompartmentnamespace"
annotationVSMBNoDirectMap = "io.microsoft.virtualmachine.wcow.virtualSMB.nodirectmap"
// A boolean annotation to control whether to use an external bridge or the
// HCS-GCS bridge. Default value is true which means external bridge will be used
// by default.
annotationUseExternalGCSBridge = "io.microsoft.virtualmachine.useexternalgcsbridge"

// annotation used to specify the cpugroup ID that a UVM should be assigned to
annotationCPUGroupID = "io.microsoft.virtualmachine.cpugroup.id"
Expand Down Expand Up @@ -464,7 +460,6 @@ func SpecToUVMCreateOpts(ctx context.Context, s *specs.Spec, id, owner string) (
lopts.StorageQoSIopsMaximum = ParseAnnotationsStorageIops(ctx, s, annotationStorageQoSIopsMaximum, lopts.StorageQoSIopsMaximum)
lopts.VPCIEnabled = parseAnnotationsBool(ctx, s.Annotations, annotationVPCIEnabled, lopts.VPCIEnabled)
lopts.BootFilesPath = parseAnnotationsString(s.Annotations, annotationBootFilesRootPath, lopts.BootFilesPath)
lopts.ExternalGuestConnection = parseAnnotationsBool(ctx, s.Annotations, annotationUseExternalGCSBridge, lopts.ExternalGuestConnection)
lopts.CPUGroupID = parseAnnotationsString(s.Annotations, annotationCPUGroupID, lopts.CPUGroupID)
lopts.NetworkConfigProxy = parseAnnotationsString(s.Annotations, annotationNetworkConfigProxy, lopts.NetworkConfigProxy)
handleAnnotationPreferredRootFSType(ctx, s.Annotations, lopts)
Expand All @@ -487,7 +482,6 @@ func SpecToUVMCreateOpts(ctx context.Context, s *specs.Spec, id, owner string) (
wopts.ProcessorWeight = ParseAnnotationsCPUWeight(ctx, s, annotationProcessorWeight, wopts.ProcessorWeight)
wopts.StorageQoSBandwidthMaximum = ParseAnnotationsStorageBps(ctx, s, annotationStorageQoSBandwidthMaximum, wopts.StorageQoSBandwidthMaximum)
wopts.StorageQoSIopsMaximum = ParseAnnotationsStorageIops(ctx, s, annotationStorageQoSIopsMaximum, wopts.StorageQoSIopsMaximum)
wopts.ExternalGuestConnection = parseAnnotationsBool(ctx, s.Annotations, annotationUseExternalGCSBridge, wopts.ExternalGuestConnection)
wopts.DisableCompartmentNamespace = parseAnnotationsBool(ctx, s.Annotations, annotationDisableCompartmentNamespace, wopts.DisableCompartmentNamespace)
wopts.CPUGroupID = parseAnnotationsString(s.Annotations, annotationCPUGroupID, wopts.CPUGroupID)
wopts.NetworkConfigProxy = parseAnnotationsString(s.Annotations, annotationNetworkConfigProxy, wopts.NetworkConfigProxy)
Expand Down
8 changes: 0 additions & 8 deletions internal/tools/uvmboot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const (
countArgName = "count"
debugArgName = "debug"
gcsArgName = "gcs"
externalBridgeArgName = "external-bridge"

execCommandLineArgName = "exec"
)
Expand Down Expand Up @@ -70,10 +69,6 @@ func main() {
Name: gcsArgName,
Usage: "Launch the GCS and perform requested operations via its RPC interface",
},
cli.BoolFlag{
Name: externalBridgeArgName,
Usage: "Use the external implementation of the guest connection",
},
}

app.Commands = []cli.Command{
Expand Down Expand Up @@ -109,9 +104,6 @@ func setGlobalOptions(c *cli.Context, options *uvm.Options) {
if c.GlobalIsSet(enableDeferredCommitArgName) {
options.EnableDeferredCommit = c.GlobalBool(enableDeferredCommitArgName)
}
if c.GlobalIsSet(externalBridgeArgName) {
options.ExternalGuestConnection = c.GlobalBool(externalBridgeArgName)
}
}

func runMany(c *cli.Context, runFunc func(id string) error) {
Expand Down
22 changes: 7 additions & 15 deletions internal/uvm/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ type Options struct {
// will default to the platform default.
StorageQoSBandwidthMaximum int32

// ExternalGuestConnection sets whether the guest RPC connection is performed
// internally by the OS platform or externally by this package.
ExternalGuestConnection bool

// DisableCompartmentNamespace sets whether to disable namespacing the network compartment in the UVM
// for WCOW. Namespacing makes it so the compartment created for a container is essentially no longer
// aware or able to see any of the other compartments on the host (in this case the UVM).
Expand Down Expand Up @@ -161,9 +157,6 @@ func verifyOptions(ctx context.Context, options interface{}) error {
if opts.IsClone && opts.TemplateConfig == nil {
return errors.New("template config can not be nil when creating clone")
}
if opts.IsClone && !opts.ExternalGuestConnection {
return errors.New("External gcs connection can not be disabled for clones")
}
if opts.IsTemplate && opts.FullyPhysicallyBacked {
return errors.New("Template can not be created from a full physically backed UVM")
}
Expand All @@ -178,14 +171,13 @@ func verifyOptions(ctx context.Context, options interface{}) error {
// If `owner` is empty it will be set to the calling executables name.
func newDefaultOptions(id, owner string) *Options {
opts := &Options{
ID: id,
Owner: owner,
MemorySizeInMB: 1024,
AllowOvercommit: true,
EnableDeferredCommit: false,
ProcessorCount: defaultProcessorCount(),
ExternalGuestConnection: true,
FullyPhysicallyBacked: false,
ID: id,
Owner: owner,
MemorySizeInMB: 1024,
AllowOvercommit: true,
EnableDeferredCommit: false,
ProcessorCount: defaultProcessorCount(),
FullyPhysicallyBacked: false,
}

if opts.Owner == "" {
Expand Down
9 changes: 1 addition & 8 deletions internal/uvm/create_lcow.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,6 @@ func CreateLCOW(ctx context.Context, opts *OptionsLCOW) (_ *UtilityVM, err error
}
}

if opts.UseGuestConnection && !opts.ExternalGuestConnection {
doc.VirtualMachine.GuestConnection = &hcsschema.GuestConnection{
UseVsock: true,
UseConnectedSuspend: true,
}
}

if uvm.scsiControllerCount > 0 {
// TODO: JTERRY75 - this should enumerate scsicount and add an entry per value.
doc.VirtualMachine.Devices.Scsi = map[string]hcsschema.Scsi{
Expand Down Expand Up @@ -406,7 +399,7 @@ func CreateLCOW(ctx context.Context, opts *OptionsLCOW) (_ *UtilityVM, err error
}
}

if opts.UseGuestConnection && opts.ExternalGuestConnection {
if opts.UseGuestConnection {
log.G(ctx).WithField("vmID", uvm.runtimeID).Debug("Using external GCS bridge")
l, err := uvm.listenVsock(gcs.LinuxGcsVsockPort)
if err != nil {
Expand Down
11 changes: 2 additions & 9 deletions internal/uvm/create_wcow.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,6 @@ func prepareConfigDoc(ctx context.Context, uvm *UtilityVM, opts *OptionsWCOW, uv
},
}

if !opts.ExternalGuestConnection {
doc.VirtualMachine.GuestConnection = &hcsschema.GuestConnection{}
}

// Handle StorageQoS if set
if opts.StorageQoSBandwidthMaximum > 0 || opts.StorageQoSIopsMaximum > 0 {
doc.VirtualMachine.StorageQoS = &hcsschema.StorageQoS{
Expand Down Expand Up @@ -332,11 +328,8 @@ func CreateWCOW(ctx context.Context, opts *OptionsWCOW) (_ *UtilityVM, err error
return nil, fmt.Errorf("error while creating the compute system: %s", err)
}

// All clones MUST use external gcs connection
if opts.ExternalGuestConnection {
if err = uvm.startExternalGcsListener(ctx); err != nil {
return nil, err
}
if err = uvm.startExternalGcsListener(ctx); err != nil {
return nil, err
}

// If network config proxy address passed in, construct a client.
Expand Down
15 changes: 0 additions & 15 deletions test/cri-containerd/runpodsandbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,6 @@ func Test_RunPodSandbox_WCOW_Hypervisor(t *testing.T) {
runPodSandboxTest(t, request)
}

func Test_RunPodSandbox_WCOW_Hypervisor_WithoutExternalBridge(t *testing.T) {
requireFeatures(t, featureWCOWHypervisor)

pullRequiredImages(t, []string{imageWindowsNanoserver})

request := getRunPodSandboxRequest(
t,
wcowHypervisorRuntimeHandler,
map[string]string{
"io.microsoft.virtualmachine.useexternalgcsbridge": "false",
},
)
runPodSandboxTest(t, request)
}

func Test_RunPodSandbox_LCOW(t *testing.T) {
requireFeatures(t, featureLCOW)

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions test/vendor/github.com/Microsoft/hcsshim/internal/oci/uvm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 7 additions & 15 deletions test/vendor/github.com/Microsoft/hcsshim/internal/uvm/create.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.