Please feel free to post any snap-related content here. If there’s no proper category, just file in #other, or the one that matches it best. The categories are minimalist just so we focus more on the conversations than on the structure, but it’s very easy to move things around and even put them in new categories once we find the need.
This is awesome! I can’t wait for the rest of the series. Maybe slightly off topic… But always wondered if it rolls back in any circumstances? I’ve kind of gathered that it does. But never seen it happen.
That’s exactly what I meant Just thinking in terms of an update rolling out that didn’t go well in embedded system like robots. Rolling back from a bad update would be critical(not that ssh’ing in and reverting is hard. Its less practical). Would love to see more about that in your series
Automated health checks are mentioned here too. Is this just getting the exit code from the configure hook? Or what other circumstances causes it to roll back.
If service crashloops and stops trying, is that enough to cause it to roll back?
I initially had that snap as a demo for the part 1 video, but it got tossed in the final cut due to length (trying to keep each video no longer than five minutes). This is a pretty generic concept, so I won’t really be covering it more in-depth through this particular series. I wrote about it a bit in another post, though, if that helps.
No, automated health checks are currently in-development. However, yes, until that feature is complete simply exiting non-zero from the configure hook will result in a rollback (assuming that the non-zero exit code occurs during an upgrade).
No. However, as mentioned in the other post I linked above, the configure hook runs after services are started, which means it’s a decent place to check to see if your services failed for some reason. If so, exit non-zero and the snap will roll back.
To bring this thread to a close: I was asked by a few different people how I made those videos, so I wrote up an article showing what I did and what I used. It was made very cheaply and with open-source software, so it might be useful to others wanting to do something similar.