abiosoft / abiosoft/colima

FreeBSD support

オープン
#1,044 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
30.8k
フォーク
613
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, go, shell
領域
cli, infrastructure, operating-systems
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。