canonical / openstack-exporter-operator

The openstack-exporter-operator is a machine charm for openstack-exporter.
Apache License 2.0
1 stars 7 forks source link

Should be in error state if snap service down and uninstallation failed #108

Closed Pjack closed 1 month ago

Pjack commented 2 months ago

Address the issue mentioned in

Pjack commented 2 months ago

After discussing with @jdkandersson, I believe we can adopt this practice in the GitHub runner. We don't set the charm to ErrorStatus; instead, we allow the exceptions to bubble up and be handled by the Ops framework. https://github.com/canonical/github-runner-operator/blob/main/src/charm.py#L454

That's to say. If an unexpected error occurs in the workload (e.g., installation failure, service downtime), raise an exception in the charm if no specific action can be provided to resolve the issue. After the operator reviews the workload logs, they can manually resolve Juju.

What do you think ?

jneo8 commented 2 months ago

+1 for error status. It's a diverge situation so we can't provide a document or instruction to the user.