concourse / concourse-docker

Offical concourse/concourse Docker image.
Apache License 2.0
241 stars 153 forks source link

Concourse docker image is missing 'file' binary used by btrfs driver. #38

Closed mplzik closed 5 years ago

mplzik commented 5 years ago

The baggageclaim's btrfs driver is using 'file' to identify whether a volume.img is a btrfs image [1]. Since concourse docker image is missing this file, the check fails [2], invoking an attempt to create btrfs filesystem which then fails. In my case (running in kubernetes), this prevented the worker to start correctly, crashlooping in the process.

[1] https://github.com/concourse/baggageclaim/blob/master/fs/btrfs.go#L45 [2]

+ '[' '!' -e /concourse-work-dir/volumes.img ']'
++ stat --printf=%s /concourse-work-dir/volumes.img
+ '[' 199567056896 '!=' 199567056896 ']'
++ losetup -j /concourse-work-dir/volumes.img
++ cut -d: -f1
+ lo=/dev/loop0
+ '[' -z /dev/loop0 ']'
+ file /concourse-work-dir/volumes.img
bash: line 11: file: command not found
+ grep BTRFS
+ mkfs.btrfs --nodiscard /concourse-work-dir/volumes.img
/concourse-work-dir/volumes.img appears to contain an existing filesystem (btrfs).
ERROR: use the -f option to force overwrite of /concourse-work-dir/volumes.img
"    
   stdout:  "btrfs-progs v4.15.1
See http://btrfs.wiki.kernel.org for more information.

"    
vito commented 5 years ago

Opened a PR for this here: https://github.com/concourse/concourse/pull/3601 - I'll close before I forget this since the PR can't auto-close it. Thanks for the report!