Skip to content

Commit

Permalink
Merge pull request #1729 from dbungert/udi-2252
Browse files Browse the repository at this point in the history
filesystem: fix ~6GB extra pad on classic min size
  • Loading branch information
dbungert committed Jul 20, 2023
2 parents b57087c + c9fcd7d commit 9a57299
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 1 addition & 6 deletions subiquity/server/controllers/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,8 @@ async def _examine_systems(self):
if info is not None:
self._variation_info[name] = info
else:
# This calculation is pretty much a hack and we should
# actually think about it at some point (like: maybe the
# source catalog should directly specify the minimum suitable
# size?)
min_size = 2*variation.size + (1 << 30)
self._variation_info[name] = VariationInfo.classic(
name=name, min_size=min_size)
name=name, min_size=variation.size)

@with_context()
async def apply_autoinstall_config(self, context=None):
Expand Down
7 changes: 6 additions & 1 deletion subiquity/tests/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,12 @@ async def test_serverish_flow(self):

@timeout()
async def test_v2_flow(self):
async with start_server('examples/machines/win10.json') as inst:
cfg = self.machineConfig('examples/machines/simple.json')
with cfg.edit() as data:
attrs = data['storage']['blockdev']['/dev/sda']['attrs']
attrs['size'] = str(25 << 30)
extra_args = ['--source-catalog', 'examples/sources/desktop.yaml']
async with start_server(cfg, extra_args=extra_args) as inst:
disk_id = 'disk-sda'
orig_resp = await inst.get('/storage/v2')
[sda] = match(orig_resp['disks'], id=disk_id)
Expand Down

0 comments on commit 9a57299

Please sign in to comment.