Skip to content

Comments

Get Agent IP every callback#711

Merged
Cictrone merged 5 commits intomainfrom
get-ip-every-callback
Mar 14, 2024
Merged

Get Agent IP every callback#711
Cictrone merged 5 commits intomainfrom
get-ip-every-callback

Conversation

@Cictrone
Copy link
Collaborator

What type of PR is this?

/kind bug

What this PR does / why we need it:

As documented in #704, we were seeing that Imix would sometimes check in faster than the networking stack would complete DHCP on some boxes. To solve this we will just refresh our primary_ip with each callback.

Which issue(s) this PR fixes:

Fixes #704

@Cictrone Cictrone requested a review from hulto March 14, 2024 22:13
"rust-analyzer"
],
"rust-analyzer.check.command": "clippy",
"rust-analyzer.showUnlinkedFileNotification": false,
Copy link
Collaborator Author

@Cictrone Cictrone Mar 14, 2024

Choose a reason for hiding this comment

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

this stops an annoying and not very useful vs code pop-up. I would like to leave it in but if we don't want to I'll remove it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Idk what this does

@Cictrone
Copy link
Collaborator Author

Cictrone commented Mar 14, 2024

Some output for what it looks like while Imix waits for the box to have an IP:

 2024-03-14T22:07:25.030Z ERROR imix::config > failed to get primary ip: Local IP address not found
 2024-03-14T22:07:25.038Z INFO  imix::agent  > claimed 0 tasks
 2024-03-14T22:07:25.038Z INFO  imix::agent  > completed callback in 0s, sleeping for 5s
 2024-03-14T22:07:30.043Z ERROR imix::config > failed to get primary ip: Local IP address not found
 2024-03-14T22:07:30.050Z INFO  imix::agent  > claimed 0 tasks
 2024-03-14T22:07:30.051Z INFO  imix::agent  > completed callback in 0s, sleeping for 5s
 2024-03-14T22:07:35.053Z ERROR imix::config > failed to get primary ip: Local IP address not found
 2024-03-14T22:07:35.064Z INFO  imix::agent  > claimed 0 tasks
 2024-03-14T22:07:35.064Z INFO  imix::agent  > completed callback in 0s, sleeping for 5s
 2024-03-14T22:07:40.069Z ERROR imix::config > failed to get primary ip: Local IP address not found
 2024-03-14T22:07:40.076Z INFO  imix::agent  > claimed 0 tasks
 2024-03-14T22:07:40.077Z INFO  imix::agent  > completed callback in 0s, sleeping for 5s
 2024-03-14T22:07:45.082Z ERROR imix::config > failed to get primary ip: Local IP address not found
 2024-03-14T22:07:45.088Z INFO  imix::agent  > claimed 0 tasks
 2024-03-14T22:07:45.089Z INFO  imix::agent  > completed callback in 0s, sleeping for 5s
 2024-03-14T22:07:50.115Z INFO  imix::agent  > claimed 0 tasks
 2024-03-14T22:07:50.115Z INFO  imix::agent  > completed callback in 0s, sleeping for 5s
 2024-03-14T22:07:55.137Z INFO  imix::agent  > claimed 0 tasks
 2024-03-14T22:07:55.137Z INFO  imix::agent  > completed callback in 0s, sleeping for 5s
 2024-03-14T22:08:00.162Z INFO  imix::agent  > claimed 0 tasks
 2024-03-14T22:08:00.162Z INFO  imix::agent  > completed callback in 0s, sleeping for 5s
 2024-03-14T22:08:05.187Z INFO  imix::agent  > claimed 0 tasks
 2024-03-14T22:08:05.187Z INFO  imix::agent  > completed callback in 0s, sleeping for 5s
 2024-03-14T22:08:10.208Z INFO  imix::agent  > claimed 0 tasks
 2024-03-14T22:08:10.209Z INFO  imix::agent  > completed callback in 0s, sleeping for 5s

@codecov
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 19 lines in your changes are missing coverage. Please review.

Project coverage is 71.95%. Comparing base (b2aa17e) to head (e004008).

Files Patch % Lines
implants/imix/src/config.rs 0.00% 14 Missing ⚠️
implants/imix/src/agent.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #711      +/-   ##
==========================================
- Coverage   72.06%   71.95%   -0.12%     
==========================================
  Files         175      175              
  Lines       12232    12251      +19     
==========================================
  Hits         8815     8815              
- Misses       3202     3221      +19     
  Partials      215      215              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

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

Bless

@Cictrone Cictrone merged commit 91052d1 into main Mar 14, 2024
@Cictrone Cictrone deleted the get-ip-every-callback branch March 14, 2024 22:34
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.

Get agent IP every callback

2 participants