-
Notifications
You must be signed in to change notification settings - Fork 598
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
many: fix swapping back and forth between kernels with components during remodeling #15046
base: master
Are you sure you want to change the base?
many: fix swapping back and forth between kernels with components during remodeling #15046
Conversation
Tue Feb 18 14:25:45 UTC 2025 No spread failures reported |
88ba090
to
f9f7070
Compare
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.
did a pass
overlord/snapstate/snapstate.go
Outdated
// this previously created a prepare-kernel-snap task, but this was not | ||
// needed since this function is only used to swap to kernel snaps that | ||
// are still installed on the system (but not in use. this can happen | ||
// because remodeling leaves around old snaps). if the snap is | ||
// installed, then it is expected that the drivers tree is present. |
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.
it feels some of this needs to go into the doc comment for (Add)LinkNewBaseOrKernel as it's actually not super clear what their exact usage conditions are
overlord/snapstate/snapstate.go
Outdated
@@ -3492,8 +3503,24 @@ func findSnapSetupTask(tasks []*state.Task) (*state.Task, *SnapSetup, error) { | |||
return nil, nil, nil | |||
} | |||
|
|||
// AddLinkNewBaseOrKernel creates the same tasks as LinkNewBaseOrKernel but adds | |||
// them to the provided task set. | |||
// LinkNewBaseOrKernel appends tasks to a given task set. This enables swapping |
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.
the name is wrong now
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.
My bad, thanks.
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.
thank you
cf19dea
to
0e52fb7
Compare
…nkNewBaseOrKernel and snapstate.AddLinkNewBaseOrKernel
…led kernel during remodel
0e52fb7
to
82bdecb
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #15046 +/- ##
==========================================
+ Coverage 78.07% 78.12% +0.05%
==========================================
Files 1182 1174 -8
Lines 157743 157753 +10
==========================================
+ Hits 123154 123248 +94
+ Misses 26943 26857 -86
- Partials 7646 7648 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This fixes and tests the case where we remodel to a kernel snap that is already installed on the system, but is not the current kernel due to a previous remodel.
Note that this PR removes the existing "prepare-kernel-snap" task from the created tasks here, because the task is superfluous in this case. The kernel's drivers tree is already generated from the original installation of the kernel.