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.