abiosoft / abiosoft/colima

FreeBSD support

Đang mở
#1,044 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
30.8k
Fork
613
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Description

I use colima at work, and would like to use it on my personal systems as well. Unfortunately, I use FreeBSD for the majority of my home use.

I've gotten both `lima` and `colima` compiled from source and almost working properly. When I do a `colima start`, we fail on the `cloud-final` service. I've traced it to a problem with `/mnt/lima-cidata/provision.dependency/00000001`:

```
Jun 18 14:32:03 colima cloud-init[1452]: Detected dependency provisioning scripts, running before default dependency installation
Jun 18 14:32:03 colima cloud-init[1452]: + CODE=0
Jun 18 14:32:03 colima cloud-init[1452]: + /mnt/lima-cidata/provision.dependency/00000001
Jun 18 14:32:03 colima cloud-init[1452]: Usage: usermod [options] LOGIN
Jun 18 14:32:03 colima cloud-init[1452]: Options:
Jun 18 14:32:03 colima cloud-init[1452]: -a, --append append the user to the supplemental GROUPS
Jun 18 14:32:03 colima cloud-init[1452]: mentioned by the -G option without removing
Jun 18 14:32:03 colima cloud-init[1452]: the user from other groups
Jun 18 14:32:03 colima cloud-init[1452]: -b, --badname allow bad names
Jun 18 14:32:03 colima cloud-init[1452]: -c, --comment COMMENT new value of the GECOS field
Jun 18 14:32:03 colima cloud-init[1452]: -d, --home HOME_DIR new home directory for the user account
Jun 18 14:32:03 colima cloud-init[1452]: -e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
Jun 18 14:32:03 colima cloud-init[1452]: -f, --inactive INACTIVE set password inactive after expiration
Jun 18 14:32:03 colima cloud-init[1452]: to INACTIVE
Jun 18 14:32:03 colima cloud-init[1452]: -g, --gid GROUP force use GROUP as new primary group
Jun 18 14:32:03 colima cloud-init[1452]: -G, --groups GROUPS new list of supplementary GROUPS
Jun 18 14:32:03 colima cloud-init[1452]: -h, --help display this help message and exit
Jun 18 14:32:03 colima cloud-init[1452]: -l, --login NEW_LOGIN new value of the login name
Jun 18 14:32:03 colima cloud-init[1452]: -L, --lock lock the user account
Jun 18 14:32:03 colima cloud-init[1452]: -m, --move-home move contents of the home directory to the
Jun 18 14:32:03 colima cloud-init[1452]: new location (use only with -d)
Jun 18 14:32:03 colima cloud-init[1452]: -o, --non-unique allow using duplicate (non-unique) UID
Jun 18 14:32:03 colima cloud-init[1452]: -p, --password PASSWORD use encrypted password for the new password
Jun 18 14:32:03 colima cloud-init[1452]: -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files
Jun 18 14:32:03 colima cloud-init[1452]: -r, --remove remove the user from only the supplemental GROUPS
Jun 18 14:32:03 colima cloud-init[1452]: mentioned by the -G option without removing
Jun 18 14:32:03 colima cloud-init[1452]: the user from other groups
Jun 18 14:32:03 colima cloud-init[1452]: -R, --root CHROOT_DIR directory to chroot into
Jun 18 14:32:03 colima cloud-init[1452]: -s, --shell SHELL new login shell for the user account
Jun 18 14:32:03 colima cloud-init[1452]: -u, --uid UID new UID for the user account
Jun 18 14:32:03 colima cloud-init[1452]: -U, --unlock unlock the user account
Jun 18 14:32:03 colima cloud-init[1452]: -v, --add-subuids FIRST-LAST add range of subordinate uids
Jun 18 14:32:03 colima cloud-init[1452]: -V, --del-subuids FIRST-LAST remove range of subordinate uids
Jun 18 14:32:03 colima cloud-init[1452]: -w, --add-subgids FIRST-LAST add range of subordinate gids
Jun 18 14:32:03 colima cloud-init[1452]: -W, --del-subgids FIRST-LAST remove range of subordinate gids
Jun 18 14:32:03 colima cloud-init[1452]: -Z, --selinux-user SEUSER new SELinux user mapping for the user account
Jun 18 14:32:03 colima cloud-init[1452]: + CODE=1
Jun 18 14:32:03 colima cloud-init[1452]: + /mnt/lima-cidata/provision.dependency/00000003
Jun 18 14:32:03 colima cloud-init[1452]: /usr/bin/sshfs
Jun 18 14:32:03 colima cloud-init[1452]: + [ 1 != 0 ]
Jun 18 14:32:03 colima cloud-init[1452]: + exit 1
```

It seems that the `{{ .User }}` variable isn't getting set properly. I've tried with both `sh` and `bash` just to be sure, but no help there.

EDIT: I hard-coded my user account in place of the User variable, which allowed all of the scripts to complete successfully. However, the docker version I am using is too old to understand contexts. I guess that needs to be done first.

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

The issue points to a provisioning script at /mnt/lima-cidata/provision.dependency/00000001 where the {{ .User }} variable is not being set on FreeBSD. Look at the colima and lima source code for how user variables are passed during VM provisioning, especially for non-Linux systems. The goal is to make the user variable substitution work on FreeBSD so the cloud-init scripts complete. After fixing the variable, ensure the Docker version supports contexts, as noted.

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, shell
Lĩnh vực
cli, infrastructure, operating-systems
Loại issue
Tính năng
Độ 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.