mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-02-11 01:24:21 +01:00
Merge pull request #4048 from liubin/fix/3303-delete-virtiofsd-debug-option
runtime: delete debug option in virtiofsd
This commit is contained in:
@@ -125,7 +125,8 @@ virtio_fs_cache_size = @DEFVIRTIOFSCACHESIZE@
|
||||
#
|
||||
# Format example:
|
||||
# ["-o", "arg1=xxx,arg2", "-o", "hello world", "--arg3=yyy"]
|
||||
#
|
||||
# Examples:
|
||||
# Set virtiofsd log level to debug : ["-o", "log_level=debug"] or ["-d"]
|
||||
# see `virtiofsd -h` for possible options.
|
||||
virtio_fs_extra_args = @DEFVIRTIOFSEXTRAARGS@
|
||||
|
||||
|
||||
@@ -168,6 +168,8 @@ virtio_fs_cache_size = @DEFVIRTIOFSCACHESIZE@
|
||||
#
|
||||
# Format example:
|
||||
# ["-o", "arg1=xxx,arg2", "-o", "hello world", "--arg3=yyy"]
|
||||
# Examples:
|
||||
# Set virtiofsd log level to debug : ["-o", "log_level=debug"] or ["-d"]
|
||||
#
|
||||
# see `virtiofsd -h` for possible options.
|
||||
virtio_fs_extra_args = @DEFVIRTIOFSEXTRAARGS@
|
||||
|
||||
@@ -234,7 +234,6 @@ func (clh *cloudHypervisor) createVirtiofsDaemon(sharedPath string) (VirtiofsDae
|
||||
sourcePath: sharedPath,
|
||||
socketPath: virtiofsdSocketPath,
|
||||
extraArgs: clh.config.VirtioFSExtraArgs,
|
||||
debug: clh.config.Debug,
|
||||
cache: clh.config.VirtioFSCache,
|
||||
}, nil
|
||||
}
|
||||
@@ -302,7 +301,6 @@ func (clh *cloudHypervisor) loadVirtiofsDaemon(sharedPath string) (VirtiofsDaemo
|
||||
return &virtiofsd{
|
||||
PID: clh.state.VirtiofsDaemonPid,
|
||||
sourcePath: sharedPath,
|
||||
debug: clh.config.Debug,
|
||||
socketPath: virtiofsdSocketPath,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -499,7 +499,6 @@ func (q *qemu) createVirtiofsDaemon(sharedPath string) (VirtiofsDaemon, error) {
|
||||
sourcePath: sharedPath,
|
||||
socketPath: virtiofsdSocketPath,
|
||||
extraArgs: q.config.VirtioFSExtraArgs,
|
||||
debug: q.config.Debug,
|
||||
cache: q.config.VirtioFSCache,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -70,8 +70,6 @@ type virtiofsd struct {
|
||||
sourcePath string
|
||||
// extraArgs list of extra args to append to virtiofsd command
|
||||
extraArgs []string
|
||||
// debug flag
|
||||
debug bool
|
||||
// PID process ID of virtiosd process
|
||||
PID int
|
||||
}
|
||||
@@ -199,14 +197,8 @@ func (v *virtiofsd) args(FdSocketNumber uint) ([]string, error) {
|
||||
"-o", "source=" + v.sourcePath,
|
||||
// fd number of vhost-user socket
|
||||
fmt.Sprintf("--fd=%v", FdSocketNumber),
|
||||
}
|
||||
|
||||
if v.debug {
|
||||
// enable debug output (implies -f)
|
||||
args = append(args, "-d")
|
||||
} else {
|
||||
// foreground operation
|
||||
args = append(args, "-f")
|
||||
"-f",
|
||||
}
|
||||
|
||||
if len(v.extraArgs) != 0 {
|
||||
|
||||
@@ -22,7 +22,6 @@ func TestVirtiofsdStart(t *testing.T) {
|
||||
cache string
|
||||
extraArgs []string
|
||||
sourcePath string
|
||||
debug bool
|
||||
PID int
|
||||
ctx context.Context
|
||||
}
|
||||
@@ -58,7 +57,6 @@ func TestVirtiofsdStart(t *testing.T) {
|
||||
cache: tt.fields.cache,
|
||||
extraArgs: tt.fields.extraArgs,
|
||||
sourcePath: tt.fields.sourcePath,
|
||||
debug: tt.fields.debug,
|
||||
PID: tt.fields.PID,
|
||||
ctx: tt.fields.ctx,
|
||||
}
|
||||
@@ -86,7 +84,6 @@ func TestVirtiofsdArgs(t *testing.T) {
|
||||
assert.NoError(err)
|
||||
assert.Equal(expected, strings.Join(args, " "))
|
||||
|
||||
v.debug = false
|
||||
expected = "--syslog -o cache=none -o no_posix_lock -o source=/run/kata-shared/foo --fd=456 -f"
|
||||
args, err = v.args(456)
|
||||
assert.NoError(err)
|
||||
|
||||
Reference in New Issue
Block a user