-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unit state lost following upgrade-charm #316
Comments
The reproduction above was with Juju 2.8-rc2, and I've also just reproduced it with Juju 2.8-rc3 (which will become 2.8.0). I did a brief test with IAAS and CAAS charms on 2.8-rc3 with a flag file in /var/lib/juju/agents/unit-foo-N/charm, and based on that it seems that this isn't a case of the charm directory itself being reset somehow. |
Note that my charm is targeting k8s clusters that do not have persistent storage. Therefore I've set |
From looking over scrollback (unfortunately I didn't preserve everything) I can't 100% rule out the application's operator pod being restarted and therefore losing its state due to lack of persistent storage. I understand Juju 2.8 controller-backed charm state support is being worked on, but since I couldn't find an issue specifically dedicated to it, although there's a mention in #240 (comment), I filed #317. |
I'm pretty sure charm pods are restarted on upgrade. If they aren't on 'upgrade-charm' they definitely are on 'upgrade-juju' because the base image that holds the Juju agent is being updated. (I believe they also are on upgrade charm, but I'm not positive of that. I've started working on state-get today (before reading this, which is why it caught my eye). Note that you don't have to set 'min-juju-version' and Juju will continue to provision charm operator pods as stateful sets. Though its my understanding that you're looking specifically to run these charms in locations where storage is not available. |
Excellent news, thanks!
That's correct -- none of our k8s clusters have persistent storage. |
Dupe of #317. |
I just upgraded a charm I'm developing, after which the unit seems lost its unit state. Unfortinately, I don't have a consistent way to reproduce this. I've run into it only once or twice previously, but I've done many more successful charm upgrades.
Before:
After:
The relation is still there:
but the unit state DB seems to have been reset:
The charm source is here: https://git.launchpad.net/~pjdc/charm-k8s-mattermost/+git/charm-k8s-mattermost/tree/src/charm.py?h=control-source#n61
And here's the debug-log from the upgrade: https://paste.ubuntu.com/p/bp4YdzR5XW/
The text was updated successfully, but these errors were encountered: