Snap hold refresh and SNAP_DATA

Hi,

We have an incident where a user has snap refresh --hold microk8s, the refresh did not happen but for some reason one of the processes running has picked up an updated $SNAP environment that points to a path that does not exist.

Here is the github issue Unexpected Microk8s 1.28.14 restart with cert update logs even though i have no-cert-reissue in-place · Issue #4734 · canonical/microk8s · GitHub

The apiservice-kicker is in microk8s/microk8s-resources/wrappers/apiservice-kicker at 1.28 · canonical/microk8s · GitHub

The first line of the error comes from: microk8s/microk8s-resources/actions/common/utils.sh at 1.28 · canonical/microk8s · GitHub

The $SNAP/bin/hostname does not exist because the snap never refreshed to revision 7231.

Any ideas what might have gone wrong here?

Thank you.

Thanks for raising the issue. I had a look at the github ticket you linked, but it does not contain any information that would allow us to investigate. You should include at least:

  • snap list --all
  • snap changes
  • journal logs covering the time window where this may have happened