You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When restarting a worker (or rebooting the machine), 3.11.0 workers fail to start if the volumes.img already exists.
Removing the file allows the worker to start, but fails on next restart/reboot.
Reacted by Jeff Billimek, Marco Molteni, Paweł Rein, Anthony Periquet, Sam Flint, Denis Gukov and Michael Chen
{"timestamp":"1523969394.548230410","source":"baggageclaim","message":"baggageclaim.fs.run-command.failed","log_level":2,"data":{"args":["bash","-e","-x","-c","\n\t\tif [ ! -e $IMAGE_PATH ] || [ \"$(stat --printf=\"%s\" $IMAGE_PATH)\" != \"$SIZE_IN_BYTES\" ]; ...
{"timestamp":"1523969394.548875570","source":"baggageclaim","message":"baggageclaim.failed-to-set-up-driver","log_level":2,"data":{"error":"failed to create btrfs filesystem: exit status 1"}}failed to create btrfs filesystem: exit status 1
Main process exited, code=exited, status=1/FAILURE
My current workaround it to just run rm on the volumes.img before starting the workers, since the db migrations makes it so you cannot run the older version of the web command.
I think this is a bug in ubuntu or docker, not in concourse. I had the same issue (at least same log errors) on 3.10.0 this morning. Mine was volumes mounted through overlayfs instead of volumes.img, but it was the same baggage claim errors. The solution for me was to umount the overlayfs, reboot, and I was fine.
We've seen this type of error in our installation too. Running in a similar setup:
Deployment type (BOSH/Docker/binary): docker
Infrastructure/IaaS: Ubuntu 16.04 VM
We sometimes see this when someone needs to make an update to the docker-compose.yml and/or destroy and re-create the worker for whatever reason. When they start up the new worker, there are problems with the worker not starting properly or error about the volumes.img file. It doesn't seem like a very clean solution to have to delete this file first before starting a new worker.
{"timestamp":"1527614154.821579218","source":"baggageclaim","message":"baggageclaim.fs.run-command.failed","log_level":2,"data":{"args":["bash","-e","-x","-c","\n\t\tif [ ! -e $IMAGE_PATH ] || [ \"$(stat --printf=\"%s\" $IMAGE_PATH)\" != \"$SIZE_IN_BYTES\" ]; then\n\t\t\ttouch $IMAGE_PATH\n\t\t\ttruncate -s ${SIZE_IN_BYTES} $IMAGE_PATH\n\t\tfi\n\n\t\tlo=\"$(losetup -j $IMAGE_PATH | cut -d':' -f1)\"\n\t\tif [ -z \"$lo\" ]; then\n\t\t\tlo=\"$(losetup -f --show $IMAGE_PATH)\"\n\t\tfi\n\n\t\tif ! file $IMAGE_PATH | grep BTRFS; then\n\t\t\t/worker-state/3.13.0/assets/btrfs/mkfs.btrfs --nodiscard $IMAGE_PATH\n\t\tfi\n\n\t\tmkdir -p $MOUNT_PATH\n\n\t\tif ! mountpoint -q $MOUNT_PATH; then\n\t\t\tmount -t btrfs $lo $MOUNT_PATH\n\t\tfi\n\t"],"command":"/bin/bash","env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","MOUNT_PATH=/worker-state/volumes","IMAGE_PATH=/worker-state/volumes.img","SIZE_IN_BYTES=90464333824"],"error":"exit status 1","session":"3.1","stderr":"+ '[' '!' -e /worker-state/volumes.img ']'\n++ stat --printf=%s /worker-state/volumes.img\n+ '[' 90464333824 '!=' 90464333824 ']'\n++ losetup -j /worker-state/volumes.img\n++ cut -d: -f1\n+ lo=/dev/loop0\n+ '[' -z /dev/loop0 ']'\n+ file /worker-state/volumes.img\n+ grep BTRFS\nbash: line 11: file: command not found\n+ /worker-state/3.13.0/assets/btrfs/mkfs.btrfs --nodiscard /worker-state/volumes.img\n/worker-state/volumes.img appears to contain an existing filesystem (btrfs).\nERROR: use the -f option to force overwrite of /worker-state/volumes.img\n","stdout":"btrfs-progs v4.15\nSee http://btrfs.wiki.kernel.org for more information.\n\n"}}
{"timestamp":"1527614154.821689367","source":"baggageclaim","message":"baggageclaim.failed-to-set-up-driver","log_level":2,"data":{"error":"failed to create btrfs filesystem: exit status 1"}}
stderr:
failed to create btrfs filesystem: exit status 1
failed to create btrfs filesystem: exit status 1
failed to create btrfs filesystem: exit status 1
failed to create btrfs filesystem: exit status 1
[etc]
This adds significant delay to the startup time of the system if I have to do a complete reboot, while Concourse figures out what workers it actually has: Orange. Orange warnings everywhere. D:
When running via docker-compose, if the worker container crashes and restarts (say due to a OOM error) - or even during any type of restart - we frequently see something like,
{"timestamp":"1533239376.210015059","source":"baggageclaim","message":"baggageclaim.fs.run-command.failed","log_level":2,"data":{"args":["bash","-e","-x","-c","\n\t\tif [ ! -e $IMAGE_PATH ] || [ \"$(stat --printf=\"%s\" $IMAGE_PATH)\" != \"$SIZE_IN_BYTES\" ]; then\n\t\t\ttouch $IMAGE_PATH\n\t\t\ttruncate -s ${SIZE_IN_BYTES} $IMAGE_PATH\n\t\tfi\n\n\t\tlo=\"$(losetup -j $IMAGE_PATH | cut -d':' -f1)\"\n\t\tif [ -z \"$lo\" ]; then\n\t\t\tlo=\"$(losetup -f --show $IMAGE_PATH)\"\n\t\tfi\n\n\t\tif ! file $IMAGE_PATH | grep BTRFS; then\n\t\t\t/opt/concourse/4.0.0/assets/btrfs/mkfs.btrfs --nodiscard $IMAGE_PATH\n\t\tfi\n\n\t\tmkdir -p $MOUNT_PATH\n\n\t\tif ! mountpoint -q $MOUNT_PATH; then\n\t\t\tmount -t btrfs $lo $MOUNT_PATH\n\t\tfi\n\t"],"command":"/bin/bash","env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","MOUNT_PATH=/opt/concourse/volumes","IMAGE_PATH=/opt/concourse/volumes.img","SIZE_IN_BYTES=94813585408"],"error":"exit status 1","session":"3.1","stderr":"+ '[' '!' -e /opt/concourse/volumes.img ']'\n++ stat --printf=%s /opt/concourse/volumes.img\n+ '[' 94813585408 '!=' 94813585408 ']'\n++ losetup -j /opt/concourse/volumes.img\n++ cut -d: -f1\n+ lo=/dev/loop2\n+ '[' -z /dev/loop2 ']'\n+ file /opt/concourse/volumes.img\nbash: line 11: file: command not found\n+ grep BTRFS\n+ /opt/concourse/4.0.0/assets/btrfs/mkfs.btrfs --nodiscard /opt/concourse/volumes.img\n/opt/concourse/volumes.img appears to contain an existing filesystem (btrfs).\nERROR: use the -f option to force overwrite of /opt/concourse/volumes.img\n","stdout":"btrfs-progs v4.15\nSee http://btrfs.wiki.kernel.org for more information.\n\n"}}
The important part from this seems to be: volumes.img appears to contain an existing filesystem (btrfs)
... which prevents the worker from ever starting. Requiring the user to manually clean-up this file from the host filesystem in order to get a worker to start.
Basically, once you create a worker, it looks like you cannot restart the worker without first manually removing the sparse-image file.
Is there any way to bake-in this cleanup as part of concourse itself?
Pretty sure this was fixed by concourse/concourse-docker#15 but then regressed with 5.0+ - it should be fixed again in v5.1 which we hope to have out this week or next week. 👍
I am facing same issue with concourse helm chart with image version 7.7.I had deployed previously with baggageclaim driver set to : naive.But it did not work since all went down.Again I redployed the total helm via brtfs & making mkfs.brtfs flag as enabled setting the required binary,but still facing the same issue
Activity
mkrogh commentedon Apr 17, 2018
My current workaround it to just run
rmon thevolumes.imgbefore starting the workers, since the db migrations makes it so you cannot run the older version of thewebcommand.alistardust commentedon Apr 23, 2018
I think this is a bug in ubuntu or docker, not in concourse. I had the same issue (at least same log errors) on 3.10.0 this morning. Mine was volumes mounted through overlayfs instead of volumes.img, but it was the same baggage claim errors. The solution for me was to umount the overlayfs, reboot, and I was fine.
billimek commentedon Apr 25, 2018
We've seen this type of error in our installation too. Running in a similar setup:
We sometimes see this when someone needs to make an update to the
docker-compose.ymland/or destroy and re-create the worker for whatever reason. When they start up the new worker, there are problems with the worker not starting properly or error about thevolumes.imgfile. It doesn't seem like a very clean solution to have to delete this file first before starting a new worker.xylphid commentedon May 14, 2018
Got the same error each time the worker restart with this configuration :
jondlove commentedon May 29, 2018
+1
I have to delete and recreate workers after a host server reboot; or delete the
/worker-statevolume if I just want to restart a given workerError message is similar to what @mkrogh reports:
stdout:
stderr:
This adds significant delay to the startup time of the system if I have to do a complete reboot, while Concourse figures out what workers it actually has: Orange. Orange warnings everywhere. D:
Details:
fewknow commentedon Jul 2, 2018
+1 . I upgraded from 3.9.1 to 3.14.1
After this upgrade everything turned orange and had this error.
I currently run 10 workers. After recreating them with
The error went away and everything seems to be fine.
billimek commentedon Aug 2, 2018
Bumping this issue:
When running via docker-compose, if the worker container crashes and restarts (say due to a OOM error) - or even during any type of restart - we frequently see something like,
The important part from this seems to be:
volumes.img appears to contain an existing filesystem (btrfs)
... which prevents the worker from ever starting. Requiring the user to manually clean-up this file from the host filesystem in order to get a worker to start.
Basically, once you create a worker, it looks like you cannot restart the worker without first manually removing the sparse-image file.
Is there any way to bake-in this cleanup as part of concourse itself?
billimek commentedon Aug 2, 2018
I think this error is actually going to be fixed by concourse/concourse-docker#15
Removing the
volumes.imgwas probably just masking the check using the missingfilecommand. Can't wait to see this PR included in a release!bump etree tsa handlers mux clockwork goxmldsig genproto grpc
OvermindDL1 commentedon Dec 9, 2018
Still happening in 4.2.1, server reboot causes
failed to create btrfs filesystem: exit status 1to be logged and then the worker dies.UncleSamSwiss commentedon Mar 19, 2019
@billimek unfortunately it doesn't seem to work.
We have the same problem with Concourse 5.0 and the following versions:
How to reproduce:
docker-compose updocker-compose upand you get the following error:UncleSamSwiss commentedon Mar 19, 2019
For everybody ending up here with the same error I reported, the workaround is:
docker-compose downdocker-compose up -dfly -t myproject workersand prune all workers that arestalledpunalpatel commentedon Mar 31, 2019
Thank you @UncleSamSwiss These steps worked for me.
Run
docker-compose down; docker system prune --volumes; docker-compose up -d
vito commentedon Apr 10, 2019
Pretty sure this was fixed by concourse/concourse-docker#15 but then regressed with 5.0+ - it should be fixed again in v5.1 which we hope to have out this week or next week. 👍
pothos commentedon Jul 3, 2019
Had the same problem with v5.3.0.
#2162 (comment) solved it.
acarsercan commentedon Oct 23, 2019
I'm running v5.3.0 and still having this problem with concourse running inside kubernetes
volume '9fdd49f5-333e-4838-74b5-27b5d858cb80' disappeared from worker 'concourse-worker-3'Suvankar123 commentedon May 10, 2022
I am facing same issue with concourse helm chart with image version 7.7.I had deployed previously with baggageclaim driver set to : naive.But it did not work since all went down.Again I redployed the total helm via brtfs & making mkfs.brtfs flag as enabled setting the required binary,but still facing the same issue