Comment 7 for bug 2021891

Revision history for this message
Carl Csaposs (carlcsaposs) wrote :

> the exact same pods/containers are running after the cluster restarts

I don't think this is correct—using the steps to reproduce from https://bugs.launchpad.net/juju/+bug/2021891/comments/3, different containers are running after the cluster restart.

See here for comparison of `kubectl describe pod` between cluster restart and kubectl delete pod: https://gist.github.com/carlcsaposs-canonical/d51505044dcc830bd40ed2cccce08d71/revisions. The last revision is after `sudo microk8s stop` and `sudo microk8s start`. The second to last revision is after `kubectl delete pod`

> If you want to detect that a pod has been restarted (for whatever reason), can't you use the "start" hook which is run every time?

This is what we're now doing. But why does `upgrade-charm` run for kubectl delete even if the charm isn't being upgraded? Is this because of a limitation of how juju keeps track of upgrades, or is it intended to be used so that the container local state can be recreated by the charm?