-
Notifications
You must be signed in to change notification settings - Fork 53
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
Refactor to switch to snapshotter interface #1906
Refactor to switch to snapshotter interface #1906
Conversation
428ac6a
to
00e7851
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1906 +/- ##
==========================================
- Coverage 73.91% 72.36% -1.55%
==========================================
Files 71 72 +1
Lines 7762 7947 +185
==========================================
+ Hits 5737 5751 +14
- Misses 1600 1724 +124
- Partials 425 472 +47 ☔ View full report in Codecov by Sentry. |
4452069
to
4114b1a
Compare
We should do a code walk-through to get this merged 🤔 |
833a7e0
to
299a2b4
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.
Big PR, so it's hard to get to everything.. I left some comments but generally looks very good!
We could also reconsider setting constants.MaxSnaps = 2
as discussed yesterday.
Good work!
pkg/features/embedded/cloud-config-essentials/system/oem/08_boot_assessment.yaml
Show resolved
Hide resolved
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.
Skimmed through the changes after yesterday code walk-through, looks good... well, actually great job!
Hope to see this merged soon, so we can start testing/using it 🥳
Nice to see the snapshotter interface getting alive, code looks more readable too.
Yes I have to apply these little changes yet. As soon as I manage to manually upgrade an elemental cluster from current staging to a Dev including this PR I'll mark this PR ready to be merged and arrange this little details we discussed yesterday. |
c183404
to
13d07de
Compare
fd0c44e
to
e14ae3e
Compare
1a337bd
to
e0255d5
Compare
This commit adopts snapshotter interface in install, reset and upgrade commands. The change implies changes to the respective specs, grub configuration and dracut modules. This commit also changes the behavior of recovery system upgrades. Now recovery upgrades are an optional step of a system upgrade. Recovery image can't be upgraded without upgrading the active system. Finally build-disk command is also changed to be better aligned with upgrade and install procedures. Expandable disks are an unprivileged build and non expandable ones require privileges as they relay on snapshotter. Signed-off-by: David Cassany <[email protected]>
Signed-off-by: David Cassany <[email protected]>
Signed-off-by: David Cassany <[email protected]>
Signed-off-by: David Cassany <[email protected]>
Signed-off-by: David Cassany <[email protected]>
Signed-off-by: David Cassany <[email protected]>
Signed-off-by: David Cassany <[email protected]>
Signed-off-by: David Cassany <[email protected]>
Signed-off-by: David Cassany <[email protected]>
e0255d5
to
9b1a0e9
Compare
Signed-off-by: David Cassany <[email protected]>
Signed-off-by: David Cassany <[email protected]>
b651f00
to
9d1655b
Compare
Finally got green run on the CI here and managed to run a regular UI based upgrade from staging to this current head. Dev env requires also rancher/elemental#1186 to pass tests |
@@ -18,7 +18,7 @@ package common | |||
|
|||
import "flag" | |||
|
|||
const upImg = "ghcr.io/rancher/elemental-toolkit/elemental-green:v1.3.0" | |||
const upImg = "ghcr.io/rancher/elemental-toolkit/elemental-green:v0.10.7-g3e4a3c56" |
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.
Why go back to such an old release?
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.
To keep grub compatibility, this is compatible with v1.1.0 but not really with v1.2 or v1.3. In fact I think we should stick with v1.1.0 here, but not sure we ever published it to the registry. This was one of the things I wanted to review after merging this.
The issue is with the ${mode}
and ${img}
variables in grub, in v1.2 and v1.3 we assume the image is referred by the ${mode} and the dracut module computes the path. This is hard make it compatible with v1.1.0, v1.2.0 and the upcoming v2.0.x as this implies having several paths adjustments.
If we assume the ${img} and is the full path and ${mode} is just to discriminate recovery vs active args this turns to be easier in terms of backwards compatibility. We have to keep in mind in the grub domain further changes are around the corner with the btrfs snapshotter and that our backward compatibility constraint should stick to v1.1.0 version, as being the latest released elemental-toolkit version. Because of that I took a very conservative approach, because we are likely to need revising it in any case.
This commit adopts snapshotter interface in install, reset and upgrade commands. The change implies changes to the respective specs, grub configuration and dracut modules.
This commit also changes the behavior of recovery system upgrades. Now recovery upgrades are an optional step of a system upgrade. Recovery image can't be upgraded without upgrading the active system.
Finally build-disk command is also changed to be better aligned with upgrade and install procedures. Expandable disks are an unprivileged build and non expandable ones require privileges as they relay on snapshotter.
Fixes #1874
Fixes #1921
Fixes #1922