From 395645e1ce374c8b4f067cc95adb1cf72af6ca0f Mon Sep 17 00:00:00 2001 From: Jianyong Wu Date: Thu, 2 Mar 2023 16:41:46 +0800 Subject: [PATCH] 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 --- src/runtime/virtcontainers/nydusd.go | 2 +- src/runtime/virtcontainers/nydusd_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/virtcontainers/nydusd.go b/src/runtime/virtcontainers/nydusd.go index 9a2e1a638b..3c42e4cdeb 100644 --- a/src/runtime/virtcontainers/nydusd.go +++ b/src/runtime/virtcontainers/nydusd.go @@ -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, diff --git a/src/runtime/virtcontainers/nydusd_test.go b/src/runtime/virtcontainers/nydusd_test.go index 481866ffcc..a8ec6dc9b1 100644 --- a/src/runtime/virtcontainers/nydusd_test.go +++ b/src/runtime/virtcontainers/nydusd_test.go @@ -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, " "))