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

Balena preload failing on macOS #2598

Open
chriswiggins opened this issue Mar 13, 2023 · 0 comments
Open

Balena preload failing on macOS #2598

chriswiggins opened this issue Mar 13, 2023 · 0 comments

Comments

@chriswiggins
Copy link
Contributor

Expected Behavior

Preload command works successfully

Actual Behavior

Running preload with an image (and optionally a splash image) fails when hitting the clean up temporary files task:

Command: DEBUG=1 balena preload balena-cloud-nz-broadcast-intel-nuc-2.113.4-v14.9.1-preload.img --fleet <SLUG> --splash-image splash.png

Error: An error has occurred executing internal preload command 'preload':
{"command":"preload","parameters":SNIPPED FOR SECURITY REASONS

Status code: 1
Error: Traceback (most recent call last):
File "/usr/src/app/preload.py", line 978, in
result = method(**data.get("parameters", {}))
File "/usr/src/app/preload.py", line 903, in main_preload
flasher_root.resize(additional_bytes)
File "/usr/src/app/preload.py", line 436, in resize
self._resize_partition_on_disk_image(additional_bytes)
File "/usr/src/app/preload.py", line 422, in _resize_partition_on_disk_image
copy(
File "/usr/src/app/preload.py", line 679, in ddd
return dd(
File "/usr/lib/python3.8/site-packages/sh.py", line 1427, in call
return RunningCommand(cmd, call_args, stdin, stdout, stderr)
File "/usr/lib/python3.8/site-packages/sh.py", line 774, in init
self.wait()
File "/usr/lib/python3.8/site-packages/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/usr/lib/python3.8/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:

RAN: /bin/dd if=/img/balena.img of=/img/tmp7m07h3i5 bs=1048576 conv=notrunc iflag=count_bytes,skip_bytes oflag=seek_bytes skip=2854912000 seek=4149542912 count=4194304

STDOUT:

STDERR:
dd: /img/balena.img: cannot skip: Not a tty
0+0 records in
0+0 records out
0 bytes copied, 0.000267 s, 0.0 kB/s

at PassThrough.<anonymous> (/Users/chris/.nvm/versions/node/v14.18.1/lib/node_modules/balena-cli/node_modules/balena-preload/build/preload.js:242:28)
at Object.onceWrapper (events.js:520:26)
at PassThrough.emit (events.js:400:28)
at PassThrough.emit (domain.js:475:12)
at addChunk (internal/streams/readable.js:293:12)
at readableAddChunk (internal/streams/readable.js:267:9)
at PassThrough.Readable.push (internal/streams/readable.js:206:10)
at PassThrough.Transform.push (internal/streams/transform.js:166:32)
at PassThrough.afterTransform (internal/streams/transform.js:101:10)
at PassThrough._transform (internal/streams/passthrough.js:46:3)
at PassThrough.Transform._read (internal/streams/transform.js:205:10)
at PassThrough.Transform._write (internal/streams/transform.js:193:12)
at writeOrBuffer (internal/streams/writable.js:358:12)
at PassThrough.Writable.write (internal/streams/writable.js:303:10)
at processData (/Users/chris/.nvm/versions/node/v14.18.1/lib/node_modules/balena-cli/node_modules/docker-modem/lib/modem.js:371:18)
at Socket.processData (/Users/chris/.nvm/versions/node/v14.18.1/lib/node_modules/balena-cli/node_modules/docker-modem/lib/modem.js:365:9)
at Socket.emit (events.js:400:28)
at Socket.emit (domain.js:475:12)
at addChunk (internal/streams/readable.js:293:12)
at readableAddChunk (internal/streams/readable.js:267:9)
at Socket.Readable.push (internal/streams/readable.js:206:10)
at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)

From previous event:
at Preloader._runCommand (/Users/chris/.nvm/versions/node/v14.18.1/lib/node_modules/balena-cli/node_modules/balena-preload/build/preload.js:209:16)
at /Users/chris/.nvm/versions/node/v14.18.1/lib/node_modules/balena-cli/node_modules/balena-preload/build/preload.js:660:107
at Preloader._runWithSpinner (/Users/chris/.nvm/versions/node/v14.18.1/lib/node_modules/balena-cli/node_modules/balena-preload/build/preload.js:184:26)
at /Users/chris/.nvm/versions/node/v14.18.1/lib/node_modules/balena-cli/node_modules/balena-preload/build/preload.js:660:24
at runNextTicks (internal/process/task_queues.js:60:5)
at processImmediate (internal/timers.js:437:9)

Steps to Reproduce the Problem

  1. Run balena preload
  2. Observe failure

Specifications

  • balena CLI version: balena-cli version "15.0.6"
  • Cloud backend: balenaCloud
  • Operating system version: macOS 13.1
  • 32/64 bit OS and processor: M1
  • Install method: npm
  • If npm install, Node.js and npm version: Node v14.18.1 and npm v6.14.15
  • Docker version 20.10.21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant