Currently we use StoredState in the charm to track whether the exporter has been installed. But this is unnecessary as we could just use Path.exists to check whether the relevant files (/etc/systemd/system/hardware-exporter/.service and /etc/hardware-exporter-config.yaml) exist.
As part of this PR to add smartctl exporter support for the charm, we are removing the usage of StoredState to track whether an exporter has been installed.
Currently we use
StoredState
in the charm to track whether the exporter has been installed. But this is unnecessary as we could just use Path.exists to check whether the relevant files (/etc/systemd/system/hardware-exporter/.service
and/etc/hardware-exporter-config.yaml
) exist.Limitations of StoredState