`version` of state-scripts in /etc/mender

Trying to use state-scripts for Sync state, I was catching this error:

level=error msg="transient error: error calling enter script for (error) authorize state: error running enter state script(s) for Sync state: statescript: The version read from the version file in the statescript directory does not match the versions supported by the client, please make sure the file is present and formatted correctly (supported: [2 3]; actual: 0)." module=state

Digging into the code of mender/statescript/executor.go, I found that it expects version file to be present in /etc/mender/scripts directory, however, no information about it is present in the documentation. I created version file manually in 3 inside and it worked.

I understand this file is probably getting greated while using yocto process when you provide state scripts, but I used mender-convert and it wasn’t there.

2 Likes

Confirmed, I can not find any reference to this file in our docs. I will look in to adding something somewhere.

I understand this file is probably getting greated while using yocto process when you provide state scripts, but I used mender-convert and it wasn’t there.

mender-convert should add this file,

1 Like