Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

youki run bug #1627

Closed
lengrongfu opened this issue Mar 6, 2023 · 3 comments · Fixed by #1656
Closed

youki run bug #1627

lengrongfu opened this issue Mar 6, 2023 · 3 comments · Fixed by #1656
Assignees

Comments

@lengrongfu
Copy link
Collaborator

After using the config.json as follows to start the container, the tty cannot enter the container, and the interaction of the current terminal is affected.

But I use runc run test without any problem.

$ youki run test
$ cat config.json
{
  "ociVersion": "1.0.2-dev",
  "root": {
    "path": "rootfs",
    "readonly": true
  },
  "mounts": [
    {
      "destination": "/proc",
      "type": "proc",
      "source": "proc"
    },
    {
      "destination": "/dev",
      "type": "tmpfs",
      "source": "tmpfs",
      "options": [
        "nosuid",
        "strictatime",
        "mode=755",
        "size=65536k"
      ]
    },
    {
      "destination": "/dev/pts",
      "type": "devpts",
      "source": "devpts",
      "options": [
        "nosuid",
        "noexec",
        "newinstance",
        "ptmxmode=0666",
        "mode=0620",
        "gid=5"
      ]
    },
    {
      "destination": "/dev/shm",
      "type": "tmpfs",
      "source": "shm",
      "options": [
        "nosuid",
        "noexec",
        "nodev",
        "mode=1777",
        "size=65536k"
      ]
    },
    {
      "destination": "/dev/mqueue",
      "type": "mqueue",
      "source": "mqueue",
      "options": [
        "nosuid",
        "noexec",
        "nodev"
      ]
    },
    {
      "destination": "/sys",
      "type": "sysfs",
      "source": "sysfs",
      "options": [
        "nosuid",
        "noexec",
        "nodev",
        "ro"
      ]
    },
    {
      "destination": "/sys/fs/cgroup",
      "type": "cgroup",
      "source": "cgroup",
      "options": [
        "nosuid",
        "noexec",
        "nodev",
        "relatime",
        "ro"
      ]
    }
  ],
  "process": {
    "terminal": true,
    "user": {
      "uid": 0,
      "gid": 0
    },
    "args": [
      "sh"
    ],
    "env": [
      "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
      "TERM=xterm"
    ],
    "cwd": "/",
    "capabilities": {
      "bounding": [
        "CAP_NET_BIND_SERVICE",
        "CAP_AUDIT_WRITE",
        "CAP_KILL"
      ],
      "effective": [
        "CAP_NET_BIND_SERVICE",
        "CAP_AUDIT_WRITE",
        "CAP_KILL"
      ],
      "inheritable": [
        "CAP_NET_BIND_SERVICE",
        "CAP_AUDIT_WRITE",
        "CAP_KILL"
      ],
      "permitted": [
        "CAP_NET_BIND_SERVICE",
        "CAP_AUDIT_WRITE",
        "CAP_KILL"
      ],
      "ambient": [
        "CAP_NET_BIND_SERVICE",
        "CAP_AUDIT_WRITE",
        "CAP_KILL"
      ]
    },
    "rlimits": [
      {
        "type": "RLIMIT_NOFILE",
        "hard": 1024,
        "soft": 1024
      }
    ],
    "noNewPrivileges": true
  },
  "hostname": "youki",
  "annotations": {},
  "linux": {
    "resources": {
      "devices": [
        {
          "allow": false,
          "type": null,
          "major": null,
          "minor": null,
          "access": "rwm"
        }
      ]
    },
    "namespaces": [
      {
        "type": "pid"
      },
      {
        "type": "network"
      },
      {
        "type": "ipc"
      },
      {
        "type": "uts"
      },
      {
        "type": "mount"
      }
    ],
    "maskedPaths": [
      "/proc/acpi",
      "/proc/asound",
      "/proc/kcore",
      "/proc/keys",
      "/proc/latency_stats",
      "/proc/timer_list",
      "/proc/timer_stats",
      "/proc/sched_debug",
      "/sys/firmware",
      "/proc/scsi"
    ],
    "readonlyPaths": [
      "/proc/bus",
      "/proc/fs",
      "/proc/irq",
      "/proc/sys",
      "/proc/sysrq-trigger"
    ]
  }
}

[WARN crates/libcgroups/src/v2/util.rs:41] 2023-03-06T21:58:53.973262713+08:00 Controller rdma is not yet implemented.
[WARN crates/libcgroups/src/v2/util.rs:41] 2023-03-06T21:58:53.973338213+08:00 Controller misc is not yet implemented.
[WARN crates/libcgroups/src/v2/util.rs:41] 2023-03-06T21:58:53.998639552+08:00 Controller rdma is not yet implemented.
[WARN crates/libcgroups/src/v2/util.rs:41] 2023-03-06T21:58:53.998650243+08:00 Controller misc is not yet implemented.
[WARN crates/libcontainer/src/process/container_init_process.rs:90] 2023-03-06T21:58:54.000487853+08:00 masked path "/proc/latency_stats" not exist
[WARN crates/libcontainer/src/process/container_init_process.rs:90] 2023-03-06T21:58:54.000518790+08:00 masked path "/proc/timer_stats" not exist
[WARN crates/libcontainer/src/process/container_init_process.rs:90] 2023-03-06T21:58:54.000528385+08:00 masked path "/proc/sched_debug" not exist
sh: can't access tty; job control turned off

Os info

$ uname -a
Linux k8s-master 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

youki version info

$ youki -V
youki version 0.0.4
commit: 0.0.4-0-174448a
@utam0k
Copy link
Member

utam0k commented Mar 7, 2023

@lengrongfu Thanks for your report! This issue has duplicated this one, right?
#317

@yihuaf yihuaf added the bug label Mar 8, 2023
@yihuaf yihuaf self-assigned this Mar 8, 2023
@lengrongfu
Copy link
Collaborator Author

@lengrongfu Thanks for your report! This issue has duplicated this one, right? #317

Yes.

@utam0k
Copy link
Member

utam0k commented Mar 11, 2023

Dup #317

@utam0k utam0k closed this as completed Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants