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

maint(windows-agent): Investigate skipping distros #902

Merged
merged 4 commits into from
Dec 10, 2024

Conversation

CarlosNihelton
Copy link
Contributor

time=2024-07-24T12:17:10-07:00 level=error msg=Landscape:  skipping distro "Ubuntu-24.04" from landscape info: could not get distro "Ubuntu-24.04"'s state: could not get states of distros: exit status 1. Stdout: . Stderr:

That happens during construction of the status message sent to Landscape. If we skip a distro, Landscape understands it doesn't exist anymore and removes it from the dashboard. But that happens sometimes when an existing distro. It seems a WSL internal error.

ubuntu/GoWSL#120 should prevent the stdout and stderr messages to come empty as shown above.
Thus I'm updating GoWSL here.

That doesn't prevent the issue itself.

I couldn’t reproduce this outside of UP4W. I attempted building a small binary in Go doing the same steps as GoWSL does and put it to run during system startup in loop, rebooted the OS many times but no success. The few times I’ve seen this happening in the logs were early during app startup, so I suspect it may happen because some WSL internal component is not yet ready. Thus this PR: adding one-time retry if an error happens when attempting to retrieve a distro state.

Either that will prevent the issue once for all or at least give us more context about what causes that error.


UDENG-3722

@CarlosNihelton CarlosNihelton changed the title Investigate skipping distros maint(windows-agent): Investigate skipping distros Sep 6, 2024
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.35%. Comparing base (b4a5f0d) to head (fdb3d8b).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #902      +/-   ##
==========================================
+ Coverage   89.28%   89.35%   +0.07%     
==========================================
  Files         110      110              
  Lines        7520     7533      +13     
==========================================
+ Hits         6714     6731      +17     
+ Misses        627      625       -2     
+ Partials      179      177       -2     

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

@CarlosNihelton
Copy link
Contributor Author

Now we have to upgrade the Go. I'm unsure if we should Go with the toolchain to 1.22.7 or migrate straight into 1.23.1. 1.23.0 is affected by the same vulnerability reported in ´go/parser`.

@CarlosNihelton CarlosNihelton marked this pull request as ready for review September 6, 2024 20:52
@CarlosNihelton CarlosNihelton requested a review from a team as a code owner September 6, 2024 20:52
@jibel
Copy link
Contributor

jibel commented Sep 19, 2024

Now we have to upgrade the Go. I'm unsure if we should Go with the toolchain to 1.22.7 or migrate straight into 1.23.1. 1.23.0 is affected by the same vulnerability reported in ´go/parser`.

The version of Go has been bumped to 1.23, so you'd just need to rebase this PR

@CarlosNihelton CarlosNihelton force-pushed the investigate-skipping-distros branch from a65d3ad to 1f1336f Compare September 19, 2024 19:32
@CarlosNihelton CarlosNihelton self-assigned this Sep 19, 2024
Copy link
Collaborator

@didrocks didrocks left a comment

Choose a reason for hiding this comment

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

Tell me what you think about my comment or if you think this is unecessary.

As a aside, you will to rebase again due to conflicts :)

windows-agent/internal/proservices/landscape/utils.go Outdated Show resolved Hide resolved
in Landscape newHostAgentInfo assembly
due WSL internal errors which I couldn't reproduce
outside of UP4W.
@CarlosNihelton CarlosNihelton force-pushed the investigate-skipping-distros branch 2 times, most recently from 75baf7e to 1e7898c Compare December 6, 2024 12:51
@CarlosNihelton
Copy link
Contributor Author

CarlosNihelton commented Dec 6, 2024

Rebased over the latest main, updated GoWSL dependency and implemented the looping.

@CarlosNihelton CarlosNihelton force-pushed the investigate-skipping-distros branch from 1e7898c to fdb3d8b Compare December 6, 2024 13:04
Copy link
Collaborator

@didrocks didrocks left a comment

Choose a reason for hiding this comment

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

Looking all good from my side!

@CarlosNihelton CarlosNihelton merged commit dad318d into main Dec 10, 2024
36 checks passed
@CarlosNihelton CarlosNihelton deleted the investigate-skipping-distros branch December 10, 2024 16:45
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