mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
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 <chen.bo@intel.com> Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
parent
d8a333b935
commit
7ae4376bf4
@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user