mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 09:13:29 +00:00
katatestutils: Use the configured virtiofs daemon path
The current path is hardcoded as follows: virtio_fs_daemon = "/path/to/virtiofsd" Switch to using the value of config.VirtioFSDaemon instead. Fixes: #2686 Signed-off-by: Christophe de Dinechin <dinechin@redhat.com> Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
parent
342bf3e949
commit
042426d73a
@ -96,6 +96,7 @@ func makeRuntimeConfig(prefixDir string) (configFile string, config oci.RuntimeC
|
|||||||
pcieRootPort := uint32(2)
|
pcieRootPort := uint32(2)
|
||||||
disableNewNetNs := false
|
disableNewNetNs := false
|
||||||
sharedFS := "virtio-9p"
|
sharedFS := "virtio-9p"
|
||||||
|
virtioFSdaemon := filepath.Join(prefixDir, "virtiofsd")
|
||||||
|
|
||||||
filesToCreate := []string{
|
filesToCreate := []string{
|
||||||
hypervisorPath,
|
hypervisorPath,
|
||||||
@ -168,6 +169,7 @@ func makeRuntimeConfig(prefixDir string) (configFile string, config oci.RuntimeC
|
|||||||
AgentDebug: agentDebug,
|
AgentDebug: agentDebug,
|
||||||
AgentTrace: agentTrace,
|
AgentTrace: agentTrace,
|
||||||
SharedFS: sharedFS,
|
SharedFS: sharedFS,
|
||||||
|
VirtioFSDaemon: virtioFSdaemon,
|
||||||
}
|
}
|
||||||
|
|
||||||
runtimeConfig := katatestutils.MakeRuntimeConfigFileData(configFileOptions)
|
runtimeConfig := katatestutils.MakeRuntimeConfigFileData(configFileOptions)
|
||||||
|
@ -401,6 +401,7 @@ func createAllRuntimeConfigFiles(dir, hypervisor string) (config string, err err
|
|||||||
pcieRootPort := uint32(2)
|
pcieRootPort := uint32(2)
|
||||||
disableNewNetNs := false
|
disableNewNetNs := false
|
||||||
sharedFS := "virtio-9p"
|
sharedFS := "virtio-9p"
|
||||||
|
virtioFSdaemon := path.Join(dir, "virtiofsd")
|
||||||
|
|
||||||
configFileOptions := ktu.RuntimeConfigOptions{
|
configFileOptions := ktu.RuntimeConfigOptions{
|
||||||
Hypervisor: "qemu",
|
Hypervisor: "qemu",
|
||||||
@ -420,6 +421,7 @@ func createAllRuntimeConfigFiles(dir, hypervisor string) (config string, err err
|
|||||||
PCIeRootPort: pcieRootPort,
|
PCIeRootPort: pcieRootPort,
|
||||||
DisableNewNetNs: disableNewNetNs,
|
DisableNewNetNs: disableNewNetNs,
|
||||||
SharedFS: sharedFS,
|
SharedFS: sharedFS,
|
||||||
|
VirtioFSDaemon: virtioFSdaemon,
|
||||||
}
|
}
|
||||||
|
|
||||||
runtimeConfigFileData := ktu.MakeRuntimeConfigFileData(configFileOptions)
|
runtimeConfigFileData := ktu.MakeRuntimeConfigFileData(configFileOptions)
|
||||||
|
@ -28,6 +28,7 @@ type RuntimeConfigOptions struct {
|
|||||||
AgentTraceMode string
|
AgentTraceMode string
|
||||||
AgentTraceType string
|
AgentTraceType string
|
||||||
SharedFS string
|
SharedFS string
|
||||||
|
VirtioFSDaemon string
|
||||||
PCIeRootPort uint32
|
PCIeRootPort uint32
|
||||||
DisableBlock bool
|
DisableBlock bool
|
||||||
EnableIOThreads bool
|
EnableIOThreads bool
|
||||||
@ -65,7 +66,7 @@ func MakeRuntimeConfigFileData(config RuntimeConfigOptions) string {
|
|||||||
enable_debug = ` + strconv.FormatBool(config.HypervisorDebug) + `
|
enable_debug = ` + strconv.FormatBool(config.HypervisorDebug) + `
|
||||||
guest_hook_path = "` + config.DefaultGuestHookPath + `"
|
guest_hook_path = "` + config.DefaultGuestHookPath + `"
|
||||||
shared_fs = "` + config.SharedFS + `"
|
shared_fs = "` + config.SharedFS + `"
|
||||||
virtio_fs_daemon = "/path/to/virtiofsd"
|
virtio_fs_daemon = "` + config.VirtioFSDaemon + `"
|
||||||
|
|
||||||
[proxy.kata]
|
[proxy.kata]
|
||||||
enable_debug = ` + strconv.FormatBool(config.ProxyDebug) + `
|
enable_debug = ` + strconv.FormatBool(config.ProxyDebug) + `
|
||||||
|
@ -85,6 +85,7 @@ func createAllRuntimeConfigFiles(dir, hypervisor string) (config testRuntimeConf
|
|||||||
pcieRootPort := uint32(2)
|
pcieRootPort := uint32(2)
|
||||||
disableNewNetNs := false
|
disableNewNetNs := false
|
||||||
sharedFS := "virtio-9p"
|
sharedFS := "virtio-9p"
|
||||||
|
virtioFSdaemon := path.Join(dir, "virtiofsd")
|
||||||
|
|
||||||
configFileOptions := ktu.RuntimeConfigOptions{
|
configFileOptions := ktu.RuntimeConfigOptions{
|
||||||
Hypervisor: "qemu",
|
Hypervisor: "qemu",
|
||||||
@ -117,6 +118,7 @@ func createAllRuntimeConfigFiles(dir, hypervisor string) (config testRuntimeConf
|
|||||||
AgentDebug: agentDebug,
|
AgentDebug: agentDebug,
|
||||||
AgentTrace: agentTrace,
|
AgentTrace: agentTrace,
|
||||||
SharedFS: sharedFS,
|
SharedFS: sharedFS,
|
||||||
|
VirtioFSDaemon: virtioFSdaemon,
|
||||||
}
|
}
|
||||||
|
|
||||||
runtimeConfigFileData := ktu.MakeRuntimeConfigFileData(configFileOptions)
|
runtimeConfigFileData := ktu.MakeRuntimeConfigFileData(configFileOptions)
|
||||||
@ -167,7 +169,7 @@ func createAllRuntimeConfigFiles(dir, hypervisor string) (config testRuntimeConf
|
|||||||
GuestHookPath: defaultGuestHookPath,
|
GuestHookPath: defaultGuestHookPath,
|
||||||
VhostUserStorePath: defaultVhostUserStorePath,
|
VhostUserStorePath: defaultVhostUserStorePath,
|
||||||
SharedFS: sharedFS,
|
SharedFS: sharedFS,
|
||||||
VirtioFSDaemon: "/path/to/virtiofsd",
|
VirtioFSDaemon: virtioFSdaemon,
|
||||||
VirtioFSCache: defaultVirtioFSCacheMode,
|
VirtioFSCache: defaultVirtioFSCacheMode,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user