Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SnapExporter is started on install #326

Open
chanchiwai-ray opened this issue Sep 25, 2024 · 4 comments
Open

SnapExporter is started on install #326

chanchiwai-ray opened this issue Sep 25, 2024 · 4 comments

Comments

@chanchiwai-ray
Copy link
Contributor

SnapExporter is started on install event, which is not the currently expected behavior: exporter are only started when cos_agent is related.

@gabrielcocenza
Copy link
Member

SmartCTL exporter is enabled by default, which means that it will start immediately after the strategy finish installing it. If we really want this to happen then we need to stop and disable all snaps after installing

@chanchiwai-ray
Copy link
Contributor Author

I think this is also true for dcgm: https://github.com/canonical/hardware-observer-operator/blob/main/src/service.py#L391-L402. We should be consistent with the approach: either remove cos_agent check or make the snap disable on install

@chanchiwai-ray
Copy link
Contributor Author

I am leaning towards removing cos_agent check in this charm because the if cos_agent_related check in config_changed event will silently block the config changed of exporter.

@samuelallan72
Copy link
Contributor

samuelallan72 commented Sep 30, 2024

My 2c: I'd also lean towards always running the exporter, ignoring the status of cos-agent relation. It makes the logic simpler, and avoids confusion for anyone who wants to run or test the exporter without relating cos. So we can go with always starting/enabling the snap services on install (or leaving the default if enabled by default).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants