mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-10-30 08:52:39 +00:00 
			
		
		
		
	virtcontainers: clh: Revert the workaround incorrect default values
Given the fix to the bugs of the openapi spec file is included in the
Cloud Hypervisor v18.0 [1], this patch reverts the workaround we carried
in the CLH driver.
This reverts commit 932ee41b3f.
[1] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/3029
Signed-off-by: Bo Chen <chen.bo@intel.com>
			
			
This commit is contained in:
		| @@ -240,7 +240,6 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ | |||||||
| 	clh.vmconfig.Memory = chclient.NewMemoryConfig(int64((utils.MemUnit(clh.config.MemorySize) * utils.MiB).ToBytes())) | 	clh.vmconfig.Memory = chclient.NewMemoryConfig(int64((utils.MemUnit(clh.config.MemorySize) * utils.MiB).ToBytes())) | ||||||
| 	// shared memory should be enabled if using vhost-user(kata uses virtiofsd) | 	// shared memory should be enabled if using vhost-user(kata uses virtiofsd) | ||||||
| 	clh.vmconfig.Memory.Shared = func(b bool) *bool { return &b }(true) | 	clh.vmconfig.Memory.Shared = func(b bool) *bool { return &b }(true) | ||||||
| 	clh.vmconfig.Memory.HotplugMethod = func(s string) *string { return &s }("Acpi") |  | ||||||
| 	hostMemKb, err := getHostMemorySizeKb(procMemInfo) | 	hostMemKb, err := getHostMemorySizeKb(procMemInfo) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return nil | 		return nil | ||||||
| @@ -1116,7 +1115,6 @@ func (clh *cloudHypervisor) addNet(e Endpoint) error { | |||||||
| 	net := chclient.NewNetConfig() | 	net := chclient.NewNetConfig() | ||||||
| 	net.Mac = &mac | 	net.Mac = &mac | ||||||
| 	net.Tap = &tapPath | 	net.Tap = &tapPath | ||||||
| 	net.VhostMode = func(s string) *string { return &s }("Client") |  | ||||||
| 	if clh.vmconfig.Net != nil { | 	if clh.vmconfig.Net != nil { | ||||||
| 		*clh.vmconfig.Net = append(*clh.vmconfig.Net, *net) | 		*clh.vmconfig.Net = append(*clh.vmconfig.Net, *net) | ||||||
| 	} else { | 	} else { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user