balena-os / balenahup

BALENA Host os UPdater
https://balena.io/
36 stars 11 forks source link

'resize' call in /etc/profile.d/ script makes HUP fail #344

Open acostach opened 3 years ago

acostach commented 3 years ago

Device iot-gate-imx8 has only one release in the dashboard, balenaOS 2.71.5+rev6

This release includes a BSP script /etc/profile.d/resize.sh which does:

shopt -s checkwinsize
command -v resize &>/dev/null && resize

The 'resize' call makes the HUP script exit prematurely, but only when calling HUP from the dashboard. ssh with the cli or with a webterminal work fine.

1 device failed to update.
[Compulab IOT-gate-imx8] cold-waterBalenaOS v2.71.5
resinhup failed: exit code 255 stderr: 78

We removed these unnecessary scripts from future OS releases, however, they do exist in the current OS image that's available in the dashboard and it's preventing hostOS updates.

Support device in staging: 1b0b685b3 Internal discussion: https://www.flowdock.com/app/rulemotion/s-sales/threads/RuS17IlVFRNm0bWkb85yx0gBt7Y

xginn8 commented 3 years ago

Since this happens before any HUP code is called (as part of creating the shell environment to run in), I'm not 100% sure this can be handled by HUP itself. I'm still exploring options, however.

jellyfish-bot commented 3 years ago

[cywang117] This issue has attached support thread https://jel.ly.fish/4591deb2-bfe8-4e9f-9ce9-455b58c4b55e