mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 16:27:50 +00:00
runtime: avoid panic on metrics gathering
While running with a remote hypervisor, whenever kata-monitor tries to access metrics from the shim, the shim does a "panic" and no metric can be gathered. The function GetVirtioFsPid() is called on metrics gathering, and had a call to "panic()". Since there is no virtiofs process for remote hypervisor, the right implementation is to return nil. The caller expects that, and will skip metrics gathering for virtiofs. Fixes: #9826 Signed-off-by: Julien Ropé <jrope@redhat.com>
This commit is contained in:
parent
92cc5e0adb
commit
9c86eb1d35
@ -267,7 +267,7 @@ func (rh *remoteHypervisor) GetPids() []int {
|
||||
}
|
||||
|
||||
func (rh *remoteHypervisor) GetVirtioFsPid() *int {
|
||||
panic(notImplemented("GetVirtioFsPid"))
|
||||
return nil
|
||||
}
|
||||
|
||||
func (rh *remoteHypervisor) fromGrpc(ctx context.Context, hypervisorConfig *HypervisorConfig, j []byte) error {
|
||||
|
Loading…
Reference in New Issue
Block a user