abiosoft / abiosoft/colima

Instance name "colima" too long: colima fails to start when symlink ~/.colima points to a very long UNIX path name

未關閉
#1,036 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Go
星號
30.8k
分支
613
PR 合併指標
30 天內沒有已合併 PR

描述

### Description

~/.colima config is symlink to a dotfiles repository. This dotfiles repository full path is longer than UNIX_PATH_MAX characters. Due to this constraint, colima fails to start.

### Version

_No response_

### Operating System

- [x] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [ ] Apple Silicon >= 14 (Sonoma)
- [ ] Linux

### Output of `colima status`

colima: 0.69
limactl: 0.22.0
qemu-img: 9.0.0

### Reproduction Steps

1. colima start -f
2. colima stop
3. colima destroy
4. mv ~/.colima $HOME/Documents/Developments/DOTFILES_WORKSPACE/dotfiles/
5. ln -s $HOME/Documents/Developments/DOTFILES_WORKSPACE/dotfiles/ ~/.colima
6. colima start -f

> INFO[0000] starting colima
> INFO[0000] runtime: docker
> INFO[0000] creating and starting ... context=vm
> Terminal is not available, proceeding without opening an editor
> instance name "colima" too long: "/Users/davidandreoletti/Documents/Developments/DOTFILES_WORKSPACE/dotfiles/.colima/_lima/colima/ssh.sock.1234567890123456" must be less than UNIX_PATH_MAX=104 characters, but is 121
FATA[0000] error starting vm: error at 'creating and starting': exit status 1

### Expected behaviour

Successful colima start

### Additional context

**Workaround:**
With a user defined `LIMA_HOME` set a to short path (eg: ~/.colima_lima), the issue is gone.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

The error occurs when constructing the socket path for the Lima VM. Look in the codebase for where the instance directory path is built, likely in the VM creation or SSH socket setup. The path includes the symlink resolution. Check the `lima` integration and the handling of `LIMA_HOME`. The fix is to ensure the resolved path length is under UNIX_PATH_MAX, possibly by using a shorter base directory or truncating. Run the reproduction steps to verify the fix.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
docker, go, shell
領域
cli, developer-experience
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
描述清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。