abiosoft / abiosoft/colima

Provision scripts are ignored when VM is just created

Đang mở
#1,060 2 bình luận 3 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

Provision scripts are ignored when we start VM first time (create it)

### Version

```shell
colima version 0.6.9
git commit: c3a31ed05f5fab8b2cdbae835198e8fb1717fd0f

runtime: docker
arch: aarch64
client: v27.0.3
server: v26.1.1
limactl version 0.22.0
qemu-img version 9.0.1
Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers
```

### Operating System

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

### Output of `colima status`

```shell
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/alexandr/.colima/default/docker.sock
INFO[0000] kubernetes: enabled
````

### Reproduction Steps

1. Add `provision` block in template as follows:

```yaml
provision:
- mode: system
script: |
cat < /etc/systemd/system/docker.service.d/docker-buildkit-env.conf
[Service]
Environment="BUILDKIT_STEP_LOG_MAX_SIZE=20971520"
Environment="BUILDKIT_STEP_LOG_MAX_SPEED=1048576"
EOF
systemctl daemon-reload
systemctl restart docker
```

2. Clean install VM

```shell
colima start
```

3. Check that file is not present: `colima ssh -- ls /etc/systemd/system/docker.service.d`

4. Stop and start again
```shell
colima stop && colima start
```

5. Now file is present

### Expected behaviour

Provision scripts should be considered when we do `start` first time

### Additional context

As a workaround we can use `colima start --edit` but just save template without changes. In this case, scripts will be run

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

Đánh giá

Issue này chưa được đánh giá.

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.