canonical / charms.reactive

Framework for developing charms and relations using the reactive pattern
Apache License 2.0
22 stars 34 forks source link

Flags now reset on upgrade-charm? #221

Closed hloeung closed 4 years ago

hloeung commented 4 years ago

Hi,

Deploying the content-cache charm. On upgrade-charm, it seems all the content_cache.* flags are removed? See:

https://pastebin.ubuntu.com/p/hjWGdtz6fC/

hloeung commented 4 years ago

FYI, the charm clears some, but not all, in particular 'content_cache.nginx.installed'.

https://git.launchpad.net/~content-cache-charmers/content-cache-charm/tree/reactive/content_cache.py#n27

hloeung commented 4 years ago

Even removed all the clear_flag() calls in the charm's upgrade_charm() and confirmed that those flags are gone:

https://pastebin.ubuntu.com/p/xfZfrCS3Fs/

stub42 commented 4 years ago

Feels like the sqlite database containing charm state got destroyed. Did it happen to get packaged in the built charm? That would do it.

hloeung commented 4 years ago

Ah, that's exactly what it is. Didn't run 'make clean' and .unit-state.db was still around.