I tryed to add a state script to my Jetson TX2. Once I updated my device through hosted.mender the device reboot correctly and the update is installed but the device state on hosted mender is stuck at “rebooting”. What could cause such behaviour?
To add a state script I crated a dedicated recipe that
inherit mender-state-scripts. The purpose of the script is to cleanup
mender.conf files and correctly split up the confs between
/data partition. The script works well and give the expected result.
What did I miss?
I Finally found out that my device couldn’t connect to the internet after reboot that is why. My DNS configuration was not properly done therefore the device couldn’t tell hosted.mender that it has correctly rebooted.
I am curious, how did you figure it out? Logs, troubleshoot? SSH ?
I had still an ssh connexion on the device so I could run commands on it and investigate.
first I noticed that I had network routing by pinging an internet IP (like 220.127.116.11 or 18.104.22.168) but no name resolution because ping mender.io failed.
The process responsible of name resolution when running a systemd based distribution is
systemd-resolved. But the service was stopped in a failed state.
By looking at the
journald errors and trying to restart
systemd-resolved service, I understood that the folders
/var/volatile/tmp where missing. I created them and restarted the service. Et voilà I could ping mender.io. and the device came back on hosted.mender.