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

Add an installer option to not install the service #1033

Closed
jantari opened this issue Jul 28, 2022 · 8 comments
Closed

Add an installer option to not install the service #1033

jantari opened this issue Jul 28, 2022 · 8 comments

Comments

@jantari
Copy link

jantari commented Jul 28, 2022

Hello,

because of the issue with windows_exporter not starting on boot, discussed here:

#551
#637
golang/go#23479

the only reliable way to use this software is to wrap the service in a tool such as WinSW or the classic nssm.

That isn't ideal, but at least it works - however it poses a new problem: Because the windows_exporter MSI always forecfully installs the windows_exporter service my ansible role to deploy the windows_exporter now always has to do two consecutive changes and is not properly idempotent anymore:

After installing or updating windows_exporter (change 1), it has to replace the auto-created, non-functioning service from the installer with the winsw-wrapped version of the service again (change 2 - even though the winsw service and its configuration haven't changed, this task will now result in a change)

This service flip-flopping during a rollout could be avoided if the MSI installer exposed an argument that allows the service-creation to be suppressed during the install.

Thanks!

@breed808
Copy link
Contributor

Right now the only difference between the MSI and EXE options provided by this project are the system service and the firewall rules (plus any intrinsic MSI behaviour).
Is the EXE not an option for your use case?

Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Nov 24, 2023
@jantari
Copy link
Author

jantari commented Nov 25, 2023

I have worked around the issue by giving the working (WinSW-wrapped) service a different name (such as windows_exporter_winsw). Now I only have to delete/disable the windows_exporter service after every update of windows_exporter, but an update is a change anyways so it doesn't matter that we tack on another required follow-up change.

Using the EXE would be very inconvenient for two reasons:

  1. We use package managers like chocolatey or winget to provision and update software, and both only carry the MSI installer. To use the EXE installer we would have to create and maintain a custom software package.
  2. The EXE download is not an installer, just a "portable" executable. This means it doesn't register its presence on the system with the MSI software database or the registry keys for ARP. This means it won't be tracked by software inventory systems. We have to verify that updates are being installed and are working as expected in case our deployment contains a (logic) error or a bug and an update rollout fails without it being apparent.

Software that's in the MSI database or at least the registry can easily be inventoried and tracked across thousands of systems by external tools.

@breed808
Copy link
Contributor

To confirm, the request originated from a need to manage the windows_exporter service, due to the MSI-provided service failing to start?

Is that still the case now that #1047 (window_exporter >= v0.20.0) has been implemented?

@github-actions github-actions bot removed the Stale label Nov 26, 2023
@jantari
Copy link
Author

jantari commented Dec 1, 2023

Thanks I will test it again, for a long while I could not use windows_exporter v0.20.0 because the chocolatey package was broken but that has been resolved.

@jantari
Copy link
Author

jantari commented Dec 22, 2023

When attempting to test v0.24.0 on some machines I ran into a follow-up problem: #1368

Since I had removed the (formerly unreliable) windows_exporter service intentionally in favor of my own, now, when I perform a reinstall of windows_exporter to recreate the service and remove my own wrapper-service (windows_exporter_winsw) I am left with no windows_exporter running at all - because reinstalling the software did not recreate the missing service.

Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Mar 22, 2024
@jantari
Copy link
Author

jantari commented Mar 25, 2024

To confirm, the request originated from a need to manage the windows_exporter service, due to the MSI-provided service failing to start?

Exactly.

Is that still the case now that #1047 (window_exporter >= v0.20.0) has been implemented?

I checked across our systems where we deployed 0.24.0 without a WinSW wrapper to test it, and we haven't seen these issues with the service failing to start anymore. Thus this issue is resolved for me, thanks.

@jantari jantari closed this as completed Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants