mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
runtime: hybrid-mode cause error in the latest nydusd
When update the nydusd to 2.2, the argument "--hybrid-mode" cause the following error: thread 'main' panicked at 'ArgAction::SetTrue / ArgAction::SetFalse is defaulted' Maybe we should remove it to upgrad nydusd Fixes: #6407 Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
This commit is contained in:
parent
7201279647
commit
395645e1ce
@ -157,7 +157,7 @@ func (nd *nydusd) args() ([]string, error) {
|
||||
logLevel = "debug"
|
||||
}
|
||||
args := []string{
|
||||
"virtiofs", "--hybrid-mode",
|
||||
"virtiofs",
|
||||
"--log-level", logLevel,
|
||||
"--apisock", nd.apiSockPath,
|
||||
"--sock", nd.sockPath,
|
||||
|
@ -99,13 +99,13 @@ func TestNydusdArgs(t *testing.T) {
|
||||
apiSockPath: "/var/lib/api.sock",
|
||||
debug: true,
|
||||
}
|
||||
expected := "virtiofs --hybrid-mode --log-level debug --apisock /var/lib/api.sock --sock /var/lib/vhost-user.sock"
|
||||
expected := "virtiofs --log-level debug --apisock /var/lib/api.sock --sock /var/lib/vhost-user.sock"
|
||||
args, err := nd.args()
|
||||
assert.NoError(err)
|
||||
assert.Equal(expected, strings.Join(args, " "))
|
||||
|
||||
nd.debug = false
|
||||
expected = "virtiofs --hybrid-mode --log-level info --apisock /var/lib/api.sock --sock /var/lib/vhost-user.sock"
|
||||
expected = "virtiofs --log-level info --apisock /var/lib/api.sock --sock /var/lib/vhost-user.sock"
|
||||
args, err = nd.args()
|
||||
assert.NoError(err)
|
||||
assert.Equal(expected, strings.Join(args, " "))
|
||||
|
Loading…
Reference in New Issue
Block a user