abiosoft / abiosoft/colima

FreeBSD support

Offen
#1,044 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
30.8k
Forks
613
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, go, shell
Bereich
cli, infrastructure, operating-systems
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.