ArtifactInstall_Leave state script not executed

Mender 2.5

I have provided a custom state script for the ArtifactInstall_Leave event. However I am not sure if it executes. The mender deployment log shows

1:00"}
{“level”:“info”,“message”:“State transition: update-after-store [Download_Leave] -\u003e update-install [ArtifactInstall]”,“timestamp”:“2021-02-11T08:02:54+01:00”}
{“level”:“info”,“message”:“Enabling partition with new image installed to be a boot candidate: 3”,“timestamp”:“2021-02-11T08:02:54+01:00”}
{“level”:“info”,“message”:“Probing the Bootloader environment for which separator to use”,“timestamp”:“2021-02-11T08:02:54+01:00”}
{“level”:“info”,“message”:"Writing map[mender_uboot_separator:1] to the U-Boot environment, using separator: ",“timestamp”:“2021-02-11T08:02:54+01:00”}
{“level”:“info”,“message”:"Writing map[mender_uboot_separator:] to the U-Boot environment, using separator: ",“timestamp”:“2021-02-11T08:02:54+01:00”}
{“level”:“info”,“message”:"Writing map[upgrade_available:1 bootcount:0 mender_boot_part:3 mender_boot_part_hex:3] to the U-Boot environment, using separator: ",“timestamp”:“2021-02-11T08:02:55+01:00”}
{“level”:“info”,“message”:“State transition: update-install [ArtifactInstall] -\u003e reboot [ArtifactReboot_Enter]”,“timestamp”:“2021-02-11T08:02:55+01:00”}
{“level”:“info”,“message”:“Rebooting device(s)”,“timestamp”:“2021-02-11T08:02:55+01:00”}
{“level”:“info”,“message”:“Mender rebooting from active partition: /dev/mmcblk0p2”,“timestamp”:“2021-02-11T08:02:55+01:00”}
{“level”:“info”,“message”:“Running Mender client version: 2.4.1”,“timestamp”:“2019-02-14T11:12:23+01:00”}
{“level”:“info”,“message”:“State transition: init [none] -\u003e after-reboot [ArtifactReboot_Leave]”,“timestamp”:“2019-02-14T11:12:23+01:00”}

It shows the various state transitions. However it doesn’t show ArtifactInstall_Leave in between Download_Leave and Reboot_Enter.

  1. Should the log show ArtifactInstall_Leave?
  2. Should I see the execution of the script in the log?

Hi @dwjbosman if you want to log from your script, anything you echo to stderr will show in the log.

What is the name of your script? How are you adding it to the artifact? Can you provide the contents of the script?

Drew

1 Like

I changed the mender-client systemd service:

ExecStart=/usr/bin/mender --log-level debug daemon

The log shows additional info including that the scripts are actually called.