Merge lp:~raharper/curtin/trunk.dirty-disks-in-early-command into lp:~curtin-dev/curtin/trunk
- trunk.dirty-disks-in-early-command
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 498 |
Proposed branch: | lp:~raharper/curtin/trunk.dirty-disks-in-early-command |
Merge into: | lp:~curtin-dev/curtin/trunk |
Diff against target: |
451 lines (+84/-16) 18 files modified
doc/topics/integration-testing.rst (+5/-0) examples/tests/allindata.yaml (+4/-0) examples/tests/basic.yaml (+1/-0) examples/tests/bcache_basic.yaml (+1/-0) examples/tests/dirty_disks_config.yaml (+10/-0) examples/tests/lvm.yaml (+1/-0) examples/tests/mdadm_bcache.yaml (+3/-0) examples/tests/mdadm_bcache_complex.yaml (+3/-0) examples/tests/mirrorboot-uefi.yaml (+0/-12) examples/tests/mirrorboot.yaml (+2/-0) examples/tests/raid10boot.yaml (+4/-0) examples/tests/raid5boot.yaml (+3/-0) examples/tests/raid6boot.yaml (+4/-0) tests/vmtests/__init__.py (+30/-1) tests/vmtests/test_basic.py (+2/-0) tests/vmtests/test_bcache_basic.py (+2/-0) tests/vmtests/test_mdadm_bcache.py (+2/-0) tools/launch (+7/-3) |
To merge this branch: | bzr merge lp:~raharper/curtin/trunk.dirty-disks-in-early-command |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Scott Moser (community) | Approve | ||
Review via email: mp+323179@code.launchpad.net |
Commit message
Description of the change
vmtests: enable tests apply storage config to validate clear_holders path
Allow test classes with storage configurations to optionally run curtin
block-meta during the early stage to "dirty" the disks used in the
test-case. This exercises curtin's clear-holders path to closer match
MAAS redeploying systems with existing storage configurations. In some
cases, we need to run with multiple virtual processors to allow race
conditions to occur and exercise curtin's handling of these situations.
- Add class attribute 'nr_cpus' (integer) to control number of VCPUS used
in the guest.
Defaults to 1, allows CURTIN_
- Add class attribute 'dirty_disks' (boolean) to control if a test class
will enable running the early command.
Defaults to False
- Add class attribute 'dirty_disk_config' (string) which is path to the
generic early_command yaml blob used to run curtin block-meta with the
test-case's storage config.
Defaults to 'examples/
- tools/launch accepts --smp to control the number of VCPUS to use in the
VM
- 498. By Ryan Harper
-
Remove early_commands from bcache, enable via class attr, whitespace
Server Team CI bot (server-team-bot) wrote : | # |
Scott Moser (smoser) : | # |
- 499. By Ryan Harper
-
merge from trunk
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:499
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 500. By Ryan Harper
-
Add wipe: superblock to all storage configs
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:500
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 501. By Ryan Harper
-
Fix mising comma after smp entry in getops long_opts
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:501
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 502. By Ryan Harper
-
merge from trunk
- 503. By Ryan Harper
-
Use nr_cpus and dirty_disks to handle regression testing of mirrorboot-uefi
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:503
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 504. By Ryan Harper
-
merge from trunk
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:504
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'doc/topics/integration-testing.rst' | |||
2 | --- doc/topics/integration-testing.rst 2017-04-21 18:09:54 +0000 | |||
3 | +++ doc/topics/integration-testing.rst 2017-05-15 15:58:10 +0000 | |||
4 | @@ -205,6 +205,11 @@ | |||
5 | 205 | This modifies the invocation of nosetets to add '--processes' and other | 205 | This modifies the invocation of nosetets to add '--processes' and other |
6 | 206 | necessary nose arguments (--process-timeout) | 206 | necessary nose arguments (--process-timeout) |
7 | 207 | 207 | ||
8 | 208 | - ``CURTIN_VMTEST_NR_CPUS``: default '' | ||
9 | 209 | |||
10 | 210 | Allow environment to override the number of virtual cpus to allocate | ||
11 | 211 | in the target virtual machines. | ||
12 | 212 | |||
13 | 208 | - ``IMAGE_DIR``: default /srv/images | 213 | - ``IMAGE_DIR``: default /srv/images |
14 | 209 | 214 | ||
15 | 210 | Vmtest keeps a mirror of maas ephemeral images in this directory. | 215 | Vmtest keeps a mirror of maas ephemeral images in this directory. |
16 | 211 | 216 | ||
17 | === modified file 'examples/tests/allindata.yaml' | |||
18 | --- examples/tests/allindata.yaml 2016-04-14 01:45:54 +0000 | |||
19 | +++ examples/tests/allindata.yaml 2017-05-15 15:58:10 +0000 | |||
20 | @@ -4,6 +4,7 @@ | |||
21 | 4 | config: | 4 | config: |
22 | 5 | - id: sda | 5 | - id: sda |
23 | 6 | type: disk | 6 | type: disk |
24 | 7 | wipe: superblock | ||
25 | 7 | ptable: gpt | 8 | ptable: gpt |
26 | 8 | model: QEMU HARDDISK | 9 | model: QEMU HARDDISK |
27 | 9 | path: /dev/vdb | 10 | path: /dev/vdb |
28 | @@ -42,6 +43,7 @@ | |||
29 | 42 | number: 6 # XXX: we really need to stop using id with DiskPartnum | 43 | number: 6 # XXX: we really need to stop using id with DiskPartnum |
30 | 43 | - id: sdb | 44 | - id: sdb |
31 | 44 | type: disk | 45 | type: disk |
32 | 46 | wipe: superblock | ||
33 | 45 | ptable: gpt | 47 | ptable: gpt |
34 | 46 | model: QEMU HARDDISK | 48 | model: QEMU HARDDISK |
35 | 47 | path: /dev/vdc | 49 | path: /dev/vdc |
36 | @@ -64,6 +66,7 @@ | |||
37 | 64 | device: sdb | 66 | device: sdb |
38 | 65 | - id: sdc | 67 | - id: sdc |
39 | 66 | type: disk | 68 | type: disk |
40 | 69 | wipe: superblock | ||
41 | 67 | ptable: gpt | 70 | ptable: gpt |
42 | 68 | model: QEMU HARDDISK | 71 | model: QEMU HARDDISK |
43 | 69 | path: /dev/vdd | 72 | path: /dev/vdd |
44 | @@ -86,6 +89,7 @@ | |||
45 | 86 | device: sdc | 89 | device: sdc |
46 | 87 | - id: sdd | 90 | - id: sdd |
47 | 88 | type: disk | 91 | type: disk |
48 | 92 | wipe: superblock | ||
49 | 89 | ptable: gpt | 93 | ptable: gpt |
50 | 90 | model: QEMU HARDDISK | 94 | model: QEMU HARDDISK |
51 | 91 | path: /dev/vde | 95 | path: /dev/vde |
52 | 92 | 96 | ||
53 | === modified file 'examples/tests/basic.yaml' | |||
54 | --- examples/tests/basic.yaml 2016-08-01 17:18:18 +0000 | |||
55 | +++ examples/tests/basic.yaml 2017-05-15 15:58:10 +0000 | |||
56 | @@ -25,6 +25,7 @@ | |||
57 | 25 | type: format | 25 | type: format |
58 | 26 | fstype: ext4 | 26 | fstype: ext4 |
59 | 27 | volume: sda1 | 27 | volume: sda1 |
60 | 28 | label: 'cloudimg-rootfs' | ||
61 | 28 | - id: sda2_home | 29 | - id: sda2_home |
62 | 29 | type: format | 30 | type: format |
63 | 30 | fstype: ext4 | 31 | fstype: ext4 |
64 | 31 | 32 | ||
65 | === modified file 'examples/tests/bcache_basic.yaml' | |||
66 | --- examples/tests/bcache_basic.yaml 2016-04-04 16:03:32 +0000 | |||
67 | +++ examples/tests/bcache_basic.yaml 2017-05-15 15:58:10 +0000 | |||
68 | @@ -1,4 +1,5 @@ | |||
69 | 1 | showtrace: true | 1 | showtrace: true |
70 | 2 | |||
71 | 2 | storage: | 3 | storage: |
72 | 3 | config: | 4 | config: |
73 | 4 | - id: id_rotary0 | 5 | - id: id_rotary0 |
74 | 5 | 6 | ||
75 | === added file 'examples/tests/dirty_disks_config.yaml' | |||
76 | --- examples/tests/dirty_disks_config.yaml 1970-01-01 00:00:00 +0000 | |||
77 | +++ examples/tests/dirty_disks_config.yaml 2017-05-15 15:58:10 +0000 | |||
78 | @@ -0,0 +1,10 @@ | |||
79 | 1 | early_commands: | ||
80 | 2 | # running block-meta custom from the install environment | ||
81 | 3 | # inherits the CONFIG environment, so this works to actually prepare | ||
82 | 4 | # the disks exactly as in this config before the rest of the install | ||
83 | 5 | # will just blow it all away. We have clean out other environment | ||
84 | 6 | # that could unintentionally mess things up. | ||
85 | 7 | blockmeta: [env, -u, OUTPUT_FSTAB, | ||
86 | 8 | TARGET_MOUNT_POINT=/tmp/my.bdir/target, | ||
87 | 9 | WORKING_DIR=/tmp/my.bdir/work.d, | ||
88 | 10 | curtin, --showtrace, -v, block-meta, --umount, custom] | ||
89 | 0 | 11 | ||
90 | === modified file 'examples/tests/lvm.yaml' | |||
91 | --- examples/tests/lvm.yaml 2016-04-04 16:03:32 +0000 | |||
92 | +++ examples/tests/lvm.yaml 2017-05-15 15:58:10 +0000 | |||
93 | @@ -4,6 +4,7 @@ | |||
94 | 4 | config: | 4 | config: |
95 | 5 | - id: sda | 5 | - id: sda |
96 | 6 | type: disk | 6 | type: disk |
97 | 7 | wipe: superblock | ||
98 | 7 | ptable: msdos | 8 | ptable: msdos |
99 | 8 | model: QEMU HARDDISK | 9 | model: QEMU HARDDISK |
100 | 9 | path: /dev/vdb | 10 | path: /dev/vdb |
101 | 10 | 11 | ||
102 | === modified file 'examples/tests/mdadm_bcache.yaml' | |||
103 | --- examples/tests/mdadm_bcache.yaml 2016-04-17 22:35:20 +0000 | |||
104 | +++ examples/tests/mdadm_bcache.yaml 2017-05-15 15:58:10 +0000 | |||
105 | @@ -5,6 +5,7 @@ | |||
106 | 5 | - grub_device: true | 5 | - grub_device: true |
107 | 6 | id: sda | 6 | id: sda |
108 | 7 | type: disk | 7 | type: disk |
109 | 8 | wipe: superblock | ||
110 | 8 | ptable: gpt | 9 | ptable: gpt |
111 | 9 | model: QEMU HARDDISK | 10 | model: QEMU HARDDISK |
112 | 10 | path: /dev/vdb | 11 | path: /dev/vdb |
113 | @@ -53,11 +54,13 @@ | |||
114 | 53 | uuid: deadbeef-dead-beef-dead-deadbeefaaa6 | 54 | uuid: deadbeef-dead-beef-dead-deadbeefaaa6 |
115 | 54 | - id: sdb | 55 | - id: sdb |
116 | 55 | type: disk | 56 | type: disk |
117 | 57 | wipe: superblock | ||
118 | 56 | model: QEMU HARDDISK | 58 | model: QEMU HARDDISK |
119 | 57 | path: /dev/vdc | 59 | path: /dev/vdc |
120 | 58 | name: second_disk | 60 | name: second_disk |
121 | 59 | - id: sdc | 61 | - id: sdc |
122 | 60 | type: disk | 62 | type: disk |
123 | 63 | wipe: superblock | ||
124 | 61 | ptable: gpt | 64 | ptable: gpt |
125 | 62 | model: QEMU HARDDISK | 65 | model: QEMU HARDDISK |
126 | 63 | path: /dev/vdd | 66 | path: /dev/vdd |
127 | 64 | 67 | ||
128 | === modified file 'examples/tests/mdadm_bcache_complex.yaml' | |||
129 | --- examples/tests/mdadm_bcache_complex.yaml 2015-11-25 13:45:53 +0000 | |||
130 | +++ examples/tests/mdadm_bcache_complex.yaml 2017-05-15 15:58:10 +0000 | |||
131 | @@ -4,6 +4,7 @@ | |||
132 | 4 | - grub_device: true | 4 | - grub_device: true |
133 | 5 | id: sda | 5 | id: sda |
134 | 6 | type: disk | 6 | type: disk |
135 | 7 | wipe: superblock | ||
136 | 7 | ptable: gpt | 8 | ptable: gpt |
137 | 8 | model: QEMU HARDDISK | 9 | model: QEMU HARDDISK |
138 | 9 | path: /dev/vdb | 10 | path: /dev/vdb |
139 | @@ -43,11 +44,13 @@ | |||
140 | 43 | device: sda | 44 | device: sda |
141 | 44 | - id: sdb | 45 | - id: sdb |
142 | 45 | type: disk | 46 | type: disk |
143 | 47 | wipe: superblock | ||
144 | 46 | model: QEMU HARDDISK | 48 | model: QEMU HARDDISK |
145 | 47 | path: /dev/vdc | 49 | path: /dev/vdc |
146 | 48 | name: second_disk | 50 | name: second_disk |
147 | 49 | - id: sdc | 51 | - id: sdc |
148 | 50 | type: disk | 52 | type: disk |
149 | 53 | wipe: superblock | ||
150 | 51 | ptable: gpt | 54 | ptable: gpt |
151 | 52 | model: QEMU HARDDISK | 55 | model: QEMU HARDDISK |
152 | 53 | path: /dev/vdd | 56 | path: /dev/vdd |
153 | 54 | 57 | ||
154 | === modified file 'examples/tests/mirrorboot-uefi.yaml' | |||
155 | --- examples/tests/mirrorboot-uefi.yaml 2017-05-03 02:10:47 +0000 | |||
156 | +++ examples/tests/mirrorboot-uefi.yaml 2017-05-15 15:58:10 +0000 | |||
157 | @@ -1,16 +1,4 @@ | |||
158 | 1 | showtrace: true | 1 | showtrace: true |
159 | 2 | |||
160 | 3 | early_commands: | ||
161 | 4 | # running block-meta custom from the install environment | ||
162 | 5 | # inherits the CONFIG environment, so this works to actually prepare | ||
163 | 6 | # the disks exactly as in this config before the rest of the install | ||
164 | 7 | # will just blow it all away. We have to clean out the other | ||
165 | 8 | # environment that could unintentionally mess things up. | ||
166 | 9 | blockmeta: [env, -u, OUTPUT_FSTAB, | ||
167 | 10 | TARGET_MOUNT_POINT=/tmp/my.bdir/target, | ||
168 | 11 | WORKING_DIR=/tmp/my.bdir/work.d, | ||
169 | 12 | curtin, --showtrace, -v, block-meta, --umount, custom] | ||
170 | 13 | |||
171 | 14 | storage: | 2 | storage: |
172 | 15 | config: | 3 | config: |
173 | 16 | - grub_device: true | 4 | - grub_device: true |
174 | 17 | 5 | ||
175 | === modified file 'examples/tests/mirrorboot.yaml' | |||
176 | --- examples/tests/mirrorboot.yaml 2016-04-04 16:03:32 +0000 | |||
177 | +++ examples/tests/mirrorboot.yaml 2017-05-15 15:58:10 +0000 | |||
178 | @@ -4,6 +4,7 @@ | |||
179 | 4 | config: | 4 | config: |
180 | 5 | - id: sda | 5 | - id: sda |
181 | 6 | type: disk | 6 | type: disk |
182 | 7 | wipe: superblock | ||
183 | 7 | ptable: gpt | 8 | ptable: gpt |
184 | 8 | model: QEMU HARDDISK | 9 | model: QEMU HARDDISK |
185 | 9 | path: /dev/vdb | 10 | path: /dev/vdb |
186 | @@ -20,6 +21,7 @@ | |||
187 | 20 | device: sda | 21 | device: sda |
188 | 21 | - id: sdb | 22 | - id: sdb |
189 | 22 | type: disk | 23 | type: disk |
190 | 24 | wipe: superblock | ||
191 | 23 | ptable: gpt | 25 | ptable: gpt |
192 | 24 | model: QEMU HARDDISK | 26 | model: QEMU HARDDISK |
193 | 25 | path: /dev/vdc | 27 | path: /dev/vdc |
194 | 26 | 28 | ||
195 | === modified file 'examples/tests/raid10boot.yaml' | |||
196 | --- examples/tests/raid10boot.yaml 2016-04-04 16:03:32 +0000 | |||
197 | +++ examples/tests/raid10boot.yaml 2017-05-15 15:58:10 +0000 | |||
198 | @@ -4,6 +4,7 @@ | |||
199 | 4 | config: | 4 | config: |
200 | 5 | - id: sda | 5 | - id: sda |
201 | 6 | type: disk | 6 | type: disk |
202 | 7 | wipe: superblock | ||
203 | 7 | ptable: gpt | 8 | ptable: gpt |
204 | 8 | model: QEMU HARDDISK | 9 | model: QEMU HARDDISK |
205 | 9 | path: /dev/vdb | 10 | path: /dev/vdb |
206 | @@ -20,6 +21,7 @@ | |||
207 | 20 | device: sda | 21 | device: sda |
208 | 21 | - id: sdb | 22 | - id: sdb |
209 | 22 | type: disk | 23 | type: disk |
210 | 24 | wipe: superblock | ||
211 | 23 | ptable: gpt | 25 | ptable: gpt |
212 | 24 | model: QEMU HARDDISK | 26 | model: QEMU HARDDISK |
213 | 25 | path: /dev/vdc | 27 | path: /dev/vdc |
214 | @@ -30,6 +32,7 @@ | |||
215 | 30 | device: sdb | 32 | device: sdb |
216 | 31 | - id: sdc | 33 | - id: sdc |
217 | 32 | type: disk | 34 | type: disk |
218 | 35 | wipe: superblock | ||
219 | 33 | ptable: gpt | 36 | ptable: gpt |
220 | 34 | model: QEMU HARDDISK | 37 | model: QEMU HARDDISK |
221 | 35 | path: /dev/vdd | 38 | path: /dev/vdd |
222 | @@ -40,6 +43,7 @@ | |||
223 | 40 | device: sdc | 43 | device: sdc |
224 | 41 | - id: sdd | 44 | - id: sdd |
225 | 42 | type: disk | 45 | type: disk |
226 | 46 | wipe: superblock | ||
227 | 43 | ptable: gpt | 47 | ptable: gpt |
228 | 44 | model: QEMU HARDDISK | 48 | model: QEMU HARDDISK |
229 | 45 | path: /dev/vde | 49 | path: /dev/vde |
230 | 46 | 50 | ||
231 | === modified file 'examples/tests/raid5boot.yaml' | |||
232 | --- examples/tests/raid5boot.yaml 2016-04-04 16:03:32 +0000 | |||
233 | +++ examples/tests/raid5boot.yaml 2017-05-15 15:58:10 +0000 | |||
234 | @@ -4,6 +4,7 @@ | |||
235 | 4 | config: | 4 | config: |
236 | 5 | - id: sda | 5 | - id: sda |
237 | 6 | type: disk | 6 | type: disk |
238 | 7 | wipe: superblock | ||
239 | 7 | ptable: gpt | 8 | ptable: gpt |
240 | 8 | model: QEMU HARDDISK | 9 | model: QEMU HARDDISK |
241 | 9 | path: /dev/vdb | 10 | path: /dev/vdb |
242 | @@ -20,6 +21,7 @@ | |||
243 | 20 | device: sda | 21 | device: sda |
244 | 21 | - id: sdb | 22 | - id: sdb |
245 | 22 | type: disk | 23 | type: disk |
246 | 24 | wipe: superblock | ||
247 | 23 | ptable: gpt | 25 | ptable: gpt |
248 | 24 | model: QEMU HARDDISK | 26 | model: QEMU HARDDISK |
249 | 25 | path: /dev/vdc | 27 | path: /dev/vdc |
250 | @@ -30,6 +32,7 @@ | |||
251 | 30 | device: sdb | 32 | device: sdb |
252 | 31 | - id: sdc | 33 | - id: sdc |
253 | 32 | type: disk | 34 | type: disk |
254 | 35 | wipe: superblock | ||
255 | 33 | ptable: gpt | 36 | ptable: gpt |
256 | 34 | model: QEMU HARDDISK | 37 | model: QEMU HARDDISK |
257 | 35 | path: /dev/vdd | 38 | path: /dev/vdd |
258 | 36 | 39 | ||
259 | === modified file 'examples/tests/raid6boot.yaml' | |||
260 | --- examples/tests/raid6boot.yaml 2016-04-04 16:03:32 +0000 | |||
261 | +++ examples/tests/raid6boot.yaml 2017-05-15 15:58:10 +0000 | |||
262 | @@ -4,6 +4,7 @@ | |||
263 | 4 | config: | 4 | config: |
264 | 5 | - id: sda | 5 | - id: sda |
265 | 6 | type: disk | 6 | type: disk |
266 | 7 | wipe: superblock | ||
267 | 7 | ptable: gpt | 8 | ptable: gpt |
268 | 8 | model: QEMU HARDDISK | 9 | model: QEMU HARDDISK |
269 | 9 | path: /dev/vdb | 10 | path: /dev/vdb |
270 | @@ -20,6 +21,7 @@ | |||
271 | 20 | device: sda | 21 | device: sda |
272 | 21 | - id: sdb | 22 | - id: sdb |
273 | 22 | type: disk | 23 | type: disk |
274 | 24 | wipe: superblock | ||
275 | 23 | ptable: gpt | 25 | ptable: gpt |
276 | 24 | model: QEMU HARDDISK | 26 | model: QEMU HARDDISK |
277 | 25 | path: /dev/vdc | 27 | path: /dev/vdc |
278 | @@ -30,6 +32,7 @@ | |||
279 | 30 | device: sdb | 32 | device: sdb |
280 | 31 | - id: sdc | 33 | - id: sdc |
281 | 32 | type: disk | 34 | type: disk |
282 | 35 | wipe: superblock | ||
283 | 33 | ptable: gpt | 36 | ptable: gpt |
284 | 34 | model: QEMU HARDDISK | 37 | model: QEMU HARDDISK |
285 | 35 | path: /dev/vdd | 38 | path: /dev/vdd |
286 | @@ -40,6 +43,7 @@ | |||
287 | 40 | device: sdc | 43 | device: sdc |
288 | 41 | - id: sdd | 44 | - id: sdd |
289 | 42 | type: disk | 45 | type: disk |
290 | 46 | wipe: superblock | ||
291 | 43 | ptable: gpt | 47 | ptable: gpt |
292 | 44 | model: QEMU HARDDISK | 48 | model: QEMU HARDDISK |
293 | 45 | path: /dev/vde | 49 | path: /dev/vde |
294 | 46 | 50 | ||
295 | === modified file 'tests/vmtests/__init__.py' | |||
296 | --- tests/vmtests/__init__.py 2017-04-21 20:08:30 +0000 | |||
297 | +++ tests/vmtests/__init__.py 2017-05-15 15:58:10 +0000 | |||
298 | @@ -333,6 +333,9 @@ | |||
299 | 333 | boot_timeout = BOOT_TIMEOUT | 333 | boot_timeout = BOOT_TIMEOUT |
300 | 334 | collect_scripts = [] | 334 | collect_scripts = [] |
301 | 335 | conf_file = "examples/tests/basic.yaml" | 335 | conf_file = "examples/tests/basic.yaml" |
302 | 336 | nr_cpus = None | ||
303 | 337 | dirty_disks = False | ||
304 | 338 | dirty_disk_config = "examples/tests/dirty_disks_config.yaml" | ||
305 | 336 | disk_block_size = 512 | 339 | disk_block_size = 512 |
306 | 337 | disk_driver = 'virtio-blk' | 340 | disk_driver = 'virtio-blk' |
307 | 338 | disk_to_check = {} | 341 | disk_to_check = {} |
308 | @@ -507,6 +510,26 @@ | |||
309 | 507 | bugnum, clsname) | 510 | bugnum, clsname) |
310 | 508 | 511 | ||
311 | 509 | @classmethod | 512 | @classmethod |
312 | 513 | def get_config_smp(cls): | ||
313 | 514 | """Get number of cpus to use for guest""" | ||
314 | 515 | |||
315 | 516 | nr_cpus = None | ||
316 | 517 | if cls.nr_cpus: | ||
317 | 518 | nr_cpus = cls.nr_cpus | ||
318 | 519 | logger.debug('Setting cpus from class value: %s', nr_cpus) | ||
319 | 520 | |||
320 | 521 | env_cpus = os.environ.get("CURTIN_VMTEST_NR_CPUS", None) | ||
321 | 522 | if env_cpus: | ||
322 | 523 | nr_cpus = env_cpus | ||
323 | 524 | logger.debug('Setting cpus from ' | ||
324 | 525 | ' env["CURTIN_VMTEST_NR_CPUS"] value: %s', nr_cpus) | ||
325 | 526 | if not nr_cpus: | ||
326 | 527 | nr_cpus = 1 | ||
327 | 528 | logger.debug('Setting cpus to default value: %s', nr_cpus) | ||
328 | 529 | |||
329 | 530 | return str(nr_cpus) | ||
330 | 531 | |||
331 | 532 | @classmethod | ||
332 | 510 | def setUpClass(cls): | 533 | def setUpClass(cls): |
333 | 511 | # check if we should skip due to host arch | 534 | # check if we should skip due to host arch |
334 | 512 | if cls.arch in cls.arch_skip: | 535 | if cls.arch in cls.arch_skip: |
335 | @@ -535,7 +558,8 @@ | |||
336 | 535 | dowait = "--dowait" | 558 | dowait = "--dowait" |
337 | 536 | 559 | ||
338 | 537 | # create launch cmd | 560 | # create launch cmd |
340 | 538 | cmd = ["tools/launch", "--arch=" + cls.arch, "-v", dowait] | 561 | cmd = ["tools/launch", "--arch=" + cls.arch, "-v", dowait, |
341 | 562 | "--smp=" + cls.get_config_smp()] | ||
342 | 539 | if not cls.interactive: | 563 | if not cls.interactive: |
343 | 540 | cmd.extend(["--silent", "--power=off"]) | 564 | cmd.extend(["--silent", "--power=off"]) |
344 | 541 | 565 | ||
345 | @@ -646,6 +670,10 @@ | |||
346 | 646 | fp.write(json.dumps({'grub': {'update_nvram': True}})) | 670 | fp.write(json.dumps({'grub': {'update_nvram': True}})) |
347 | 647 | configs.append(grub_config) | 671 | configs.append(grub_config) |
348 | 648 | 672 | ||
349 | 673 | if cls.dirty_disks and storage_config: | ||
350 | 674 | logger.debug("Injecting early_command to dirty storage devices") | ||
351 | 675 | configs.append(cls.dirty_disk_config) | ||
352 | 676 | |||
353 | 649 | excfg = os.environ.get("CURTIN_VMTEST_EXTRA_CONFIG", False) | 677 | excfg = os.environ.get("CURTIN_VMTEST_EXTRA_CONFIG", False) |
354 | 650 | if excfg: | 678 | if excfg: |
355 | 651 | configs.append(excfg) | 679 | configs.append(excfg) |
356 | @@ -789,6 +817,7 @@ | |||
357 | 789 | target_disks + extra_disks + nvme_disks + | 817 | target_disks + extra_disks + nvme_disks + |
358 | 790 | ["--", "-drive", | 818 | ["--", "-drive", |
359 | 791 | "file=%s,if=virtio,media=cdrom" % cls.td.seed_disk, | 819 | "file=%s,if=virtio,media=cdrom" % cls.td.seed_disk, |
360 | 820 | "-smp", cls.get_config_smp(), | ||
361 | 792 | "-m", "1024"]) | 821 | "-m", "1024"]) |
362 | 793 | 822 | ||
363 | 794 | if not cls.interactive: | 823 | if not cls.interactive: |
364 | 795 | 824 | ||
365 | === modified file 'tests/vmtests/test_basic.py' | |||
366 | --- tests/vmtests/test_basic.py 2017-04-26 16:14:04 +0000 | |||
367 | +++ tests/vmtests/test_basic.py 2017-05-15 15:58:10 +0000 | |||
368 | @@ -8,6 +8,8 @@ | |||
369 | 8 | 8 | ||
370 | 9 | class TestBasicAbs(VMBaseClass): | 9 | class TestBasicAbs(VMBaseClass): |
371 | 10 | interactive = False | 10 | interactive = False |
372 | 11 | nr_cpus = 2 | ||
373 | 12 | dirty_disks = True | ||
374 | 11 | conf_file = "examples/tests/basic.yaml" | 13 | conf_file = "examples/tests/basic.yaml" |
375 | 12 | extra_disks = ['128G', '128G', '4G'] | 14 | extra_disks = ['128G', '128G', '4G'] |
376 | 13 | nvme_disks = ['4G'] | 15 | nvme_disks = ['4G'] |
377 | 14 | 16 | ||
378 | === modified file 'tests/vmtests/test_bcache_basic.py' | |||
379 | --- tests/vmtests/test_bcache_basic.py 2017-04-26 16:14:04 +0000 | |||
380 | +++ tests/vmtests/test_bcache_basic.py 2017-05-15 15:58:10 +0000 | |||
381 | @@ -9,6 +9,8 @@ | |||
382 | 9 | "s390x", # lp:1565029 | 9 | "s390x", # lp:1565029 |
383 | 10 | ] | 10 | ] |
384 | 11 | conf_file = "examples/tests/bcache_basic.yaml" | 11 | conf_file = "examples/tests/bcache_basic.yaml" |
385 | 12 | nr_cpus = 2 | ||
386 | 13 | dirty_disks = True | ||
387 | 12 | extra_disks = ['2G'] | 14 | extra_disks = ['2G'] |
388 | 13 | collect_scripts = [textwrap.dedent(""" | 15 | collect_scripts = [textwrap.dedent(""" |
389 | 14 | cd OUTPUT_COLLECT_D | 16 | cd OUTPUT_COLLECT_D |
390 | 15 | 17 | ||
391 | === modified file 'tests/vmtests/test_mdadm_bcache.py' | |||
392 | --- tests/vmtests/test_mdadm_bcache.py 2017-05-10 21:29:20 +0000 | |||
393 | +++ tests/vmtests/test_mdadm_bcache.py 2017-05-15 15:58:10 +0000 | |||
394 | @@ -262,6 +262,8 @@ | |||
395 | 262 | ('md1', 0)] | 262 | ('md1', 0)] |
396 | 263 | active_mdadm = "2" | 263 | active_mdadm = "2" |
397 | 264 | uefi = True | 264 | uefi = True |
398 | 265 | nr_cpus = 2 | ||
399 | 266 | dirty_disks = True | ||
400 | 265 | 267 | ||
401 | 266 | 268 | ||
402 | 267 | class TrustyTestMirrorbootPartitionsUEFI(relbase.trusty, | 269 | class TrustyTestMirrorbootPartitionsUEFI(relbase.trusty, |
403 | 268 | 270 | ||
404 | === modified file 'tools/launch' | |||
405 | --- tools/launch 2017-04-24 21:20:53 +0000 | |||
406 | +++ tools/launch 2017-05-15 15:58:10 +0000 | |||
407 | @@ -41,6 +41,7 @@ | |||
408 | 41 | -n | --netdev netdev can be 'user' or a bridge | 41 | -n | --netdev netdev can be 'user' or a bridge |
409 | 42 | -p | --publish F make file 'F' available in web server | 42 | -p | --publish F make file 'F' available in web server |
410 | 43 | --silent use -nographic | 43 | --silent use -nographic |
411 | 44 | -s | --smp S use smp S for number of guest cpus (defaults to 2) | ||
412 | 44 | --vnc D use -vnc D (mutually exclusive with --silent) | 45 | --vnc D use -vnc D (mutually exclusive with --silent) |
413 | 45 | directly through to qemu-system. | 46 | directly through to qemu-system. |
414 | 46 | Note, qemu adds 5900 to port numbers. (:0 = port 5900) | 47 | Note, qemu adds 5900 to port numbers. (:0 = port 5900) |
415 | @@ -349,8 +350,9 @@ | |||
416 | 349 | } | 350 | } |
417 | 350 | 351 | ||
418 | 351 | main() { | 352 | main() { |
421 | 352 | local short_opts="a:A:d:h:i:k:n:p:v" | 353 | local short_opts="a:A:d:h:i:k:n:p:s:v" |
422 | 353 | local long_opts="add:,append:,arch:,bios:,disk:,dowait,help,initrd:,kernel:,mem:,netdev:,no-dowait,power:,publish:,root-arg:,silent,serial-log:,uefi-nvram:,verbose,vnc:" | 354 | local |
423 | 355 | long_opts="add:,append:,arch:,bios:,disk:,dowait,help,initrd:,kernel:,mem:,netdev:,no-dowait,power:,publish:,root-arg:,silent,serial-log:,smp:,uefi-nvram:,verbose,vnc:" | ||
424 | 354 | local getopt_out="" | 356 | local getopt_out="" |
425 | 355 | getopt_out=$(getopt --name "${0##*/}" \ | 357 | getopt_out=$(getopt --name "${0##*/}" \ |
426 | 356 | --options "${short_opts}" --long "${long_opts}" -- "$@") && | 358 | --options "${short_opts}" --long "${long_opts}" -- "$@") && |
427 | @@ -358,7 +360,7 @@ | |||
428 | 358 | { bad_Usage; return 1; } | 360 | { bad_Usage; return 1; } |
429 | 359 | 361 | ||
430 | 360 | local seed="" | 362 | local seed="" |
432 | 361 | local bootimg="" bootimg_dist="" target="" mem="1024" | 363 | local bootimg="" bootimg_dist="" target="" mem="1024" smp="2" |
433 | 362 | local udata="" ip="" http_port="${HTTP_PORT}" burl="" | 364 | local udata="" ip="" http_port="${HTTP_PORT}" burl="" |
434 | 363 | local tmp="" top_d | 365 | local tmp="" top_d |
435 | 364 | local initrd="" kernel="" uappend="" iargs="" disk_args="" | 366 | local initrd="" kernel="" uappend="" iargs="" disk_args="" |
436 | @@ -412,6 +414,7 @@ | |||
437 | 412 | --root-arg) root_arg="$next";; | 414 | --root-arg) root_arg="$next";; |
438 | 413 | --serial-log) serial_log="$next"; shift;; | 415 | --serial-log) serial_log="$next"; shift;; |
439 | 414 | --silent) video="-nographic";; | 416 | --silent) video="-nographic";; |
440 | 417 | -s|--smp) smp="$next"; shift;; | ||
441 | 415 | --uefi-nvram|--bios) | 418 | --uefi-nvram|--bios) |
442 | 416 | # handle all --opt=* pass through here. | 419 | # handle all --opt=* pass through here. |
443 | 417 | pt[${#pt[@]}]="$cur=$next";; | 420 | pt[${#pt[@]}]="$cur=$next";; |
444 | @@ -725,6 +728,7 @@ | |||
445 | 725 | # -monitor stdio | 728 | # -monitor stdio |
446 | 726 | cmd=( | 729 | cmd=( |
447 | 727 | xkvm "${pt[@]}" "${netargs[@]}" -- | 730 | xkvm "${pt[@]}" "${netargs[@]}" -- |
448 | 731 | -smp ${smp} | ||
449 | 728 | -m ${mem} ${serial_args} ${video} | 732 | -m ${mem} ${serial_args} ${video} |
450 | 729 | -drive "file=$bootimg,if=none,cache=unsafe,format=qcow2,id=boot,index=0" | 733 | -drive "file=$bootimg,if=none,cache=unsafe,format=qcow2,id=boot,index=0" |
451 | 730 | -device "virtio-blk,drive=boot" | 734 | -device "virtio-blk,drive=boot" |
PASSED: Continuous integration, rev:498 /jenkins. ubuntu. com/server/ job/curtin- ci/478/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-amd64/ 478 /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-arm64/ 478 /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-ppc64el/ 478 /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-s390x/ 478 /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= vm-i386/ 478
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/curtin- ci/478/ rebuild
https:/