Skip to content

fix: Change service stop command from 'sc' to 'net'#5906

Merged
x1unix merged 3 commits intografana:mainfrom
mateuszdrab:fix-windows-service-stop
Apr 1, 2026
Merged

fix: Change service stop command from 'sc' to 'net'#5906
x1unix merged 3 commits intografana:mainfrom
mateuszdrab:fix-windows-service-stop

Conversation

@mateuszdrab
Copy link
Copy Markdown
Contributor

Brief description of Pull Request

Switches service stop command from sc stop to net stop which waits for service termination.

Pull Request Details

Issue(s) fixed by this Pull Request

#3605

Notes to the Reviewer

PR Checklist

  • Documentation added
  • Tests updated
  • Config converters updated

@mateuszdrab mateuszdrab requested a review from a team as a code owner March 26, 2026 16:50
@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Mar 26, 2026

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Mar 26, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mateuszdrab mateuszdrab changed the title Change service stop command from 'sc' to 'net' fix: Change service stop command from 'sc' to 'net' Mar 27, 2026
@x1unix x1unix requested review from Copilot and x1unix March 30, 2026 15:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Windows NSIS installer/uninstaller to stop the Alloy Windows service using net stop (which waits for service termination) instead of sc stop, aiming to make upgrades more reliable.

Changes:

  • Replace sc stop "Alloy" with net stop "Alloy" in the install section.
  • Replace sc stop "Alloy" with net stop "Alloy" in the uninstall section.

Comment thread packaging/windows/install_script.nsis Outdated
Comment thread packaging/windows/install_script.nsis Outdated
@x1unix x1unix added the backport/v1.15 Backport to release/v1.15 label Mar 30, 2026
mateuszdrab and others added 3 commits April 1, 2026 14:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mateuszdrab mateuszdrab force-pushed the fix-windows-service-stop branch from 8762754 to 50c00de Compare April 1, 2026 13:27
@mateuszdrab
Copy link
Copy Markdown
Contributor Author

Applied feedback from automated review and rebased

Copy link
Copy Markdown
Member

@x1unix x1unix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@x1unix x1unix merged commit 450973d into grafana:main Apr 1, 2026
47 of 48 checks passed
gaantunes pushed a commit that referenced this pull request Apr 3, 2026
<!--
  CONTRIBUTORS GUIDE:

https://github.com/grafana/alloy/blob/main/docs/developer/contributing.md

If this is your first PR or you have not contributed in a while, we
recommend
  taking the time to review the guide.

  **NOTE**
Your PR title must adhere to Conventional Commit style. For details on
this,
  check out the Contributors Guide linked above.
-->

### Brief description of Pull Request

Switches service stop command from sc stop to net stop which waits for
service termination.


### Pull Request Details

<!-- Detailed descripion of the Pull Request, if needed. -->


### Issue(s) fixed by this Pull Request

#3605


### Notes to the Reviewer

<!-- Relevant notes for reviewers/testers. -->


### PR Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to
[x]. -->

- [ ] Documentation added
- [ ] Tests updated
- [ ] Config converters updated

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/v1.15 Backport to release/v1.15 frozen-due-to-age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants