This repository was archived by the owner on Feb 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
This repository was archived by the owner on Feb 8, 2021. It is now read-only.
9p rootfs become read-only if restart a container #294
Copy link
Copy link
Closed
Labels
Description
During testing hyperhq/hyperd#585 (fix hyperhq/hyperd#539), hyperstart #290 failed when restart container, while the restart works with #287 .
#287 result:
➜ sudo ./hyperctl list container
Container ID Name POD ID Status
2c8abf13b126d71e8fdfdf21d117633178f6f2635f4d884f3179c3e7e306a54c busybox-9326359365 busybox-9326359365 succeeded
➜ sudo ./hyperctl start -c busybox-9326359365
Successfully started container busybox-9326359365
➜ sudo ./hyperctl attach busybox-9326359365
/ # ls
bin dev etc home lib proc root sys tmp usr var
/ # exit
➜
#290 result:
➜ sudo ./hyperctl list container
Container ID Name POD ID Status
3ccb3256b304f77602b159cdb75dd748e9675d8e2fc6526c94ba31296888fd01 busybox-7322297518 busybox-7322297518 succeeded
➜ sudo ./hyperctl start -c busybox-7322297518
./hyperctl ERROR: Error from daemon's response: Create new container failed: Error:
255 ➜
console logs:
I0417 23:24:00.703250 [CNL] hyper_handle_event event EPOLLIN, he 0x61b5a8, fd 3, 0x61b460
I0417 23:24:00.704053 [CNL] hyper ctl append type 14, len 4
I0417 23:24:00.705311 [CNL] hyper_modify_event modify event fd 3, 0x61b5a8, event 8197
I0417 23:24:00.706092 [CNL] hyper_ctlfd_read: get length 482
I0417 23:24:00.706898 [CNL] hyper ctl append type 14, len 4
I0417 23:24:00.707836 [CNL] hyper_ctlmsg_handle, type 17, len 482
I0417 23:24:00.716334 [CNL] call hyper_new_container, json {"id":"3ccb3256b304f77602b159cdb75dd748e9675d8e2fc6526c94ba31296888fd01","rootfs":"rootfs","image":"/3bb3a3600dd818aec2c01ba2ffc474442ab43c3c30fff69fb5e7a63cf73a4a3f","fsmap":[{"source":"JbzXCiRQfJ","path":"/etc/hosts","readOnly":false,"dockerVolume":false}],"process":{"id":"init","terminal":true,"stdio":2,"args":["sh"],"envs":[{"env":"PATH","value":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}],"workdir":"/"},"restartPolicy":"never","initialize":true}, len 474
I0417 23:24:00.717478 [CNL] hyper send mntns referenced event: normal
I0417 23:24:00.718539 [CNL] create child process pid=338 in the sandbox
I0417 23:24:00.720520 [CNL] src directory /tmp/hyper/shared//3bb3a3600dd818aec2c01ba2ffc474442ab43c3c30fff69fb5e7a63cf73a4a3f/
I0417 23:24:00.723649 [CNL] root directory for container is /tmp/hyper/3ccb3256b304f77602b159cdb75dd748e9675d8e2fc6526c94ba31296888fd01/root//rootfs, init task sh
I0417 23:24:00.724620 [CNL] recreate file ./etc/hosts
I0417 23:24:00.725966 [CNL] recreate file ./etc/hostname
I0417 23:24:00.727686 [CNL] recreate symlink ./etc/mtab to /proc/mounts
I0417 23:24:00.729321 [CNL] container sets up init layer failed
I0417 23:24:00.730327 [CNL] hyper send container inited event: error
I0417 23:24:00.731311 [CNL] wait for setup container rootfs failed
I0417 23:24:00.733253 [CNL] create child process pid=340 in the sandbox
I0417 23:24:00.734420 [CNL] fail to enter container ns: Bad file descriptor
I0417 23:24:00.735414 [CNL] hyper send enter container ns event: error
I0417 23:24:00.736197 [CNL] hyper ctl append type 10, len 0
I0417 23:24:00.737698 [CNL] hyper_handle_event event EPOLLOUT, he 0x61b5a8, fd 3, 0x61b460