api: To watch the vm console in FetchSandbox api#442
api: To watch the vm console in FetchSandbox api#442devimc merged 1 commit intokata-containers:masterfrom
Conversation
|
PSS Measurement: Memory inside container: |
virtcontainers/sandbox.go
Outdated
| return fmt.Errorf("sandbox %s missed agent pointer", s.ID()) | ||
| } | ||
|
|
||
| err := s.agent.startProxy(s) |
There was a problem hiding this comment.
Nit: You could simplify this to simply:
return s.agent.startProxy(s)
virtcontainers/api.go
Outdated
| return nil, err | ||
| } | ||
|
|
||
| /* If the proxy is KataBuiltInProxyType type, it needs to restart the proxy to watch the |
virtcontainers/sandbox.go
Outdated
|
|
||
| func (s *Sandbox) startProxy() error { | ||
|
|
||
| /* If the proxy is KataBuiltInProxyType type, it needs to restart the proxy |
There was a problem hiding this comment.
Hi, Devimc
I had fixed the issues, do you have any comments?
Thanks!
Fupan
When do sandbox release, the kataBuiltInProxy will be closed, and it will stop the watch of vm's console; Thus it needs to restart the proxy to monitor the vm console once to restore the sandbox. Fixes: kata-containers#441 Signed-off-by: fupan <lifupan@gmail.com>
f54df34 to
9155412
Compare
|
PSS Measurement: Memory inside container: |
|
/lgtm Jenkins failed on 'crio' though. Might be related to kata-containers/tests/issues/361 |
|
@devimc do you want to take another look? |
Codecov Report
@@ Coverage Diff @@
## master #442 +/- ##
=========================================
Coverage ? 64.07%
=========================================
Files ? 87
Lines ? 8874
Branches ? 0
=========================================
Hits ? 5686
Misses ? 2576
Partials ? 612
Continue to review full report at Codecov.
|
There are 2 phases in Memory Hotplug. 1) Physical Memory Hotplug phase. 2) Logical Memory Hotplug phase. The First phase is to communicate hardware/firmware and make/erase environment for hotplugged memory. If firmware supports notification of connection of new memory to OS, this phase is triggered automatically. ACPI can notify this event. This also what kata supports on amd64, memory hotplug via acpi-driven. But if not, there is another option, probe operation by hand. And since memory hotplug via acpi is missing on qemu-system-aarch64, we hope to support the other probe solution. This whole implementation of memory hotplug via probe interface is divided into two phases, the first is to check if guest kernel is capable of memory hot-add via probe interface, which is located at /sys/devices/system/memory/probe. Fixes: kata-containers#442 Signed-off-by: Penny Zheng <penny.zheng@arm.com>
There are 2 phases in Memory Hotplug. 1) Physical Memory Hotplug phase. 2) Logical Memory Hotplug phase. The First phase is to communicate hardware/firmware and make/erase environment for hotplugged memory. If firmware supports notification of connection of new memory to OS, this phase is triggered automatically. ACPI can notify this event. This also what kata supports on amd64, memory hotplug via acpi-driven. But if not, there is another option, probe operation by hand. And since memory hotplug via acpi is missing on qemu-system-aarch64, we hope to support the other probe solution. This whole implementation of memory hotplug via probe interface is divided into two phases, the first is covered by former commit. The second is to notify guest kernel about hot-added momery event by echoing related addresses into /sys/devices/system/memory/probe. Fixes: kata-containers#442 Signed-off-by: Penny Zheng <penny.zheng@arm.com>
since we add extra functionality in func GetGuestDetails for memory hotplug via probe interface, we need to refine its related unit test. Fixes: kata-containers#442 Signed-off-by: Penny Zheng <penny.zheng@arm.com>
When do sandbox release, the kataBuiltInProxy will
be closed, and it will stop the watch of vm's console;
Thus it needs to restart the proxy to monitor the vm
console once to restore the sandbox.
Fixes: #441
Signed-off-by: fupan lifupan@gmail.com