balena-io / balena-cli

The official balena CLI tool.
Apache License 2.0
453 stars 139 forks source link

Balena preload - Error: failed to register layer - no space left on device #2142

Closed janantala closed 3 years ago

janantala commented 3 years ago

Hello there,

I am getting the following error: Error: failed to register layer: Error processing tar file(exit status 1): write /usr/share/perl/5.28.1/File/Temp.pm: no space left on device when running

balena preload ~/Downloads/balena/balena-cloud-raspberrypi4-64-2.58.6+rev1-v11.14.0.img --app 1664294 --commit 46ba751f55679ce8fbf2d4266f1fc6b9 --splash-image ~/Downloads/logo.png --pin-device-to-release --debug

I have 25GB of free space, final image has around 2GB. mac OS v10.15.7 docker v20.10.0 balena cli v12.35.0

However this error also showed up on a linux machine. Do you have any idea what is wrong?

Full log:

balena preload ~/Downloads/balena/balena-cloud-raspberrypi4-64-2.58.6+rev1-v11.14.0.img --app 1664294 --commit 46ba751f55679ce8fbf2d4266f1fc6b9 --splash-image ~/Downloads/logo.png --pin-device-to-release --debug
[debug] new argv=[/usr/local/lib/balena-cli/bin/node,/usr/local/lib/balena-cli/bin/run,preload,/Users/janantala/Downloads/balena/balena-cloud-raspberrypi4-64-2.58.6+rev1-v11.14.0.img,--app,1664294,--commit,46ba751f55679ce8fbf2d4266f1fc6b9,--splash-image,/Users/janantala/Downloads/logo.png,--pin-device-to-release] length=11
Building Docker preloader image. [===                     ] 12%
Step 1/7 : FROM docker:17.12.0-ce-dind
Building Docker preloader image. [======                  ] 25%
Step 2/7 : RUN apk update && apk add --no-cache python3 parted btrfs-progs util-linux sfdisk file coreutils sgdisk
 ---> Using cache
Building Docker preloader image. [=========               ] 37%
Step 3/7 : COPY ./requirements.txt /tmp/
 ---> Using cache
Building Docker preloader image. [============            ] 50%
Step 4/7 : RUN pip3 install -r /tmp/requirements.txt
 ---> Using cache
Building Docker preloader image. [===============         ] 62%
Step 5/7 : COPY ./src /usr/src/app
 ---> Using cache
Building Docker preloader image. [==================      ] 75%
Step 6/7 : WORKDIR /usr/src/app
 ---> Using cache
Building Docker preloader image. [=====================   ] 87%
Step 7/7 : CMD ["python3", "/usr/src/app/preload.py"]
 ---> Using cache
 ---> 604e8d15ecc5
Successfully built 604e8d15ecc5
Building Docker preloader image. [========================] 100%
| Checking that the image is a writable file
| Finding a free tcp port and getting balena settings
| Checking if the image is an edison zip archive
\ Creating preloader container
- Starting preloader container
/ Fetching application devops9/semaphore
\ Reading image informationWaiting for Docker to start...
/ Reading image informationDocker started
| Reading image information
/ Fetching application 1664294
/ Resizing partitions and waiting for dockerd to startReplacing splash image
\ Resizing partitions and waiting for dockerd to startExpanding extended partition n°4 of /img/balena.img
Expanding logical partition n°6 of /img/balena.img
- Resizing partitions and waiting for dockerd to startResizing ext4 filesystem of partition n°6 of /img/balena.img using /dev/loop1
- Resizing partitions and waiting for dockerd to startFile system OK
- Resizing partitions and waiting for dockerd to startWaiting for Docker to start...
\ Resizing partitions and waiting for dockerd to startDocker started

Pulling 2 images [=====================   ] 86%
\ Cleaning up temporary files
failed to register layer: Error processing tar file(exit status 1): write /usr/share/perl/5.28.1/File/Temp.pm: no space left on device

Error: failed to register layer: Error processing tar file(exit status 1): write /usr/share/perl/5.28.1/File/Temp.pm: no space left on device
    at Stream.<anonymous> (/usr/local/lib/balena-cli/node_modules/balena-preload/node_modules/docker-progress/index.js:53:19)
    at Stream.emit (events.js:314:20)
    at Stream.EventEmitter.emit (domain.js:483:12)
    at drain (/usr/local/lib/balena-cli/node_modules/through/index.js:36:16)
    at Stream.stream.queue.stream.push (/usr/local/lib/balena-cli/node_modules/through/index.js:45:5)
    at Parser.parser.onToken (/usr/local/lib/balena-cli/node_modules/JSONStream/index.js:132:18)
    at Parser.proto.write (/usr/local/lib/balena-cli/node_modules/jsonparse/jsonparse.js:135:34)
    at Stream.<anonymous> (/usr/local/lib/balena-cli/node_modules/JSONStream/index.js:23:12)
    at Stream.stream.write (/usr/local/lib/balena-cli/node_modules/through/index.js:26:11)
    at IncomingMessage.ondata (_stream_readable.js:718:22)
    at IncomingMessage.emit (events.js:314:20)
    at IncomingMessage.EventEmitter.emit (domain.js:483:12)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:272:9)
    at IncomingMessage.Readable.push (_stream_readable.js:213:10)
    at HTTPParser.parserOnBody (_http_common.js:135:24)
    at Socket.socketOnData (_http_client.js:474:22)
    at Socket.emit (events.js:314:20)
    at Socket.EventEmitter.emit (domain.js:483:12)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:272:9)
    at Socket.Readable.push (_stream_readable.js:213:10)
From previous event:
    at awaitRegistryStream (/usr/local/lib/balena-cli/node_modules/balena-preload/node_modules/docker-progress/index.js:43:12)
    at /usr/local/lib/balena-cli/node_modules/balena-preload/node_modules/docker-progress/index.js:406:16
From previous event:
    at DockerProgress.exports.DockerProgress.DockerProgress.pull (/usr/local/lib/balena-cli/node_modules/balena-preload/node_modules/docker-progress/index.js:405:47)
    at /usr/local/lib/balena-cli/node_modules/balena-preload/build/preload.js:672:44
From previous event:
    at /usr/local/lib/balena-cli/node_modules/balena-preload/build/preload.js:671:29
    at processImmediate (internal/timers.js:461:21)
From previous event:
    at Preloader.preload (/usr/local/lib/balena-cli/node_modules/balena-preload/build/preload.js:660:14)
    at PreloadCmd.prepareAndPreload (/usr/local/lib/balena-cli/build/commands/preload.js:304:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async PreloadCmd.run (/usr/local/lib/balena-cli/build/commands/preload.js:117:13)
    at async PreloadCmd._run (/usr/local/lib/balena-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (/usr/local/lib/balena-cli/node_modules/@oclif/config/lib/config.js:175:24)
    at async CustomMain.run (/usr/local/lib/balena-cli/node_modules/@oclif/command/lib/main.js:27:9)
    at async CustomMain._run (/usr/local/lib/balena-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Promise.all (index 1)
    at async oclifRun (/usr/local/lib/balena-cli/build/app.js:75:5)
    at async Object.run (/usr/local/lib/balena-cli/build/app.js:88:9)

For further help or support, visit:
https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting
jellyfish-bot commented 3 years ago

[mbalamat] This issue has attached support thread https://jel.ly.fish/28822309-3454-4ce2-b2d4-cd19a0de18da

zvin commented 3 years ago

This will be fixed by #2146

pdcastro commented 3 years ago

Fixed in CLI release v12.37.0. Thank you, @zvin! 💯