virtcontainers: keep qmp connection whenever possible#501
virtcontainers: keep qmp connection whenever possible#501bergwolf merged 3 commits intokata-containers:masterfrom
Conversation
|
PSS Measurement: Memory inside container: |
Unify qmp channel setup and teardown. This also fixes the issue that sometimes qmp pointer is not reset after qmp is shutdown. Signed-off-by: Peng Tao <bergwolf@gmail.com>
For each time a sandbox structure is created, we ensure s.Release() is called. Then we can keep the qmp connection as long as Sandbox pointer is alive. All VC interfaces are still stateless as s.Release() is called before each API returns. OTOH, for VCSandbox APIs, FetchSandbox() must be paired with s.Release, the same as before. Fixes: kata-containers#500 Signed-off-by: Peng Tao <bergwolf@gmail.com>
|
PSS Measurement: Memory inside container: |
|
Build succeeded (third-party-check pipeline).
|
When enabled, do not release in memory sandbox resources in VC APIs, and callers are expected to call sandbox.Release() to release the in memory resources. Signed-off-by: Peng Tao <bergwolf@gmail.com>
|
PSS Measurement: Memory inside container: |
|
Build succeeded (third-party-check pipeline).
|
| func (q *qemu) qmpSetup() (*govmmQemu.QMP, error) { | ||
| func (q *qemu) qmpSetup() error { | ||
| if q.qmpMonitorCh.qmp != nil { | ||
| return nil |
There was a problem hiding this comment.
Just a thought here, do we need this to be idempotent? Is there any reason we would call qmpSetup() with qmp being not nil?
There was a problem hiding this comment.
qmpSetup() is now always called before any qmp talks. But qmpShutdown() is only called explicitly when qemu.disconnect() is called. So yes, there are lots of cases when qmpSetup() is called with qmp being not nil.
sboeuf
left a comment
There was a problem hiding this comment.
One comment, but otherwise the factorization looks good and will help the global performance.
|
travis-ci is stuck for more than an hour in |
|
@sboeuf No, I don't think it's a stable candidate. |
…temd systemd-target: Add chronyd.service to kata-containers.target
For each time a sandbox structure is created, we ensure s.Release()
is called. Then we can keep the qmp connection as long as Sandbox
pointer is alive.
All VC interfaces are still stateless as s.Release() is called before
each API returns.
OTOH, for VCSandbox APIs, FetchSandbox() must be paired with s.Release,
the same as before.