coder / coder/envbox

`CODER_MOUNTS` and `/envbox docker --mounts` CernVM-FS issue

Đang mở
#55 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
73
Fork
22
Merge trung bình
9 giờ 44 phút
Pull request đã merge (30 ngày)
2

Mô tả

I am running coder on a k8s cluster. My outer container is the a modified envbox docker image that has cvmfs installed (without installing it mounting doesn't work). My inner container is an Ubuntu 20:04 image with cvmfs installed as well (just to be safe).

My outer container has cvmfs mount with a HostToContainer mount propagation. However, whether through `CODER_MOUNTS` or `/envbox docker --mounts`, I face issues mounting my cvmfs from the outer to the inner container.

The command:
```
/envbox docker --mounts /tools/Xilinx:/tools/Xilinx:ro
```

The output (trimmed):
```
{"output":"Failed to run envbox: remount: mount failed: exit status 2\nMounting command: mount\nMounting arguments: -o remount,rw /tools/Xilinx\nOutput: The CernVM File System\nVersion 2.11.0\nCopyright (c) 2009- CERN, all rights reserved\n\nPlease visit http://cernvm.cern.ch for details.\n\nUsage: cvmfs2 [-h] [-V] [-s] [-f] [-d] [-k] [-o mount options] \u003crepository name\u003e \u003cmount point\u003e\n\nCernVM-FS general options:\n --help|-h Print Help output (this)\n --version|-V Print CernVM-FS version\n -s Run singlethreaded\n -f Run in foreground\n -d Enable debugging\n -k Parse options\nCernVM-FS mount options:\n -o config=FILES colon-separated path list of config files\n -o uid=UID Drop credentials to another user\n -o gid=GID Drop credentials to another group\n -o system_mount Indicate that mount is system-wide\n -o grab_mountpoint give ownership of the mountpoint to the user before mounting (required for autofs)\n -o parse Parse and print cvmfs parameters\n -o cvmfs_suid Enable suid mode\n\n -o disable_watchdog Do not spawn a post mortem crash handler\n -o foreground Run in foreground\n -o libfuse=[2,3] Enforce a certain libfuse version\nFuse mount options:\n -o allow_other allow access to other users\n -o allow_root allow access to root\n -o nonempty allow mounts over non-empty directory\n\n","time":"2023-10-14T12:44:13.421245546-07:00","type":"error"}
{"output":"Failed to run envbox: run: remount: mount failed: exit status 2\nMounting command: mount\nMounting arguments: -o remount,rw /tools/Xilinx\nOutput: The CernVM File System\nVersion 2.11.0\nCopyright (c) 2009- CERN, all rights reserved\n\nPlease visit http://cernvm.cern.ch for details.\n\nUsage: cvmfs2 [-h] [-V] [-s] [-f] [-d] [-k] [-o mount options] \u003crepository name\u003e \u003cmount point\u003e\n\nCernVM-FS general options:\n --help|-h Print Help output (this)\n --version|-V Print CernVM-FS version\n -s Run singlethreaded\n -f Run in foreground\n -d Enable debugging\n -k Parse options\nCernVM-FS mount options:\n -o config=FILES colon-separated path list of config files\n -o uid=UID Drop credentials to another user\n -o gid=GID Drop credentials to another group\n -o system_mount Indicate that mount is system-wide\n -o grab_mountpoint give ownership of the mountpoint to the user before mounting (required for autofs)\n -o parse Parse and print cvmfs parameters\n -o cvmfs_suid Enable suid mode\n\n -o disable_watchdog Do not spawn a post mortem crash handler\n -o foreground Run in foreground\n -o libfuse=[2,3] Enforce a certain libfuse version\nFuse mount options:\n -o allow_other allow access to other users\n -o allow_root allow access to root\n -o nonempty allow mounts over non-empty directory\n\n","time":"2023-10-14T12:44:13.421327848-07:00","type":"error"}
{"output":"","time":"2023-10-14T12:44:13.421404419-07:00","type":"done"}
{"ts":"2023-10-14T19:44:13.421414299Z","level":"ERROR","msg":"send startup logs","caller":"/home/runner/work/envbox/envbox/buildlog/coder.go:116","func":"github.com/coder/envbox/buildlog.(*CoderLogger).processLogs.func1","fields":{"error":"Patch \"https://coder.nrp-nautilus.io/api/v2/workspaceagents/me/startup-logs\": context canceled"}}
run: remount: mount failed: exit status 2
Mounting command: mount
Mounting arguments: -o remount,rw /tools/Xilinx
Output: The CernVM File System
Version 2.11.0
Copyright (c) 2009- CERN, all rights reserved

Please visit http://cernvm.cern.ch for details.

Usage: cvmfs2 [-h] [-V] [-s] [-f] [-d] [-k] [-o mount options]

CernVM-FS general options:
--help|-h Print Help output (this)
--version|-V Print CernVM-FS version
-s Run singlethreaded
-f Run in foreground
-d Enable debugging
-k Parse options
CernVM-FS mount options:
-o config=FILES colon-separated path list of config files
-o uid=UID Drop credentials to another user
-o gid=GID Drop credentials to another group
-o system_mount Indicate that mount is system-wide
-o grab_mountpoint give ownership of the mountpoint to the user before mounting (required for autofs)
-o parse Parse and print cvmfs parameters
-o cvmfs_suid Enable suid mode

-o disable_watchdog Do not spawn a post mortem crash handler
-o foreground Run in foreground
-o libfuse=[2,3] Enforce a certain libfuse version
Fuse mount options:
-o allow_other allow access to other users
-o allow_root allow access to root
-o nonempty allow mounts over non-empty directory
```

I also tried mounting without installing cvmfs. That also fails on command cvmfs2 is not installed.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lệnh `/envbox docker --mounts /tools/Xilinx:/tools/Xilinx:ro` và so sánh lệnh đó với đường dẫn của `CODER_MOUNTS`. Lỗi khởi động được báo cáo trỏ đến `buildlog/coder.go:116`, trong khi hành vi mount được cung cấp thông qua entry point `/envbox docker`. Hoàn tất khi mount CernVM-FS được báo cáo không còn thất bại với lỗi remount.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
docker, go, kubernetes
Lĩnh vực
cli, devops
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.