-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Ingest Manager] Unroll on unauthorised #19722
[Ingest Manager] Unroll on unauthorised #19722
Conversation
Pinging @elastic/ingest-management (Team:Ingest Management) |
💔 Build FailedExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question about string matching, but overall this looks really good.
return false | ||
} | ||
|
||
return strings.Contains(err.Error(), fleetapi.ErrInvalidAPIKey.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it not possible to unwrap the error and check for the specific error type?
Would prefer that over string matching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i spent some time trying to achieve that but with no luck, took a different path today , fresh mind helped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition on the errors matching, thanks for that!
[Ingest Manager] Unroll on unauthorised (elastic#19722)
[Ingest Manager] Unroll on unauthorised (elastic#19722)
What does this PR do?
Followup to #19507
This PR detects invalid API token error coming from fleet and after
6
times of retries with backoff in row (should take 5 minutes or so to avoid transient issues). On succ request counter is zeroed.When unroll is detected (and not coming from fleet) it is not acked but stored in action_store. Removing action store manually will enable agent to ping fleet again. Otherwise it detects it's unrolled on start and prevent talking to fleet
Why is it important?
When API is revoked agent is not notified about this and starts seeing errors. Agent does not know how to handle that and tries to kick fleet periodically
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.