hyperd icon indicating copy to clipboard operation
hyperd copied to clipboard

restart hyperd service cause running pods disappeared

Open jiangpengcheng opened this issue 7 years ago • 4 comments

when restart the hyperd service, running pods will disappear, but if we restart the hyperd again, the disappeared pods will return.

how to reproduce:

  1. start a simpe pod:
[root@localhost hyper]# hyperctl run -d --name test nginx
POD id is test
Time to run a POD is 5782 ms
[root@localhost hyper]# hyperctl list
POD ID              POD Name            VM name             Status
test                test                vm-LTppyMtoxV       running
[root@localhost hyper]#
  1. restart the hyperd, the pod is disappeared:
[root@localhost hyper]# service hyperd restart
[root@localhost hyper]# hyperctl list
POD ID              POD Name            VM name             Status
[root@localhost hyper]#
  1. restart the hyperd service again, and the pod comes back:
[root@localhost hyper]# service hyperd restart
[root@localhost hyper]# hyperctl list
POD ID              POD Name            VM name             Status
test                test                                    failed

The test env is:

OS:  CentOS Linux release 7.2.1511 (Core)
Kernal:  3.10.0-327.el7.x86_64
hyperd: v0.8.1

The error log looks like below:

Aug 20 22:03:40 localhost.localdomain hyperd[3618]: E0820 22:03:40.104639    3618 persistence.go:232] PSB[vm-SinrUrqJaU] cannot load driver context: signal 0 on Qemu process(3479) failed: os: process already finished
Aug 20 22:03:40 localhost.localdomain hyperd[3618]: E0820 22:03:40.105031    3618 vm.go:98] VM[vm-SinrUrqJaU] cannot associate with vm: signal 0 on Qemu process(3479) failed: os: process already finished
Aug 20 22:03:40 localhost.localdomain hyperd[3618]: E0820 22:03:40.105042    3618 provision.go:284] Pod[test] signal 0 on Qemu process(3479) failed: os: process already finished

jiangpengcheng avatar Aug 21 '17 02:08 jiangpengcheng

stop it with SIGHUP instead of SIGTERM

gnawux avatar Aug 21 '17 02:08 gnawux

should this be written to the systemd unit file?

jiangpengcheng avatar Aug 21 '17 06:08 jiangpengcheng

@gnawux i did as you said, but it's not fixed.

haoyixin avatar Sep 20 '17 08:09 haoyixin

@haoyixin stop hyperd with kill -HUP, it won't stop the qemu processes.

gnawux avatar Oct 08 '17 12:10 gnawux