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

Think about better ways to replace sleeps in vm template #728

Closed
bergwolf opened this issue Sep 14, 2018 · 4 comments
Closed

Think about better ways to replace sleeps in vm template #728

bergwolf opened this issue Sep 14, 2018 · 4 comments
Labels
enhancement Improvement to an existing feature

Comments

@bergwolf
Copy link
Member

Currently as of #684, there are two arbitrary sleeps when we create the template vm to make sure that:

  1. the agent cleans up the current grpc server and ready to accept new connections
  2. vm.Save() (which is an asynchronous qmp call) completes

It's better (code) if we can think of better ways to replace these arbitrary sleeps. Not an urgent issue though, since it is not on the regular vm creation code path and only happens once.

/cc @sboeuf

@bergwolf bergwolf added the enhancement Improvement to an existing feature label Sep 14, 2018
@sboeuf
Copy link

sboeuf commented Sep 14, 2018

Thanks for opening this @bergwolf
I was discussing with @amshinde and she suggested that we could find a way from the agent to let it notify the host when it's ready to listen for new connections.
One way could be to create an extra serial port, as a side way for communicating this information. That being said, I don't know if that's acceptable from a security perspective.

@bergwolf
Copy link
Member Author

@sboeuf Thanks for the suggestions. TBH, I don't think it justifies the costs (from security and complexity point of view) to have another serial port connection (which also means another grpc service) just for this. Besides it only solves the first part of the sleep.

@bergwolf
Copy link
Member Author

@laijs just mentioned to me that we can use qmp query-migrate do check the migration status. I'll post a PR to add it. That will allow us to get rid of the second sleep in the code.

@sboeuf
Copy link

sboeuf commented Sep 17, 2018

Sounds good :)

bergwolf added a commit to bergwolf/kata-runtime that referenced this issue Sep 18, 2018
Then we can remove the arbitrary sleep waiting for migration
completion when creating a tempalte vm.

Fixes: kata-containers#728

Signed-off-by: Peng Tao <[email protected]>
bergwolf added a commit to bergwolf/kata-runtime that referenced this issue Sep 21, 2018
Then we can remove the arbitrary sleep waiting for migration
completion when creating a tempalte vm.

Fixes: kata-containers#728

Signed-off-by: Peng Tao <[email protected]>
bergwolf added a commit to bergwolf/kata-runtime that referenced this issue Sep 28, 2018
Then we can remove the arbitrary sleep waiting for migration
completion when creating a tempalte vm.

Fixes: kata-containers#728

Signed-off-by: Peng Tao <[email protected]>
bergwolf added a commit to bergwolf/kata-runtime that referenced this issue Sep 28, 2018
Then we can remove the arbitrary sleep waiting for migration
completion when creating a tempalte vm.

Fixes: kata-containers#728

Signed-off-by: Peng Tao <[email protected]>
bergwolf added a commit to bergwolf/kata-runtime that referenced this issue Sep 29, 2018
Then we can remove the arbitrary sleep waiting for migration
completion when creating a tempalte vm.

Fixes: kata-containers#728

Signed-off-by: Peng Tao <[email protected]>
bergwolf added a commit to bergwolf/kata-runtime that referenced this issue Sep 30, 2018
Then we can remove the arbitrary sleep waiting for migration
completion when creating a tempalte vm.

Fixes: kata-containers#728

Signed-off-by: Peng Tao <[email protected]>
bergwolf added a commit to bergwolf/kata-runtime that referenced this issue Sep 30, 2018
Then we can remove the arbitrary sleep waiting for migration
completion when creating a tempalte vm.

Fixes: kata-containers#728

Signed-off-by: Peng Tao <[email protected]>
bergwolf added a commit to bergwolf/kata-runtime that referenced this issue Oct 9, 2018
Then we can remove the arbitrary sleep waiting for migration
completion when creating a tempalte vm.

Fixes: kata-containers#728

Signed-off-by: Peng Tao <[email protected]>
zklei pushed a commit to zklei/runtime that referenced this issue Nov 22, 2018
Then we can remove the arbitrary sleep waiting for migration
completion when creating a tempalte vm.

Fixes: kata-containers#728

Signed-off-by: Peng Tao <[email protected]>
egernst pushed a commit to egernst/runtime that referenced this issue Feb 9, 2021
build: Update CentOS version for the Dockerfile
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants