Mender Artifact deployment misbehave for modules

I’m trying to use hosted mender server to deploy our packages on test devices. Multiple times, I have found that if i start deploy mender artifact to device using dir-overlay or deb package module, sometime deployment takes previous mender artifact. Then i have to clean all deployment from device and metadata.

It is not suitable for production env if we go with mender.

Hi @test.test12p I’m not quite understanding. Can you clarify what you mean by “takes previous mender artifact”? What specifically are you seeing and what are you expecting?


Hi @drewmoseley
I mean to say, suppose i have executed any script( by mender deployment and next time if want to execute new script(, mender deployment takes and try to execute At target device it don’t find because it already copied at target device.

Hope you understand.

I’m still not completely clear. Which update module are you using and which artifacts are you trying to install? How are you instructing the deployment to invoke

@drewmoseley I’m using “mender-artifact write module-image -T script” for execute scripts. I’m instructing by create mender artifact:

dir-overlay-artifact-gen -n {ARTIFACT_NAME} -t {DEVICE_TYPE} -d {DEST_DIR} -o {OUTPUT_PATH} ${OVERLAY_TREE})

In Device.Install folder, I have shell script and some other folder.

I’m create artifact and uploading to mender server and then deploying to target device. Logs are attached:

In line number 90, /opt/target_device/ have to be copied and execute but in line number 99, i’m getting rm: cannot remove ‘/opt/target_device/’: No such file or directory

which does not exist in my current folder structure, but still mender artifact trying to copy and execute script. script was exist in my previous artifact.

mender_logs.yaml (11.2 KB)

It looks like you are mixing instructions for the dir-overlay and script modules. You should be using one or the other. The dir-overlay docs and script installer docs should provide the answers you need.

If you can describe what you are trying to accomplish then perhaps we can better guide you. dir-overlay is used for passing in a complete replacement for a specific directory tree but doesn’t necessarily include any automatic script execution functionality.