Hi,
I would like to know, how to restart a RPi through mender, and also update
modify a existing python file through mender.?
Hi,
I would like to know, how to restart a RPi through mender, and also update
modify a existing python file through mender.?
Hi
Mender supports updating single files through:
Also, if you are running an A/B partition scheme with Mender a rootfs update will reboot the device.
I guess Iâm gonna need a little more on the use-case if you this is not what you need though.
Hi sure Im also reading thru this now, My case is to reboot RPi at any time thru sudo reboot and also to modify a existing py file\ container file.
Hi
Here are all public update modules:
https://hub.mender.io/c/update-modules/13
They should support most of your use-cases, including containers. The reboot can be done with a script I guess?
Hi,
I will look into this page, it looks very informative. I was reading the Single file update link u have shared, Does it have a page with proper documentation instead of a forum, finding difficult to understand.
Also, regarding the reboot, Even if I create a python script with os.system(âsudo rebootâ), it wont execute unless we run the script rgt? so how does the script work if we deploy thru mender.
The script is deployed as an update
Look here for the specifics: https://docs.mender.io/2.3/devices/update-modules
Yes I understand this part, But again the script .sh file needs to be executed in order to get the sudo command affect knw? , It gets deployed only rgt, Can we also run the script thru mender
The script update module runs the script.
The single-file update module simply updates a file.
Oh, Let me explore and I would like to get back to you Oleorhagen, Give me sometime. It was nice talkng to u.
Hi
Like I said, I explored single file and script update module.
Both works great. But Im not able to fill in a âsudo rebootâ script to the device without getting a 100% successful deployment. Its just âsudo rebootâ in the bash script, maybe thats why it isnt deployed succesfully.
So, the script gets deployed to device and it reboots the device but deploys logs stucks at 70 % only in the mender server. Could you help me with a proper reboot script which support mender way.
Iâm not a 100% understanding your question, so I going to answer:
âI have deployed a bash script which reboots the device, and the deployments gets stuck at 70% for a while in the Mender server, and then fails, what is going on?â
RebootEnter
. Here a script which calls reboot
can be run, and the Mender-client will be happy to reboot into the newly installed root-filesystem. If this is a script update module [3], it actually seems that the description on Mender-hub is wrong. This module does not support rebooting the device. I will fix this up, after clarifying with the Module author.Thus, I guess what I am trying to say, is that rebooting the device at any time is not supported as it is now.
Solutions I can think of at the top of my head are:
ArtifactReboot
state. This will allow the script to reboot the device successfully, unlike the current âofficialâ script update-module.Which solution is best is a little hard to say, as it depends on your specific use-case.
References:
[1]: https://docs.mender.io/2.3/artifacts/state-scripts#power-loss
[2]: https://docs.mender.io/2.3/devices/update-modules#power-loss
[3]: Script
Sure @oleorhagen, I got ur point, Thank you so much for this amazing response. Ill go thru the ArtifactReboot state, Let me explore more on this.
Im actially facing a huge probs now, I have raised another issue:
No one is actually responding, so I refered here, sorry if its wrong way to do it. But its critical, Im not able to see anything wrong with my server, Its 16GB ram and 4 cpus, But Demo server GUIs doesnât respond smoothly, It hangs, staggers whenever we click at anything on the gui.
Hi @oleorhagen,
Im facing one more issue with my deployment, Once a deployment failes or aborted, the release\artifact is tagged with âInconsistentâ name, and after that the device is never synced in real time update, and because of this I cant deploy any further releases unless I restart the device manually, which is a very unfavourable situation for Mender isnât it.
In general I would recommend using another tool for rebooting your entire fleet. It could be done with an update module like:
#! /bin/bash
set -e
STATE="$1"
FILES="$2"
case "$STATE" in
NeedsArtifactReboot)
echo "Automatic"
;;
esac
exit 0
However, this is slightly cumbersome, as it would change the artifact name installed. There is simply no way around it.
Sure @oleorhagen, I understand this reboot is not happening for now, Now Ill give a try with the state script u have mentioned⌠Changing the artifact name isnât a nice way actually. But Ill try this once.
@oleorhagen Any idea on this ?
@nishad1092 this is not a state-script.
It is an update-module
Sure, Iâm looking into now, Looks different way to execute\deploy this to a device.
The inconsistent state is related to a failed update-module update.
Iâm going to need a little more information on what exactly you are trying to do?
Is this from the script update-module?
Yes, It is from the script module, Few times it worked fine, But twice it failed and yes, It went to âInconsistentâ mode, But after that, the device stopped taking real time update.