-
Notifications
You must be signed in to change notification settings - Fork 367
Kata debug console show the shell of android container wrongly instead of the shell of kata guest VM #1749
Description
Description of problem
I enable kata image debug console by rebuild image and verify it works in centos/Ubuntu/busybox container images and i can enter Kata guest VM shell to view kata guest VM info.
But i connect the debug console of a running android container, the debug console will show the android container shell view instead of an kata guest VM shell view.
Expected result
the debug console will show the kata guest VM shell view.
Actual result
- error view of debug console based on a running android container:
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
31bc2e1d785a android:NAe000032 "/android-entry -c 0…" 18 hours ago Up 18 hours 0.0.0.0:5555->5555/tcp android0
5ceff5ce0746 centos "/bin/bash" 18 hours ago Up 18 hours cocky_easley
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# id=$(sudo docker ps -q --no-trunc)
[root@localhost ~]# echo $id
31bc2e1d785a7e1b3bcdca2e967c9284b632941bb29d2fd2a0aed92bb343410a 5ceff5ce074653bbb62902a9cfbc2c57d2e2106935a92d14a72e6942d4ad0515
[root@localhost ~]# console="/var/run/vc/vm/31bc2e1d785a7e1b3bcdca2e967c9284b632941bb29d2fd2a0aed92bb343410a/console.sock"
[root@localhost ~]# sudo socat "stdin,raw,echo=0,escape=0x11" "unix-connect:${console}"
[63414.771188] init: couldn't write 11297 to /dev/cpuset/camera-daemon/tasks: No such file or directory
bash-4.2# ls
bash-4.2# [63419.859353] init: couldn't write 11330 to /dev/cpuset/camera-daemon/tasks: No such file or directory
acct init.environ.rc property_contexts
android-entry init.houdini.rc root
bugreports init.logs.rc sbin
cache init.multidroid.rc sdcard
charger init.multidroid_cloud.rc seapp_contexts
config init.multidroid_cloud.usb.rc selinux_version
d init.rc sepolicy
data init.usb.configfs.rc service_contexts
default.prop init.usb.rc storage
dev init.zygote32.rc sys
etc init.zygote64_32.rc system
file_contexts.bin ipc ueventd.multidroid_cloud.rc
fstab.multidroid_cloud mnt ueventd.rc
init oem vendor
init.crashlogd.rc proc
cloud:/ $ [63429.085860] init: couldn't write 11393 to /dev/cpuset/camera-daemon/tasks: No such file or directory
2)right view of debug console based on a running centos container:
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
31bc2e1d785a android:NAe000032 "/android-entry -c 0…" 18 hours ago Up 18 hours 0.0.0.0:5555->5555/tcp android0
5ceff5ce0746 centos "/bin/bash" 18 hours ago Up 18 hours cocky_easley
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# id=$(sudo docker ps -q --no-trunc)
[root@localhost ~]# echo $id
31bc2e1d785a7e1b3bcdca2e967c9284b632941bb29d2fd2a0aed92bb343410a 5ceff5ce074653bbb62902a9cfbc2c57d2e2106935a92d14a72e6942d4ad0515
[root@localhost ~]# console="/var/run/vc/vm/5ceff5ce074653bbb62902a9cfbc2c57d2e2106935a92d14a72e6942d4ad0515/console.sock"
[root@localhost ~]# sudo socat "stdin,raw,echo=0,escape=0x11" "unix-connect:${console}"
bash-4.2# ls
5ceff5ce074653bbb62902a9cfbc2c57d2e2106935a92d14a72e6942d4ad0515
5ceff5ce074653bbb62902a9cfbc2c57d2e2106935a92d14a72e6942d4ad0515-a4149e9ec4401367-resolv.conf
5ceff5ce074653bbb62902a9cfbc2c57d2e2106935a92d14a72e6942d4ad0515-c5d6b647daabcbfb-hostname
5ceff5ce074653bbb62902a9cfbc2c57d2e2106935a92d14a72e6942d4ad0515-d39b253b36397f78-hosts
bash-4.2# pwd
/run/kata-containers/shared/containers
bash-4.2# cd ..
bash-4.2# cd ..
bash-4.2# cd ..
bash-4.2# ls
dbus kata-containers libcontainer mount sandbox-ns systemd
bash-4.2# cd ..
bash-4.2# ls
bin dev home lib64 media opt root sbin sys usr
boot etc lib lost+found mnt proc run srv tmp var
bash-4.2#
Kata version: 1.7.0