Recently I had my bad first impression of snapcraft after I realised it unpromptedly had upgraded my docker installation, and only had a 30 second stop-sigterm timeout set in the systemd service configuration. After that, it started SIGKILLing every arbitrary process belonging to containers running under docker. (even running database servers under load, thank god for journalling)
I started doing some testing. For my particular docker installation, allowing a graceful timeout of 1 minute would have been enough for docker to clean everything up, and have shut down all containers with no data loss, so i decided i wanted to make the new timeout 2 minutes.
However, I could not set a permanent timeout override anywhere, not in the fleeting regularly-updated
snapcraft.yaml file, not in a global configuration file, not in a specific override file, not anywhere.
The hardcoded 30 second timeout as a sigterm timeout is probable to break many installations once they have been scaled and are stretching the machine’s resources, it needs to be able to be overridden, even when a snap itself defines a timeout.