canonical / pebble

Take control of your internal daemons!
GNU General Public License v3.0
137 stars 52 forks source link

Document ChangeError is raised even while setting the layer as "on-failure: ignore" #377

Closed amandahla closed 4 months ago

amandahla commented 4 months ago

Could this be added as a note to the https://github.com/canonical/pebble?tab=readme-ov-file#layer-specification , please?

If wasn't this issue and this comment I wouldn't figured out this behavior.

Thanks.

benhoyt commented 4 months ago

Hi @amandahla, thanks for the report. Is this happening because the service you're trying to start is exiting in less than 1 second? That is documented in the "Using Pebble" part of the README:

When starting a service, Pebble executes the service's command, and waits 1 second to ensure the command doesn't exit too quickly. Assuming the command doesn't exit within that time window, the start is considered successful, otherwise pebble start will exit with an error.

However, I acknowledge we may want to say something explicit about how this still applies even when on-failure: ignore is set.