abiosoft / abiosoft/colima

virtiofs, weird behaviour with extended attributes, and amazonlinux2 docker image

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

説明

### Description

hello,

I am trying to understand the root cause of the following issue with the `amazonlinux:2` docker image. Whenever I run `cp` inside of a running container the command behaves differently depending on the mount-type filesystem specified. Please check the repo-steps below where I was trying to run `cp -au . dst-dir` in 3 different scenarios. The first one was unexpectedly failing with `No data available`, while the other two were working as expected, in all test-cases the `cp` command was the same.

### Version

```
colima version 0.7.3
git commit: a66b375e8df84ff2860797efc683e66632bcbce3
limactl version 0.23.1
qemu-img version 9.0.2
```

### Operating System

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

### Output of `colima status`

Please check the repro-steps below.

### Reproduction Steps

Prepare a sample directory structure:

```terminal
$ mkdir test ; cd test
$ mkdir src ; mkdir result
$ echo 'empty file' | tee ./src/dummy
```

Check a negative test-case scenario (expected - **success**, received - **failure**):

```terminal
$ colima start colima-arm --cpu 2 --memory 4 --disk 20 --arch aarch64 --vm-type=vz --vz-rosetta --mount-type=virtiofs
INFO[0000] starting colima [profile=arm]
INFO[0000] runtime: docker
INFO[0001] creating and starting ... context=vm
INFO[0012] provisioning ... context=docker
INFO[0013] starting ... context=docker
INFO[0014] done
$ colima status colima-arm
INFO[0000] colima [profile=arm] is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/user.name/.colima/arm/docker.sock
$ docker run -i --rm -u 0:0 -v $(pwd)/src:/asset-input:delegated -v $(pwd)/result:/asset-output:delegated -w /asset-input amazonlinux:2 \
bash -c 'yum install -y -q util-linux; findmnt /asset-input; cp -au . /asset-output'
Failed to get D-Bus connection: Operation not permitted
TARGET SOURCE FSTYPE OPTIONS
/asset-input mount0[/temp/test/src] virtiofs rw,relatime
/usr/bin/cp: preserving permissions for '/asset-output/.': No data available
$ echo $?
1
$ colima delete colima-arm -f
```

Check a positive test-case scenario (vz, expected - **success**, received - **success**):

```terminal
$ colima start colima-arm --cpu 2 --memory 4 --disk 20 --arch aarch64 --vm-type=qemu --cpu-type=host --mount-type=sshfs
INFO[0000] starting colima [profile=arm]
INFO[0000] runtime: docker
INFO[0000] creating and starting ... context=vm
INFO[0011] provisioning ... context=docker
INFO[0012] starting ... context=docker
INFO[0013] done
$ colima status colima-arm
INFO[0000] colima [profile=arm] is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:///Users/user.name/.colima/arm/docker.sock
$ docker run -i --rm -u 0:0 -v $(pwd)/src:/asset-input:delegated -v $(pwd)/result:/asset-output:delegated -w /asset-input amazonlinux:2 \
bash -c 'yum install -y -q util-linux; findmnt /asset-input; cp -au . /asset-output'
Failed to get D-Bus connection: Operation not permitted
TARGET SOURCE FSTYPE OPTIONS
/asset-input :/Users/user.name[/temp/test/src] fuse.sshfs rw,nosuid,nodev,relatime,user_id=502,group_id=1000,allow_other
$ echo $?
0
$ colima delete colima-arm -f
```

Check a positive test-case scenario (rosetta, expected - **success**, received - **success**):

```terminal
$ colima start colima-arm --cpu 2 --memory 4 --disk 20 --arch aarch64 --vm-type=vz --vz-rosetta --mount-type=sshfs
INFO[0000] starting colima [profile=arm]
INFO[0000] runtime: docker
INFO[0000] creating and starting ... context=vm
INFO[0011] provisioning ... context=docker
INFO[0012] starting ... context=docker
INFO[0013] done
$ colima status colima-arm
INFO[0000] colima [profile=arm] is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:///Users/user.name/.colima/arm/docker.sock
$ docker run -i --rm -u 0:0 -v $(pwd)/src:/asset-input:delegated -v $(pwd)/result:/asset-output:delegated -w /asset-input amazonlinux:2 \
bash -c 'yum install -y -q util-linux; findmnt /asset-input; cp -au . /asset-output'
docker run -i --rm -u 0:0 -v $(pwd)/src:/asset-input:delegated -v $(pwd)/result:/asset-output:delegated -w /asset-input amazonlinux:2 bash -c 'yum install -y -q util-linux; findmnt /asset-input; cp -au . /asset-output'
Failed to get D-Bus connection: Operation not permitted
TARGET SOURCE FSTYPE OPTIONS
/asset-input :/Users/user.name[/temp/test/src] fuse.sshfs rw,nosuid,nodev,relatime,user_id=502,group_id=1000,allow_other
$ echo $?
0
$ colima delete colima-arm -f
```

### Expected behaviour

I would like to understand what's wrong with the `virtiofs` file-system, and make sure that `cp` command works as expected.

### Additional context

if I try colima `0.5.6`, it doesn't have this issue

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

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

評価

この issue はまだ評価されていません。

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

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