balena-io-modules / balena-preload

Script for preloading containers onto balena device images
https://www.balena.io/
Apache License 2.0
35 stars 8 forks source link

Enhance comms between CLI process and Python process in container #240

Closed pdcastro closed 3 years ago

pdcastro commented 3 years ago

Connects-to: #233 Connects-to: balena-io/balena-cli/issues/2045

pdcastro commented 3 years ago

There is still a problem, not necessarily to be fixed in this PR, but some warning messages -- that may turn out to be actual errors -- are still hidden behind infinite spinning wheels, unless --debug or DEBUG=1 is used. These warnings:

Retrying (count=2) /sbin/losetup -f --show /dev/loop8 False
Hint: If using a Virtual Machine, consider increasing the number of processors.
If using Docker Desktop for Windows or macOS, it may require restarting.
| Reading image information

Retrying (count=3) /sbin/losetup -f --show /dev/loop8 False
Hint: If using a Virtual Machine, consider increasing the number of processors.
If using Docker Desktop for Windows or macOS, it may require restarting.
/ Reading image information
...

I have to restart Docker Desktop to get out of that condition, but without --debug I am only shown this infinite spinning:

| Reading image information
/ Reading image information
- Reading image information

Some end users will wait for hours at this spinning, thinking that the CLI is hard at work, when actually it is stuck.

pdcastro commented 3 years ago

@klutchell, thank you for your reviews 👍 FYI, I have a commit in CLI PR balena-io/balena-cli/pull/2259 to bump balena-preload alongside other dependencies. I am currently testing it.