I have a docker-compose.yml file that contains multiple services.
If I execute balena deploy <APP_NAME> --logs --source . -b, I can see that the project was built successfully.
But if I check the device status, its commit value doesn’t change. So seems like it is not updated at all.
root@plextreme-UP-WHL01:~/BalenaPOC# balena apps
[debug] original argv0="node" argv=[/usr/bin/node,/usr/bin/balena,apps] length=3
ID APP NAME DEVICE TYPE ONLINE DEVICES DEVICE COUNT
2 testPOC intel-nuc 1 1
root@plextreme-UP-WHL01:~/BalenaPOC# balena devices
[debug] original argv0="node" argv=[/usr/bin/node,/usr/bin/balena,devices] length=3
ID UUID DEVICE NAME DEVICE TYPE APPLICATION NAME STATUS IS ONLINE SUPERVISOR VERSION OS VERSION DASHBOARD URL
1 7c21238 fragrant-meadow intel-nuc testPOC Idle true 10.3.7 balenaOS 2.44.0+rev1 https://dashboard.viso.dev/devices/7c21238b2db06050822b91aa5e97327b/summary
root@plextreme-UP-WHL01:~/BalenaPOC# balena device 7c21238
[debug] original argv0="node" argv=[/usr/bin/node,/usr/bin/balena,device,7c21238] length=4
== FRAGRANT MEADOW
ID: 1
DEVICE TYPE: intel-nuc
STATUS: inactive
IS ONLINE: true
IP ADDRESS: 192.168.178.53
APPLICATION NAME: testPOC
UUID: 7c21238b2db06050822b91aa5e97327b
COMMIT: 1a3ef4812b54c44960e148af5cec4070
SUPERVISOR VERSION: 10.3.7
OS VERSION: balenaOS 2.44.0+rev1
DASHBOARD URL: https://dashboard.viso.dev/devices/7c21238b2db06050822b91aa5e97327b/summary
Hi, Could you have a look at the supervisor logs of that device. If you have access to the hostOS of the device you can check these logs by doing journalctl -u resin-supervisor --no-pager . It should be clear from there is the supervisor is having some kind of issue.
If deploy is changing the releaseHash of the App, that means the deploy part is working properly but the device is not pulling the image, so pulling the supervisor logs will help here. The staged-release project won’t help with this problem as it sounds like your device is not pulling releases at all, so pinning it to specific releases won’t help.
In any case, if you would like to use the staged release project once you have fixed your device, you can find the App ID by running balena apps and you can get the Auth token by running 'balena api-key generate “My staged release key”
Okay, that is interesting. It seems the device was never notified of the change in releaseHash. When you did the balena deploy did you change any code? also did you add the --build flag to the command to force a rebuild. It might be that since nothing has changed (i.e. the same container images were uploaded each time) it didn’t actually need to update anything, so not update occured
Of course, I had changed my code… lol
This is my command:
balena deploy testPOC --nocache -b -s ./
Anything wrong?
And I’ve just found another issue…
If we execute balena deploy, this will be built on the machine that I’ve executed.
The target device has GPU board, so I have to install nvidia driver.
But the local PC where the balena deploy command is executed does not have the gpu board…
So I am getting this error when building:
root@plextreme-UP-WHL01:~/BalenaPOC# balena deploy testPOC --nocache -b -s ./
[Info] Compose file detected
[Info] Building for amd64/intel-nuc
[Build] Built 5 services in 2:47
[Build] redis Image is up to date for redis:latest
[Build] mqtt Image is up to date for eclipse-mosquitto:latest
[Build] node-red Successfully tagged balenapoc_node-red:latest
[Build] object-detector [==========> ] 50% Step 11/22: 2 upgraded, 61 newly installed, 0 to remove and 45 not upgraded.
[Build] camera-feeder Successfully tagged balenapoc_camera-feeder:latest
[Error] Deploy failed
The command '/bin/bash -c apt-get install -y nvidia-driver-435' returned a non-zero code: 100
Additional information may be available by setting a DEBUG=1 environment
variable: "set DEBUG=1" on a Windows command prompt, or "export DEBUG=1"
on Linux or macOS.
If you need help, don't hesitate in contacting our support forums at
https://forums.balena.io
For bug reports or feature requests, have a look at the GitHub issues or
create a new one at: https://github.com/balena-io/balena-cli/issues/
Do I have to execute balena deploy command on the one with GPU?
haha, I have to ask these types of questions sometimes just to make sure I know all the context
The command looks correct, i can’t see why it wouldn’t be working for you. I will ping some of the openBalena devs to come and see if they can see soemthing I am missing.
With GPU issue, i think its more likely that your container is trying to build for the wrong arch (x86) so i think what you would want to do is pass the --emulated flag to the deploy command, so that it knows to build for armv8 rather than x86.
Oh, sorry I didn’t realise that. Hmm thats very odd then, because during buildtime you can’t have access to gpu devices, docker build containers are completely isolated so not sure how one would get around that…
One other thought I had was to test that your update notifications are correctly going to the device, could you try setting an env var or issuing the device identify <uuid> command and tailing the supervisor logs ( journalctl -u resin-supervisor -f). If the notification service is working correctly, you should see logs written out stating that a blink or configuration change was triggered