Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
This repository was archived by the owner on May 12, 2021. It is now read-only.

Kata debug console show the shell of android container wrongly instead of the shell of kata guest VM #1749

@zhiminghufighting

Description

@zhiminghufighting

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.

https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#create-a-custom-image-containing-a-shell

Expected result

the debug console will show the kata guest VM shell view.

Actual result

  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions