mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 00:07:16 +00:00
shim: return hypervisor's pid not shim's pid
update outdated code comments Fixes: #3234 Signed-off-by: Binbin Zhang <binbin36520@gmail.com>
This commit is contained in:
parent
b637d12d19
commit
99485d871c
@ -825,7 +825,7 @@ func (s *service) Kill(ctx context.Context, r *taskAPI.KillRequest) (_ *ptypes.E
|
|||||||
|
|
||||||
// Pids returns all pids inside the container
|
// Pids returns all pids inside the container
|
||||||
// Since for kata, it cannot get the process's pid from VM,
|
// Since for kata, it cannot get the process's pid from VM,
|
||||||
// thus only return the Shim's pid directly.
|
// thus only return the hypervisor's pid directly.
|
||||||
func (s *service) Pids(ctx context.Context, r *taskAPI.PidsRequest) (_ *taskAPI.PidsResponse, err error) {
|
func (s *service) Pids(ctx context.Context, r *taskAPI.PidsRequest) (_ *taskAPI.PidsResponse, err error) {
|
||||||
shimLog.WithField("container", r.ID).Debug("Pids() start")
|
shimLog.WithField("container", r.ID).Debug("Pids() start")
|
||||||
defer shimLog.WithField("container", r.ID).Debug("Pids() end")
|
defer shimLog.WithField("container", r.ID).Debug("Pids() end")
|
||||||
@ -927,7 +927,7 @@ func (s *service) Connect(ctx context.Context, r *taskAPI.ConnectRequest) (_ *ta
|
|||||||
|
|
||||||
return &taskAPI.ConnectResponse{
|
return &taskAPI.ConnectResponse{
|
||||||
ShimPid: s.pid,
|
ShimPid: s.pid,
|
||||||
//Since kata cannot get the container's pid in VM, thus only return the shim's pid.
|
//Since kata cannot get the container's pid in VM, thus only return the hypervisor's pid.
|
||||||
TaskPid: s.hpid,
|
TaskPid: s.hpid,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user