Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v0.14.0 regression, fixed in v0.14.1] On colima, docker data become invisible (but not removed) ; /var/lib/docker is unmounted #1242

Closed
AkihiroSuda opened this issue Dec 14, 2022 · 3 comments · Fixed by #1243
Labels

Comments

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Dec 14, 2022

On colima, docker data such as containers and images in /var/lib/docker become invisible after upgrading Lima from v0.13.0 to v0.14.0

colima start
docker pull hello-world
colima stop

brew upgrade
colima start
docker images

The data are not removed though, and can be rescued by downgrading Lima to v0.13.0

brew uninstall lima
git clone https://github.com/lima-vm/lima.git
cd lima
git checkout v0.13.0
make
make install

Apparently the issue seems specific to colima, and not reproducible with the vanilla Lima templates.
Tested the default template (nerdctl pull hello-world) and alpine template (sudo touch /var/lib/foo, as the vanilla alpine template does not contain container runtime).


Originally reported in abiosoft/colima#506
Thanks to @rpkoller and @rfay for reporting.

@AkihiroSuda
Copy link
Member Author

df result

v0.13.0

$ limactl -v
limactl version 0.13.0

$ colima ssh df
Filesystem           1K-blocks      Used Available Use% Mounted on
devtmpfs                 10240         0     10240   0% /dev
shm                    1016016         0   1016016   0% /dev/shm
/dev/sr0                283648    283648         0 100% /media/sr0
tmpfs                  1016016    523444    492572  52% /
tmpfs                   406408       408    406000   0% /run
/dev/loop0               14464     14464         0 100% /.modloop
cgroup_root              10240         0     10240   0% /sys/fs/cgroup
/dev/disk/by-label/cidata
                          7082      7082         0 100% /mnt/lima-cidata
/dev/disk/by-label/data-volume
                      61610796    152416  58296320   0% /mnt/data
/dev/disk/by-label/data-volume
                      61610796    152416  58296320   0% /etc
/dev/disk/by-label/data-volume
                      61610796    152416  58296320   0% /home
/dev/disk/by-label/data-volume
                      61610796    152416  58296320   0% /root
/dev/disk/by-label/data-volume
                      61610796    152416  58296320   0% /tmp
/dev/disk/by-label/data-volume
                      61610796    152416  58296320   0% /usr/local
/dev/disk/by-label/data-volume
                      61610796    152416  58296320   0% /var/lib
:/Users/suda         3908112996 529014388 3379098608  14% /Users/suda
:/tmp/colima         3908112996 529014388 3379098608  14% /tmp/colima
/dev/disk/by-label/data-volume
                      61610796    152416  58296320   0% /var/lib/docker

v0.14.0

$ limactl -v
limactl version 0.14.0

$ colima ssh df
Filesystem           1K-blocks      Used Available Use% Mounted on
devtmpfs                 10240         0     10240   0% /dev
shm                    1016016         0   1016016   0% /dev/shm
/dev/sr0                283648    283648         0 100% /media/sr0
tmpfs                  1016016    530620    485396  52% /
tmpfs                   406408       408    406000   0% /run
/dev/loop0               14464     14464         0 100% /.modloop
cgroup_root              10240         0     10240   0% /sys/fs/cgroup
/dev/disk/by-label/cidata
                          7086      7086         0 100% /mnt/lima-cidata
:/Users/suda         3908112996 529017852 3379095144  14% /Users/suda
:/tmp/colima         3908112996 529017852 3379095144  14% /tmp/colima
tmpfs                  1016016    530620    485396  52% /var/lib/docker

@AkihiroSuda
Copy link
Member Author

/var/log/cloud-init-output.log (v0.14.0)

...
LIMA| Executing /mnt/lima-cidata/boot/04-persistent-data-volume.sh
+ test -f /etc/alpine-release
+ DATADIRS='/etc /home /root /tmp /usr/local /var/lib'
+ awk '$2 == "/" {print $3}' /proc/mounts
+ '[' tmpfs '==' tmpfs ]
+ mkdir -p /mnt/data
+ '[' -e /dev/disk/by-label/data-volume ]
+ blkid
+ awk '{split($0,s,":"); sub(/\d$/, "", s[1]); print s[1]};'
+ grep data-volume
+ DATA_DISK=/dev/vda
+ growpart /dev/vda 1
/mnt/lima-cidata/boot/04-persistent-data-volume.sh: line 20: growpart: not found
+ true
+ e2fsck -f -p /dev/disk/by-label/data-volume
data-volume: 774/3932160 files (0.6% non-contiguous), 363789/15728384 blocks
+ resize2fs /dev/disk/by-label/data-volume
/mnt/lima-cidata/boot/04-persistent-data-volume.sh: line 23: resize2fs: not found
...

@AkihiroSuda AkihiroSuda pinned this issue Dec 14, 2022
@AkihiroSuda AkihiroSuda changed the title [v0.14.0 regression] On colima, docker data become invisible (/var/lib/docker is unmounted) [v0.14.0 regression] On colima, docker data become invisible (but not removed) ; /var/lib/docker is unmounted Dec 14, 2022
@AkihiroSuda
Copy link
Member Author

AkihiroSuda commented Dec 14, 2022

This was fixed in Lima v0.14.1.
The hidden docker data are not actually removed, and can be rescued by upgrading Lima to v0.14.1 (or downgrading to v0.13.0).

Available in Homebrew

@AkihiroSuda AkihiroSuda changed the title [v0.14.0 regression] On colima, docker data become invisible (but not removed) ; /var/lib/docker is unmounted [v0.14.0 regression, fixed in v0.14.1] On colima, docker data become invisible (but not removed) ; /var/lib/docker is unmounted Dec 14, 2022
@AkihiroSuda AkihiroSuda unpinned this issue Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant