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

collector state won't be set to Running state after watch is triggered #5830

Closed
splunkericl opened this issue Aug 5, 2022 · 5 comments · Fixed by #5896
Closed

collector state won't be set to Running state after watch is triggered #5830

splunkericl opened this issue Aug 5, 2022 · 5 comments · Fixed by #5896
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Good issue for contributors to OpenTelemetry Service to pick up

Comments

@splunkericl
Copy link
Contributor

Describe the bug
After configuration is updated and watch is triggered, the collector health state will be stuck at Starting even tho the collector has started completely.

Steps to reproduce

  • Run the collector
  • trigger watch operation in config provider
  • check collector state by calling GetState
  • state won't be in Running and will always be in Starting

What did you expect to see?
collector state to be Running

What did you see instead?
Collector state is always Starting

What version did you use?
latest. https://github.com/open-telemetry/opentelemetry-collector/blob/main/service/collector.go#L140

What config did you use?
any config

Environment
OS: mac catalina

@splunkericl splunkericl added the bug Something isn't working label Aug 5, 2022
@splunkericl
Copy link
Contributor Author

The bug is relatively easy to fix, we just need to set the collector state to running after https://github.com/open-telemetry/opentelemetry-collector/blob/main/service/collector.go#L154 or move col.setCollectorState(Running) to the end of setupConfigurationComponents call

@bogdandrutu
Copy link
Member

Thanks for the report. Please submit a PR with the fix.

@dmitryax dmitryax added help wanted Good issue for contributors to OpenTelemetry Service to pick up good first issue Good for newcomers labels Aug 9, 2022
@kovrus
Copy link
Member

kovrus commented Aug 11, 2022

@dmitryax I can take that over.

bogdandrutu added a commit that referenced this issue Aug 15, 2022
…event. (#5896)

* Fix bug in setting the correct collector state after a config change event.

Fixes #5830.

* Update collector_test.go

Co-authored-by: Bogdan Drutu <[email protected]>
Co-authored-by: Bogdan Drutu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Good issue for contributors to OpenTelemetry Service to pick up
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@bogdandrutu @dmitryax @kovrus @splunkericl and others