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

[filestream] - input being degraded even if context is cancelled #42296

Open
VihasMakwana opened this issue Jan 13, 2025 · 4 comments
Open

[filestream] - input being degraded even if context is cancelled #42296

VihasMakwana opened this issue Jan 13, 2025 · 4 comments
Assignees
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@VihasMakwana
Copy link
Contributor

We have a faulty piece of code at

if err := inp.readFromSource(ctx, log, r, fs.newPath, state, publisher, metrics); err != nil {
ctx.UpdateStatus(status.Degraded, fmt.Sprintf("error while reading from source: %v", err))
return err
}

We report input as DEGRADED on any error. However, we should not report degraded if context is cancelled.

@VihasMakwana VihasMakwana self-assigned this Jan 13, 2025
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 13, 2025
@VihasMakwana VihasMakwana added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Jan 13, 2025
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 13, 2025
@lucabelluccini
Copy link
Contributor

The drawback of this is Elastic Agents show up unhealthy on Fleet UI (as 1 or more units are not healthy), generating concerns on users.

@VihasMakwana
Copy link
Contributor Author

@cmacknz what should be the best course of action here? We shouldn't report context canceled and mark agent as degraded, right?

i think we should filter such errors out while reporting degraded mode.

@cmacknz
Copy link
Member

cmacknz commented Jan 15, 2025

We shouldn't report context canceled and mark agent as degraded, right?

Correct as this likely isn't a real error and probably a side effect of shutting down or reloading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

No branches or pull requests

4 participants