Closed WeiZhang555 closed 8 years ago
Run docker run -tid busybox sh
with runv-containerd, note that network is default:
I0526 15:17:24.086326 29979 server.go:31] gRPC handle CreateContainer
I0526 15:17:24.087356 29979 vm.go:179] hyperHandlePodEvent pod pod-dZmchdHooY, vm vm-XNcIHLnhlU
I0526 15:17:24.087453 29979 hypervisor.go:29] vm vm-XNcIHLnhlU: main event loop got message 21(COMMAND_RUN_POD)
I0526 15:17:24.087559 29979 vm_states.go:449] got spec, prepare devices
I0526 15:17:24.087737 29979 vm_states.go:67] initial vm spec: {
"hostname": "5663675f1fab",
"containers": [],
"shareDir": "share_dir"
}
I0526 15:17:24.087764 29979 context.go:211] VM vm-XNcIHLnhlU: state change from INIT to 'STARTING'
I0526 15:17:24.087776 29979 hypervisor.go:29] vm vm-XNcIHLnhlU: main event loop got message 10(EVENT_DEV_SKIP)
I0526 15:17:24.087787 29979 vm_states.go:476] device ready, could run pod.
I0526 15:17:24.087509 29979 qemu_process.go:63] cmdline arguments: -machine pc-i440fx-2.0,accel=kvm,usb=off -global kvm-pit.lost_tick_policy=discard -cpu host -kernel /var/lib/hyper/kernel -initrd /var/lib/hyper/hyper-initrd.img -append console=ttyS0 panic=1 no_timer_check -realtime mlock=off -no-user-config -nodefaults -no-hpet -rtc base=utc,driftfix=slew -no-reboot -display none -boot strict=on -m 128 -smp 1 -qmp unix:/var/run/hyper/vm-XNcIHLnhlU/qmp.sock,server,nowait -serial unix:/var/run/hyper/vm-XNcIHLnhlU/console.sock,server,nowait -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 -chardev socket,id=charch0,path=/var/run/hyper/vm-XNcIHLnhlU/hyper.sock,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charch0,id=channel0,name=sh.hyper.channel.0 -chardev socket,id=charch1,path=/var/run/hyper/vm-XNcIHLnhlU/tty.sock,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charch1,id=channel1,name=sh.hyper.channel.1 -fsdev local,id=virtio9p,path=/var/run/hyper/vm-XNcIHLnhlU/share_dir,security_model=none -device virtio-9p-pci,fsdev=virtio9p,mount_tag=share_dir
I0526 15:17:24.095480 29979 qemu_process.go:74] starting daemon with pid: 30108
I0526 15:17:24.107616 29979 init_comm.go:133] Wating for init messages...
I0526 15:17:24.107718 29979 init_comm.go:96] trying to read 8 bytes
I0526 15:17:24.107616 29979 init_comm.go:53] connected to /var/run/hyper/vm-XNcIHLnhlU/console.sock
I0526 15:17:24.107762 29979 init_comm.go:60] connected /var/run/hyper/vm-XNcIHLnhlU/console.sock as telnet mode.
I0526 15:17:24.107616 29979 qmp_handler.go:167] connected to /var/run/hyper/vm-XNcIHLnhlU/qmp.sock
I0526 15:17:24.107803 29979 qmp_handler.go:177] begin qmp init...
I0526 15:17:24.107667 29979 tty.go:144] tty socket connected
I0526 15:17:24.107823 29979 tty.go:87] tty: trying to read 12 bytes
E0526 15:17:24.117467 29979 qmp_handler.go:181] get qmp welcome failed: read unix @->/var/run/hyper/vm-XNcIHLnhlU/qmp.sock: read: connection reset by peer
E0526 15:17:24.117826 29979 qmp_handler.go:361] QMP initialize failed
I0526 15:17:24.117873 29979 hypervisor.go:29] vm vm-XNcIHLnhlU: main event loop got message 35(ERROR_INIT_FAIL)
E0526 15:17:24.117908 29979 vm_states.go:408] read unix @->/var/run/hyper/vm-XNcIHLnhlU/qmp.sock: read: connection reset by peer
E0526 15:17:24.117943 29979 vm_states.go:285] Shutting down because of an exception: Fail during init pod running environment
I0526 15:17:24.117979 29979 context.go:211] VM vm-XNcIHLnhlU: state change from STARTING to 'TERMINATING'
I0526 15:17:24.118034 29979 vm.go:260] Get the response from VM, VM id is vm-XNcIHLnhlU!
I0526 15:17:24.118075 29979 hypervisor.go:29] vm vm-XNcIHLnhlU: main event loop got message 24(COMMAND_SHUTDOWN)
I0526 15:17:24.118116 29979 vm.go:81] Got response: 13: unexpected event during terminating
E0526 15:17:24.118169 29979 init_comm.go:99] read init data failed
E0526 15:17:24.118182 29979 init_comm.go:137] read init message failed... read unix @->/var/run/hyper/vm-XNcIHLnhlU/hyper.sock: read: connection reset by peer
I0526 15:17:24.118200 29979 hypervisor.go:29] vm vm-XNcIHLnhlU: main event loop got message 35(ERROR_INIT_FAIL)
W0526 15:17:24.118213 29979 vm_states.go:399] got unexpected event during terminating
E0526 15:17:24.118251 29979 tty.go:90] read tty data failed
I0526 15:17:24.118264 29979 tty.go:151] tty socket closed, quit the reading goroutine read unix @->/var/run/hyper/vm-XNcIHLnhlU/tty.sock: read: connection reset by peer
I0526 15:17:24.118284 29979 tty.go:118] tty chan closed, quit sent goroutine
I0526 15:17:24.118294 29979 hypervisor.go:29] vm vm-XNcIHLnhlU: main event loop got message 37(ERROR_INTERRUPTED)
I0526 15:17:24.118304 29979 vm_states.go:654] Connection interrupted while terminating
I0526 15:17:24.118357 29979 tty.go:428] Input byte chan closed, close the output string chan
I0526 15:17:24.118382 29979 init_comm.go:70] console output end
I0526 15:17:34.118083 29979 hypervisor.go:29] vm vm-XNcIHLnhlU: main event loop got message 3(EVENT_VM_TIMEOUT)
W0526 15:17:34.118118 29979 vm_states.go:651] VM did not exit in time, try to stop it
E0526 15:17:34.118184 29979 vm_states.go:294] Shutting down because of an exception: vm terminating timeout
I0526 15:17:34.118214 29979 vm.go:81] Got response: 7: vm terminating timeout
I0526 15:17:44.118309 29979 qemu_process.go:24] kill Qemu... 30108
I0526 15:17:44.118365 29979 hypervisor.go:29] vm vm-XNcIHLnhlU: main event loop got message 2(EVENT_VM_KILL)
I0526 15:17:44.118380 29979 vm_states.go:629] Got VM force killed message, go to cleaning up
I0526 15:17:44.118389 29979 vm_states.go:36] VM has exit...
I0526 15:17:44.118404 29979 context.go:198] no more device to release/remove/umount, quit
I0526 15:17:44.118429 29979 vm.go:81] Got response: 2: VM shut down
I0526 15:17:44.118439 29979 hyperpod.go:316] StartPod fail: QEMU response data is nil
I0526 15:17:44.118448 29979 supervisor.go:168] createHyperPod() returns
Looks like it's network related error, this piece of code can remove the error:
diff --git a/supervisor/container.go b/supervisor/container.go
index b460a71..87a00e9 100644
--- a/supervisor/container.go
+++ b/supervisor/container.go
@@ -140,11 +140,12 @@ func (c *Container) start(p *Process) error {
return err
}
- err = c.ownerPod.initPodNetwork(c)
- if err != nil {
- glog.Errorf("fail to initialize pod network %v", err)
- return err
- }
+ /*
+ err = c.ownerPod.initPodNetwork(c)
+ if err != nil {
+ glog.Errorf("fail to initialize pod network %v", err)
+ return err
+ }*/
c.ownerPod.podStatus.AddContainer(c.Id, c.ownerPod.podStatus.Id, "", []string{}, types.S_POD_CREATED)
return c.ownerPod.vm.NewContainer(u, info)
Latest version works now. Close this because it's resolved.
I'll paste logs directly here.
Try to run
docker run -tid --net none busybox sh
with runv-containerd, it reports error: