mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 15:57:09 +00:00
virtiofsd: Do not use posix lock.
We have some issues trying to run `apt upgrade` on a container that uses virtiofsd with `-o posix_lock`. Add virtiofsd `-o no_posix_lock` argument to not use the posix lock. Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
This commit is contained in:
parent
23a5dc7ff8
commit
ad1563196e
@ -612,7 +612,7 @@ func (q *qemu) virtiofsdArgs(fd uintptr) []string {
|
||||
fmt.Sprintf("--fd=%v", fd),
|
||||
"-o", "source=" + sourcePath,
|
||||
"-o", "cache=" + q.config.VirtioFSCache,
|
||||
"--syslog"}
|
||||
"--syslog", "-o", "no_posix_lock"}
|
||||
if q.config.Debug {
|
||||
args = append(args, "-d")
|
||||
} else {
|
||||
|
@ -502,12 +502,12 @@ func TestQemuVirtiofsdArgs(t *testing.T) {
|
||||
kataHostSharedDir = savedKataHostSharedDir
|
||||
}()
|
||||
|
||||
result := "--fd=123 -o source=test-share-dir/foo -o cache=none --syslog -d"
|
||||
result := "--fd=123 -o source=test-share-dir/foo -o cache=none --syslog -o no_posix_lock -d"
|
||||
args := q.virtiofsdArgs(123)
|
||||
assert.Equal(strings.Join(args, " "), result)
|
||||
|
||||
q.config.Debug = false
|
||||
result = "--fd=123 -o source=test-share-dir/foo -o cache=none --syslog -f"
|
||||
result = "--fd=123 -o source=test-share-dir/foo -o cache=none --syslog -o no_posix_lock -f"
|
||||
args = q.virtiofsdArgs(123)
|
||||
assert.Equal(strings.Join(args, " "), result)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user