mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-10-31 09:26:52 +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:
		| @@ -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, " ")) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user