Web UI deployment status progress bar keeps advancing even if state script exited with 1

andrea.nencini
Thu, 01 Apr 2021 07:52:40 +0000
General Discussions

Hi guys.
I wrote a state script associated with the Sync Leave state, that alternatively exits with RC 0 or RC 1 based on a certain condition. My idea is to allow or block the update process through this script. As you can see in the attached image, the state transition flow seems correct by inspecting log files, however the progress bar in deployment status section of Mender Web UI keeps advancing, while indicating the execution of Sync Leave script.

Is that an intended behavior, or there’s something I’m missing? And, ultimately, is correct to use state scripts to perform such updating flow operations, or is better to use the REST API?

2 posts - 2 participants