-
Notifications
You must be signed in to change notification settings - Fork 12
Conversation
The elemental-cli used within this commit is an experimental one including the image deployment refactor from: rancher/elemental-cli#404 Signed-off-by: David Cassany <dcassany@suse.com>
The elemental-cli used within this commit is an experimental one including the image deployment refactor from: rancher/elemental-cli#404 Signed-off-by: David Cassany <dcassany@suse.com>
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.
I'd recommend to put the copyright year changes in a separate PR
Signed-off-by: David Cassany <dcassany@suse.com>
This commit refactors elemental image deploy procedure to always create and prepare the root tree in a temporary folder before synching it to a filesystem image most likely as a mounted loop device. This change has a couple of immediate benefits: 1. We can precompute the root tree size before creating the filesystem image. Hence image sizes can be adjusted to root-tree size. 2. There is no path differentiation between filesystems. The root tree is prepared following the same logic independently of the target filesystem. Squashfs is no longer an exception, building the image follows the same logic as it was any other writable filesystem. We also can argue this is a simple, robust and flexible logic compared with the previous code. The counter part is having to prepare the root-tree to later on copy it to the final image, this causes the root-tree to be written twice, one to prepare it and another one to sync it to the target location. Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: David Cassany <dcassany@suse.com>
bce2d57
to
384ab51
Compare
Codecov ReportBase: 75.94% // Head: 75.76% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #404 +/- ##
==========================================
- Coverage 75.94% 75.76% -0.18%
==========================================
Files 61 61
Lines 6189 6284 +95
==========================================
+ Hits 4700 4761 +61
- Misses 1160 1187 +27
- Partials 329 336 +7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
The elemental-cli used within this commit is an experimental one including the image deployment refactor from: rancher/elemental-cli#404 Signed-off-by: David Cassany <dcassany@suse.com>
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.
lgtm 🤞🏻
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.
Works like a charm!
The checked text has been slightly modified due to refactoring in elemental-cli. See rancher/elemental-cli#404. Signed-off-by: Loic Devulder <ldevulder@suse.com>
The checked text has been slightly modified due to refactoring in elemental-cli. See rancher/elemental-cli#404. Signed-off-by: Loic Devulder <ldevulder@suse.com>
The checked text has been slightly modified due to refactoring in elemental-cli. See rancher/elemental-cli#404. Signed-off-by: Loic Devulder <ldevulder@suse.com>
The elemental-cli used within this commit is an experimental one including the image deployment refactor from: rancher/elemental-cli#404 Signed-off-by: David Cassany <dcassany@suse.com>
The elemental-cli used within this commit is an experimental one including the image deployment refactor from: rancher/elemental-cli#404 Signed-off-by: David Cassany <dcassany@suse.com>
This commit refactors elemental image deploy procedure to always create and prepare the root tree in a temporary folder before synching it to a filesystem image most likely as a mounted loop device.
This change has a couple of immediate benefits:
We can pre-compute the root tree size before creating the filesystem image. Hence image sizes can be adjusted to root-tree size. Currently in this PR the default size of the images is set to
0
which means it will use as much as the image requires plus and arbitrary overhead of 256MB (we could consider making it configurable if needed). The use of an static size is still possible by setting the partition size to any value greater than0
.There is no path differentiation between filesystems. The root tree is prepared following the same logic independently of the target filesystem. Squashfs is no longer an exception, building the image follows the same logic as it was any other writable filesystem.
We also can argue this is a simple, robust and flexible logic compared with the previous code.
The counter part is having to prepare the root-tree to later on copy it to the final image, this causes the root-tree to be written twice, one to prepare it and another one to sync it to the target location.
Fixes #172