Merge lp:~paride/auto-upgrade-testing/ramsettings into lp:auto-upgrade-testing

Proposed by Paride Legovini
Status: Merged
Merged at revision: 94
Proposed branch: lp:~paride/auto-upgrade-testing/ramsettings
Merge into: lp:auto-upgrade-testing
Diff against target: 22 lines (+3/-2)
1 file modified
upgrade_testing/provisioning/backends/_qemu.py (+3/-2)
To merge this branch: bzr merge lp:~paride/auto-upgrade-testing/ramsettings
Reviewer Review Type Date Requested Status
platform-qa-bot continuous-integration Approve
Brian Murray Approve
Review via email: mp+374097@code.launchpad.net

Commit message

qemu backend: honor DEFAULT_CPU and DEFAULT_RAM

When using qemu the upgrade test can work in two modes: by calling
adt-run (autopkgtest) with the qemu backend, or in "keep-overlay"
mode, where a qemu VM is started by the test harness and adt-run
is made use it via its SSH backend. The DEFAULT_CPU and DEFAULT_RAM settings were used only in keep-overlay mode, and ignored when using
the qemu backend directly.

This commit passes DEFAULT_CPU and DEFAULT_RAM to the qemu backend, using the flags specified in autopkgtest-virt-qemu(1). The DEFAULT_RAM setting has been changed from '2G' to '2048', as '2G' is not understood by autopkgtest-virt-qemu, while both autopkgtest-virt-qemu and qemu understand the ram size as a plain number, and assume it's in megabytes.

This issue has been discovered as the Ubuntu Deskop upgrade from Disco to Eoan takes more than 1GB of ram (qemu's default).

To post a comment you must log in.
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Needs Fixing (continuous-integration)
95. By Paride Legovini

Fix flake8 indentation error

Revision history for this message
Brian Murray (brian-murray) wrote :

This looks good to me, thanks for working on this!

review: Approve
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'upgrade_testing/provisioning/backends/_qemu.py'
2--- upgrade_testing/provisioning/backends/_qemu.py 2017-07-14 19:29:03 +0000
3+++ upgrade_testing/provisioning/backends/_qemu.py 2019-10-14 17:00:47 +0000
4@@ -64,7 +64,7 @@
5 QEMU_DISK_IMAGE_OVERLAY_OPTS = (
6 '-drive file={overlay_img},cache=unsafe,if=virtio,index=0 '
7 )
8-DEFAULT_RAM = '2G'
9+DEFAULT_RAM = '2048'
10 DEFAULT_CPU = '2'
11 HEADLESS = True
12
13@@ -160,7 +160,8 @@
14 self.image_name))
15 super().connect()
16 return super().get_adt_run_args()
17- return ['qemu', os.path.join(CACHE_DIR, self.image_name)]
18+ return ['qemu', '-c', DEFAULT_CPU, '--ram-size', DEFAULT_RAM,
19+ os.path.join(CACHE_DIR, self.image_name)]
20
21 def create_overlay_image(self, overlay_img):
22 """Create an overlay image for specified base image."""

Subscribers

People subscribed via source and target branches