abiosoft / abiosoft/colima

FreeBSD support

Aperta
#1,044 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
30.8k
Fork
613
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

La issue fa riferimento a uno script di provisioning in /mnt/lima-cidata/provision.dependency/00000001 in cui la variabile {{ .User }} non viene impostata su FreeBSD. Esamina il codice sorgente di colima e lima per vedere come vengono passate le variabili utente durante il provisioning della VM, soprattutto per i sistemi non Linux. L’obiettivo è fare in modo che la sostituzione della variabile utente funzioni su FreeBSD, così che gli script cloud-init vengano completati. Dopo aver corretto la variabile, assicurati che la versione di Docker supporti contexts, come indicato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
docker, go, shell
Ambito
cli, infrastructure, operating-systems
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.