Snapcraft is not allowing to create a service with restart always option

Bug #1552462 reported by Rajendra Dendukuri
This bug report is a duplicate of:  Bug #1552160: Support restart-condition. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

Snapcraft-2.3 version does not allow restart-condition to be set in snapcraft.yaml. This is resulting in all daemons defaulting to restart on-fault. It would be good to provide choice to developer creating the app.

Below change to schema allows setting of systemd unit behavior.

diff --git a/schema/snapcraft.yaml b/schema/snapcraft.yaml
index 000315a..9b29f3b 100644
--- a/schema/snapcraft.yaml
+++ b/schema/snapcraft.yaml
@@ -162,6 +162,9 @@ properties:
             description: command executed to stop a service
           stop-timeout:
             description: timeout in seconds
+ restart-condition:
+ type: string
+ description: service restart condition
           daemon:
             type: string
             description: signals that the app is a service.

Loïc Minier (lool)
affects: snappy → snapcraft
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.