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

chore(windows): Rework Windows service handling #15372

Merged
merged 5 commits into from
Jun 3, 2024

Conversation

srebhan
Copy link
Contributor

@srebhan srebhan commented May 16, 2024

Summary

This PR reworked the Windows service handling of Telegraf, including the replacing a 3rd-party library with standard calls as well as introducing the service command instead of the --service flag.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #14834

@telegraf-tiger telegraf-tiger bot added the chore label May 16, 2024
@Hr0bar
Copy link
Contributor

Hr0bar commented May 17, 2024

Will this be an important/breaking changelog change? As the --service to service will likely break deploy scripts/pipelines

@srebhan
Copy link
Contributor Author

srebhan commented May 17, 2024

@Hr0bar of course --service will still work ;-), but it is marked as deprecated and will show a message suggesting to switch to the service command.

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label May 22, 2024
@srebhan srebhan assigned powersj and DStrand1 and unassigned srebhan May 22, 2024
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks for the (what looks like) backwards compatible commands and the cleanup of reading the config.

Played with this locally a bit and looked good. I think we should clean up the service subcommand output a bit, no need to echo what we are going to do back to the user, and there always appears to be an extra newline?

cmd/telegraf/cmd_win_service.go Show resolved Hide resolved
cmd/telegraf/cmd_win_service.go Outdated Show resolved Hide resolved
cmd/telegraf/cmd_win_service.go Show resolved Hide resolved
cmd/telegraf/cmd_win_service.go Outdated Show resolved Hide resolved
cmd/telegraf/cmd_win_service.go Outdated Show resolved Hide resolved
cmd/telegraf/cmd_win_service.go Show resolved Hide resolved
cmd/telegraf/cmd_win_service.go Show resolved Hide resolved
cmd/telegraf/cmd_win_service.go Outdated Show resolved Hide resolved
cmd/telegraf/cmd_win_service.go Outdated Show resolved Hide resolved
cmd/telegraf/cmd_win_service.go Show resolved Hide resolved
@srebhan srebhan requested a review from powersj June 3, 2024 09:12
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Jun 3, 2024

@powersj powersj removed their assignment Jun 3, 2024
@DStrand1 DStrand1 merged commit 274fbd4 into influxdata:master Jun 3, 2024
26 of 27 checks passed
@github-actions github-actions bot added this to the v1.31.0 milestone Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent chore platform/windows ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect telegraf service termination during operating system reboot
4 participants