Skip to content

Instantly share code, notes, and snippets.

@feiskyer
Created September 29, 2015 01:21
Show Gist options
  • Select an option

  • Save feiskyer/47f21f571a5f74809437 to your computer and use it in GitHub Desktop.

Select an option

Save feiskyer/47f21f571a5f74809437 to your computer and use it in GitHub Desktop.

hyper attach nginx container failed, op logs:

# cat hyper-svc.json
{
	    "containers": [
	        {
	            "image": "nginx",
	            "name": "nginx"
	        }
	    ],
	    "services": [
	    	{
	    		"serviceip": "10.254.0.24",
	    		"serviceport": 2834,
	    		"protocol": "TCP",
	    		"hosts": [
	    			{
	    				"hostip":"192.168.23.2",
	    				"hostport":2345
	    			}
	    		]
	    	}
	    ],
	    "id": "nginx",
	    "dns": ["8.8.8.8"],
	    "tty": true,
	    "type": "pod"
}

[root@ostack ~]# hyper create hyper-svc.json
Pod ID is pod-EhIvzPlPGd
[root@ostack ~]# hyper start pod-EhIvzPlPGd
Successfully started the Pod(pod-EhIvzPlPGd)
[root@ostack ~]# hyper list
         POD ID                      POD Name             VM name    Status
 pod-EhIvzPlPGd                         nginx       vm-IzalXhUSvt   running
[root@ostack ~]# hyper list container
Container ID                                                      Name                         POD ID    Status
2e6d8410a1cc09721d46014c37b1e831bc9e08a970526ce4d60c7e2ef486984d  nginx-service-discovery pod-EhIvzPlPGd   running
213eb33aa90f64ff2d8034b511ebdf5360bb4b94ae1c09c2b08b4b6ca9477606  nginx                pod-EhIvzPlPGd   running
[root@ostack ~]# hyper attach 213eb33aa90f64ff2d8034b511ebdf5360bb4b94ae1c09c2b08b4b6ca9477606

^CSuccessfully attached to pod(213eb33aa90f64ff2d8034b511ebdf5360bb4b94ae1c09c2b08b4b6ca9477606)
End of CmdExec(), Waiting for hijack to finish.
[root@ostack ~]# hyper list
         POD ID                      POD Name             VM name    Status
 pod-EhIvzPlPGd                         nginx                     succeeded
@feiskyer
Copy link
Copy Markdown
Author

logs of hyperd

[HYPER INFO  0929 01:20:^@06 21651 job.go] [:84] -job attach(container, 213eb33aa90f64ff2d8034b511ebdf5360bb4b94ae1c09c2b08b4b6ca9477606, 12xsg6h8, ) OK
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:45] [console] hyper_modify_event modify event fd 5, 0x610580, event 1
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:45] [console] hyper_handle_event get event 1, de 0x6105b8, fd 4. ops 0x610340
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:45] [console] hyper_handle_event event EPOLLIN, de 0x6105b8, fd 4, 0x610340
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:45] [console] hyper_event_read
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:45] [console] already read 8 bytes data
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:83] read 8/8 [length = 0]
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:87] data length is 12
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:73] trying to read 4 bytes
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:83] read 12/12 [length = 12]
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:73] trying to read 8 bytes
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:83] read 8/8 [length = 0]
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:87] data length is 16
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:73] trying to read 8 bytes
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:83] read 16/16 [length = 16]
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:73] trying to read 8 bytes
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:231] get command NEXT
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:234] send 8, receive 8
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:215] got pod finish message after having send destroy message
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:224] Pod finished, returned 2 values
[HYPER INFO  0929 01:20:^@06 21651 hypervisor.go] [:29] main event loop got message 33(COMMAND_ACK)
[HYPER INFO  0929 01:20:^@06 21651 vm_states.go] [:575] [Terminating] Got reply to 4: ''
[HYPER INFO  0929 01:20:^@06 21651 vm_states.go] [:577] POD destroyed
[HYPER INFO  0929 01:20:^@06 21651 hypervisor.go] [:29] main event loop got message 4(EVENT_POD_FINISH)
[HYPER INFO  0929 01:20:^@06 21651 vm_states.go] [:592] got event during terminating
[HYPER INFO  0929 01:20:^@06 21651 qmp_handler.go] [:293] got new session
[HYPER INFO  0929 01:20:^@06 21651 qmp_handler.go] [:222] Begin process command session
[HYPER INFO  0929 01:20:^@06 21651 qmp_handler.go] [:240] sending command (1) {"execute":"quit"}
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:45] [console] hyper send type 14, len 4
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:45] [console] get length 8
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:45] [console] 0 0 0 4 0 0 0 8
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:45] [console]  hyper_channel_handle, type 4, len 8
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:45] [console] get DESTROYPOD message
[HYPER INFO  0929 01:20:^@06 21651 init_comm.go] [:45] [console] hyper send type 13, len 8
[HYPER INFO  0929 01:20:^@06 21651 qmp_handler.go] [:100] got a message {"return": {}}
[HYPER INFO  0929 01:20:^@06 21651 qmp_handler.go] [:100] got a message {"timestamp": {"seconds": 1443489606, "microseconds": 636260}, "event": "SHUTDOWN"}
[HYPER INFO  0929 01:20:^@06 21651 qmp_handler.go] [:104] got event: SHUTDOWN
[HYPER INFO  0929 01:20:^@06 21651 qmp_handler.go] [:149] Shutdown, quit QMP receiver
[HYPER INFO  0929 01:20:^@06 21651 qmp_handler.go] [:324] got QMP event SHUTDOWN
[HYPER INFO  0929 01:20:^@06 21651 qmp_handler.go] [:326] got QMP shutdown event, quit...
[HYPER INFO  0929 01:20:^@06 21651 hypervisor.go] [:29] main event loop got message 1(EVENT_VM_EXIT)
[HYPER INFO  0929 01:20:^@06 21651 vm_states.go] [:559] Got VM shutdown event while terminating, go to cleaning up
[HYPER INFO  0929 01:20:^@06 21651 vm_states.go] [:21] VM has exit...
[HYPER INFO  0929 01:20:^@06 21651 devicemap.go] [:420] need umount dir QEMBnEXQdm
[HYPER INFO  0929 01:20:^@06 21651 devicemap.go] [:450] need unmount overlay dir /2e6d8410a1cc09721d46014c37b1e831bc9e08a970526ce4d60c7e2ef486984d/rootfs
[HYPER INFO  0929 01:20:^@06 21651 devicemap.go] [:450] need unmount overlay dir /213eb33aa90f64ff2d8034b511ebdf5360bb4b94ae1c09c2b08b4b6ca9477606/rootfs
[HYPER INFO  0929 01:20:^@06 21651 devicemap.go] [:500] remove network card 0: 192.168.123.7
[HYPER INFO  0929 01:20:^@06 21651 context.go] [:255] VM vm-IzalXhUSvt: state change from TERMINATING to 'DESTROYING'
[HYPER INFO  0929 01:20:^@06 21651 hypervisor.go] [:29] main event loop got message 12(EVENT_BLOCK_EJECTED)
[HYPER INFO  0929 01:20:^@06 21651 devicemap.go] [:397] volume service-volume umounted
[HYPER INFO  0929 01:20:^@06 21651 vm_states.go] [:299] Unplug block device return with true
[HYPER INFO  0929 01:20:^@06 21651 hypervisor.go] [:29] main event loop got message 14(EVENT_INTERFACE_DELETE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment