Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

clh: Usage of REST APIs in Kata #2541

Closed
likebreath opened this issue Mar 20, 2020 · 7 comments
Closed

clh: Usage of REST APIs in Kata #2541

likebreath opened this issue Mar 20, 2020 · 7 comments

Comments

@likebreath
Copy link
Contributor

likebreath commented Mar 20, 2020

This issue tracks how the REST APIs provided by cloud-hypervisor is being used in Kata. We plan to integrate all REST APIs from CLH in Kata unless we don't find a valid use-case in the container land.

REST APIs being used

Action Endpoint
Check for the REST API availability /vmm.ping
Shut the VMM down /vmm.shutdown
Create the VM /vm.create
Boot the VM /vm.boot
Dump the VM information /vm.info
Add/remove CPUs to/from the VM /vm.resize
Add VFIO PCI device to the VM /vm.add-device
Add/remove memory from the VM /vm.resize

REST APIs NOT being used

Action Endpoint Note
Delete the VM /vm.delete Probably would be nice to use as cleanup in driver
Shut the VM down /vm.shutdown Want it for force stop?
Reboot the VM /vm.reboot No use-case
Pause the VM /vm.pause Needed for VM templating #2557
Resume the VM /vm.resume Needed from VM templating #2557
Remove VFIO PCI device from the VM /vm.remove-device #2569
Add disk device to the VM /vm.add-disk Work-in-progress #2570
Add fs device to the VM /vm.add-fs All shared directories are mounted under the same path so only one fs dir is used in katal, not needed at the moment.
Add pmem device to the VM /vm.add-pmem Work-in-progress #2575
Add network device to the VM /vm.add-net May be needed for advanced CNI pluggins but not tests today to confirm, need to add test first and enable if needed.
Add vsock device to the VM /vm.add-vsock Kata works with vsock as could plug device, and we need this ready to allow the agent can connect so not a priority in kata.
@likebreath
Copy link
Contributor Author

Please share if you have comments/advises/questions, epscially about REST APIs that are not being used.
/cc @jcvenegas @amshinde @sameo @sboeuf

@likebreath likebreath self-assigned this Mar 20, 2020
@sboeuf
Copy link

sboeuf commented Mar 20, 2020

@likebreath if there's no use case for some of the APIs, that's totally fine. Cloud-Hypervisor has a broader scope than just Kata, and Kata only uses the API that can fit in the container ecosystem.
Maybe pause/resume could have a use case, but I know that the container is already paused in the VM when that's needed.

@jcvenegas
Copy link
Member

@likebreath @sboeuf probably we will want to use pause/resume for VM factory, this a use case were missing but not sure if is part of clh next items to add

@sboeuf
Copy link

sboeuf commented Mar 25, 2020

@jcvenegas

but not sure if is part of clh next items to add

What do you mean? In terms of priority?
I'd say it's definitely not high priority (even from Kata's perspective), but it's ready from a CH perspective, so if this does not take too much effort to enable it for Kata, go for it :)

@amshinde
Copy link
Member

@likebreath I think we do call the Remove method on vfio devices, so should make use of /vm.remove-device to implement that.

@likebreath
Copy link
Contributor Author

@sboeuf @jcvenegas In the status update tomorrow, we can talk about whether the VM factory is something we want to include in the near future.
@amshinde Thanks for the comments on /vm.remove-device. I have put its status as To be added.

@likebreath
Copy link
Contributor Author

Two more new APIs being added from CLH for the past month: /vm.add-fs and /vm.add-vsock.

As noted here, Kata prefers to start with minimum configurations and hot-plug devices on-the-fly as needed, Do we see potential benefits of hot-plugging vosck and/or virtio-fs devices?

/cc @jcvenegas

@jcvenegas jcvenegas moved this from To do to Summary in Cloud hypervisor integration May 26, 2020
@jodh-intel jodh-intel added this to To do in Issue backlog Aug 10, 2020
Cloud hypervisor integration automation moved this from Summary to Done Apr 7, 2021
Issue backlog automation moved this from To do to Done Apr 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Issue backlog
  
Done
Development

No branches or pull requests

5 participants