host.service_running fails on trusty for snapped service
Bug #1824217 reported by
Drew Freiberger
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
Fix Released
|
Undecided
|
Unassigned | ||
Prometheus Ceph Exporter Charm |
Fix Released
|
Medium
|
Adam Dyess |
Bug Description
The latest charmhelpers.
It then falls back to checking for /etc/init/* or /etc/init.d/* files in upstart and sysv format startup.
This creates a gap related to snap-based systemd startup services, as snapd only installs startup scripts in /etc/systemd/
charmhelpers should be updated to handle the special case of systemd-only services on trusty to support charms that use snapped services.
no longer affects: | charm-prometheus-ceph-exporter |
Changed in charm-helpers: | |
status: | New → Confirmed |
Changed in charm-prometheus-ceph-exporter: | |
status: | New → Invalid |
Changed in charm-helpers: | |
status: | In Progress → Fix Released |
Changed in charm-prometheus-ceph-exporter: | |
status: | Invalid → In Progress |
assignee: | nobody → Adam Dyess (addyess) |
Changed in charm-helpers: | |
assignee: | Adam Dyess (addyess) → nobody |
Changed in charm-prometheus-ceph-exporter: | |
importance: | Undecided → Medium |
assignee: | nobody → Adam Dyess (addyess) |
Changed in charm-prometheus-ceph-exporter: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Suggest adding function systemd_ is_installed( ) and add another elif systemd_ is_installed( ): return service( 'is-active' , service_name) before line https:/ /github. com/juju/ charm-helpers/ blob/master/ charmhelpers/ core/host. py#L308 that checks. This would cover a more generic case of using the os-native tools on trusty before reverting back to systemd, but would cover both snap and non-snap systemd-only services installed on trusty.