service_resume and service_pause should be idempotent.

Bug #1516821 reported by Chad Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
In Progress
Undecided
Chad Smith

Bug Description

In the event of hook retries, service_pause and service_resume should succeed if called multiple times. To support this use case, both of these functions need to gracefully handle to following cases:

- service_pause should succeed if the unit is already in a paused state

- service_resume should succeed if the unit is already in a resumed state

The service_pause function exits in error when run on an already paused unit because "service <name> stop" exits non-zero if the service is already stopped.

Conversely, the service_resume function exits in error when run on an already resumed unit because "service <name> start" exits non-zero if the service is already running.

Related branches

Chad Smith (chad.smith)
Changed in charm-helpers:
assignee: nobody → Chad Smith (chad.smith)
status: New → In Progress
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.