Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2323 from amshinde/my-stable-1.9
Browse files Browse the repository at this point in the history
rootless: Disable vhost-net for rootless(backport)
  • Loading branch information
amshinde authored Dec 10, 2019
2 parents 6a5cb35 + 3d5e0db commit 0126901
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion virtcontainers/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/vishvananda/netns"
"golang.org/x/sys/unix"

"github.com/kata-containers/runtime/pkg/rootless"
vcTypes "github.com/kata-containers/runtime/virtcontainers/pkg/types"
"github.com/kata-containers/runtime/virtcontainers/pkg/uuid"
"github.com/kata-containers/runtime/virtcontainers/utils"
Expand Down Expand Up @@ -440,7 +441,12 @@ func xConnectVMNetwork(endpoint Endpoint, h hypervisor) error {
queues = int(h.hypervisorConfig().NumVCPUs)
}

disableVhostNet := h.hypervisorConfig().DisableVhostNet
var disableVhostNet bool
if rootless.IsRootless() {
disableVhostNet = true
} else {
disableVhostNet = h.hypervisorConfig().DisableVhostNet
}

if netPair.NetInterworkingModel == NetXConnectDefaultModel {
netPair.NetInterworkingModel = DefaultNetInterworkingModel
Expand Down

0 comments on commit 0126901

Please sign in to comment.