From 7ae4376bf498a218183d65f4fb986d080bb5a87c Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Mon, 29 Jun 2020 23:27:08 -0700 Subject: [PATCH] clh: vsock: Use the updated VsockConfig [ port runtime commit 364435a6a18bfbb1277512431040bf085554ffdf ] The new release of clh v0.8.0 updated the 'VsockConfig' of its HTTP API, which requires changes on our clh driver. Signed-off-by: Bo Chen Signed-off-by: Peng Tao --- src/runtime/virtcontainers/clh.go | 8 ++++---- src/runtime/virtcontainers/clh_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/runtime/virtcontainers/clh.go b/src/runtime/virtcontainers/clh.go index 9f2925bee..979dad2b0 100644 --- a/src/runtime/virtcontainers/clh.go +++ b/src/runtime/virtcontainers/clh.go @@ -1133,7 +1133,7 @@ func (clh *cloudHypervisor) addVSock(cid int64, path string) { "cid": cid, }).Info("Adding HybridVSock") - clh.vmconfig.Vsock = chclient.VsockConfig{Cid: cid, Sock: path} + clh.vmconfig.Vsock = chclient.VsockConfig{Cid: cid, Socket: path} } func (clh *cloudHypervisor) addNet(e Endpoint) error { @@ -1177,14 +1177,14 @@ func (clh *cloudHypervisor) addVolume(volume types.Volume) error { { Tag: volume.MountTag, CacheSize: int64(clh.config.VirtioFSCacheSize << 20), - Sock: vfsdSockPath, + Socket: vfsdSockPath, }, } } else { clh.vmconfig.Fs = []chclient.FsConfig{ { - Tag: volume.MountTag, - Sock: vfsdSockPath, + Tag: volume.MountTag, + Socket: vfsdSockPath, }, } diff --git a/src/runtime/virtcontainers/clh_test.go b/src/runtime/virtcontainers/clh_test.go index d72728aea..260e80882 100644 --- a/src/runtime/virtcontainers/clh_test.go +++ b/src/runtime/virtcontainers/clh_test.go @@ -110,7 +110,7 @@ func TestCloudHypervisorAddVSock(t *testing.T) { clh.addVSock(1, "path") assert.Equal(clh.vmconfig.Vsock.Cid, int64(1)) - assert.Equal(clh.vmconfig.Vsock.Sock, "path") + assert.Equal(clh.vmconfig.Vsock.Socket, "path") } // Check addNet appends to the network config list new configurations.