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

Commit

Permalink
kata_agent: use virtio-fs 0.3+ mount options
Browse files Browse the repository at this point in the history
virtio-fs changed the mount command-line.  Previously "mount none -o
tag=kataShared ..." was used.  Now "mount kataShared ..." is used
instead.

Since the "kataShared" tag is used for both 9P and virtio-fs, rename the
variable so that it is not 9P-specific.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Fixes: #1993
  • Loading branch information
stefanhaRH committed Oct 7, 2019
1 parent 93197dd commit 6ce6a26
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions virtcontainers/kata_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var (
errorMissingOCISpec = errors.New("Missing OCI specification")
defaultKataHostSharedDir = "/run/kata-containers/shared/sandboxes/"
defaultKataGuestSharedDir = "/run/kata-containers/shared/containers/"
mountGuest9pTag = "kataShared"
mountGuestTag = "kataShared"
defaultKataGuestSandboxDir = "/run/kata-containers/sandbox/"
type9pFs = "9p"
typeVirtioFS = "virtio_fs"
Expand All @@ -72,7 +72,7 @@ var (
kataNvdimmDevType = "nvdimm"
kataVirtioFSDevType = "virtio-fs"
sharedDir9pOptions = []string{"trans=virtio,version=9p2000.L,cache=mmap", "nodev"}
sharedDirVirtioFSOptions = []string{"default_permissions,allow_other,rootmode=040000,user_id=0,group_id=0,dax,tag=" + mountGuest9pTag, "nodev"}
sharedDirVirtioFSOptions = []string{"default_permissions,allow_other,rootmode=040000,user_id=0,group_id=0", "nodev"}
sharedDirVirtioFSDaxOptions = "dax"
shmDir = "shm"
kataEphemeralDevType = "ephemeral"
Expand Down Expand Up @@ -401,7 +401,7 @@ func (k *kataAgent) configure(h hypervisor, id, sharePath string, builtin bool,
// Create shared directory and add the shared volume if filesystem sharing is supported.
// This volume contains all bind mounted container bundles.
sharedVolume := types.Volume{
MountTag: mountGuest9pTag,
MountTag: mountGuestTag,
HostPath: sharePath,
}

Expand Down Expand Up @@ -872,7 +872,7 @@ func setupStorages(sandbox *Sandbox) []*grpc.Storage {
}
sharedVolume := &grpc.Storage{
Driver: kataVirtioFSDevType,
Source: "none",
Source: mountGuestTag,
MountPoint: kataGuestSharedDir(),
Fstype: typeVirtioFS,
Options: sharedDirVirtioFSOptions,
Expand All @@ -884,7 +884,7 @@ func setupStorages(sandbox *Sandbox) []*grpc.Storage {

sharedVolume := &grpc.Storage{
Driver: kata9pDevType,
Source: mountGuest9pTag,
Source: mountGuestTag,
MountPoint: kataGuestSharedDir(),
Fstype: type9pFs,
Options: sharedDir9pOptions,
Expand Down

0 comments on commit 6ce6a26

Please sign in to comment.