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

Fix UC image size #251

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Fix UC image size #251

wants to merge 3 commits into from

Conversation

upils
Copy link
Collaborator

@upils upils commented Oct 1, 2024

Since the Go rewrite we were adding 34*1024 sectors of 512 bytes at the end of the disk to account for the GPT backup header. This was too much and was hiding the fact that we were not calculating the size needed by the structures defined in the gadget.yaml.

Now that the partition handling has been reworked, some room was missing.

Fix the issue by using the max volume size as the minimum size needed.

Solves LP: #2077572.
Closes: FR-9159

Use the max size of the volume to create the disk image to make sure snapd will have enough room to create additional partitions defined in the gadget.yaml at first boot in the UC case.

Signed-off-by: Paul Mars <[email protected]>
@upils upils self-assigned this Oct 1, 2024
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.91%. Comparing base (c7446c8) to head (5f0bb9e).

Files with missing lines Patch % Lines
internal/statemachine/common_states.go 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #251      +/-   ##
==========================================
- Coverage   93.96%   93.91%   -0.05%     
==========================================
  Files          18       18              
  Lines        3429     3437       +8     
==========================================
+ Hits         3222     3228       +6     
- Misses        133      134       +1     
- Partials       74       75       +1     
Flag Coverage Δ
unittests 93.91% <86.66%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@upils
Copy link
Collaborator Author

upils commented Oct 1, 2024

Waiting for canonical/snapd#14561 to land before cleaning and merging this.

@upils upils marked this pull request as draft October 2, 2024 15:19
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.

2 participants