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

agent: rerun agent when failed to get status #572

Conversation

vyaghras
Copy link
Contributor

@vyaghras vyaghras commented Nov 6, 2023

Issue number: 568

Description of changes:
Restart the event loop for agent when the Status is not present in Bottlerocket Shadow.

Testing done:
Before change: Agent exited and restarts agent because of error Unable to operate on BottlerocketShadow: 'Unable to get Bottlerocket node 'status' because of missing 'status' value'

 2023-10-30T16:44:04.396950Z ERROR agent::agentclient: error: Unable to operate on BottlerocketShadow: 'Unable to get Bottlerocket node 'status' because of missing 'status' value'
    at agent/src/agentclient.rs:519
    in agent::agentclient::run
 
  2023-10-30T16:44:04.396986Z ERROR agent: Agent runner exited
    at agent/src/main.rs:116

After change: Restarts the event loop in agent to refetch bottlerocket_shadow containing Status.

2023-11-03T23:31:09.587781Z  WARN agent::agentclient: An error occurred when fetching BottlerocketShadowStatus. Restarting event loop
    at agent/src/agentclient.rs:555
    in agent::agentclient::run

  2023-11-03T23:33:02.788282Z  INFO agent::agentclient: Checking for Bottlerocket updates.
    at agent/src/agentclient.rs:209

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Restart the event loop for agent when the Status is not present in
Bottlerocket Shadow.
@vyaghras vyaghras force-pushed the missing-status-issue-in-Bottlerocket-shadow branch from 1953de0 to d114517 Compare November 6, 2023 19:20
Copy link
Contributor

@cbgbt cbgbt left a comment

Choose a reason for hiding this comment

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

Nice work!

@vyaghras vyaghras merged commit 413c832 into bottlerocket-os:develop Nov 16, 2023
2 checks passed
@vyaghras vyaghras deleted the missing-status-issue-in-Bottlerocket-shadow branch November 16, 2023 19:54
@cbgbt cbgbt mentioned this pull request Jun 25, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants