|
254 | 254 |
|
255 | 255 | # For ext2 FS |
256 | 256 |
|
257 | | - - name: >- |
258 | | - Create a LVM logical volume with for ext2 FS size |
259 | | - {{ volume_size_before }} |
260 | | - include_role: |
261 | | - name: linux-system-roles.storage |
262 | | - vars: |
263 | | - storage_pools: |
264 | | - - name: foo |
265 | | - type: lvm |
266 | | - disks: "{{ unused_disks }}" |
267 | | - volumes: |
268 | | - - name: test1 |
269 | | - fs_type: ext2 |
270 | | - size: "{{ volume_size_before }}" |
271 | | - mount_point: "{{ mount_location }}" |
| 257 | + - name: Test ext2 |
| 258 | + block: |
| 259 | + - name: >- |
| 260 | + Create a LVM logical volume with for ext2 FS size |
| 261 | + {{ volume_size_before }} |
| 262 | + include_role: |
| 263 | + name: linux-system-roles.storage |
| 264 | + vars: |
| 265 | + storage_pools: |
| 266 | + - name: foo |
| 267 | + type: lvm |
| 268 | + disks: "{{ unused_disks }}" |
| 269 | + volumes: |
| 270 | + - name: test1 |
| 271 | + fs_type: ext2 |
| 272 | + size: "{{ volume_size_before }}" |
| 273 | + mount_point: "{{ mount_location }}" |
272 | 274 |
|
273 | | - - name: Verify role results |
274 | | - include_tasks: verify-role-results.yml |
| 275 | + - name: Verify role results |
| 276 | + include_tasks: verify-role-results.yml |
275 | 277 |
|
276 | | - - name: Change volume size to {{ volume_size_after }} |
277 | | - include_role: |
278 | | - name: linux-system-roles.storage |
279 | | - vars: |
280 | | - storage_pools: |
281 | | - - name: foo |
282 | | - type: lvm |
283 | | - disks: "{{ unused_disks }}" |
284 | | - volumes: |
285 | | - - name: test1 |
286 | | - fs_type: ext2 |
287 | | - size: "{{ volume_size_after }}" |
288 | | - mount_point: "{{ mount_location }}" |
| 278 | + - name: Change volume size to {{ volume_size_after }} |
| 279 | + include_role: |
| 280 | + name: linux-system-roles.storage |
| 281 | + vars: |
| 282 | + storage_pools: |
| 283 | + - name: foo |
| 284 | + type: lvm |
| 285 | + disks: "{{ unused_disks }}" |
| 286 | + volumes: |
| 287 | + - name: test1 |
| 288 | + fs_type: ext2 |
| 289 | + size: "{{ volume_size_after }}" |
| 290 | + mount_point: "{{ mount_location }}" |
289 | 291 |
|
290 | | - - name: Verify role results |
291 | | - include_tasks: verify-role-results.yml |
| 292 | + - name: Verify role results |
| 293 | + include_tasks: verify-role-results.yml |
292 | 294 |
|
293 | | - - name: Change volume size to {{ volume_size_before }} |
294 | | - include_role: |
295 | | - name: linux-system-roles.storage |
296 | | - vars: |
297 | | - storage_pools: |
298 | | - - name: foo |
299 | | - type: lvm |
300 | | - disks: "{{ unused_disks }}" |
301 | | - volumes: |
302 | | - - name: test1 |
303 | | - fs_type: ext2 |
304 | | - size: "{{ volume_size_before }}" |
305 | | - mount_point: "{{ mount_location }}" |
| 295 | + - name: Change volume size to {{ volume_size_before }} |
| 296 | + include_role: |
| 297 | + name: linux-system-roles.storage |
| 298 | + vars: |
| 299 | + storage_pools: |
| 300 | + - name: foo |
| 301 | + type: lvm |
| 302 | + disks: "{{ unused_disks }}" |
| 303 | + volumes: |
| 304 | + - name: test1 |
| 305 | + fs_type: ext2 |
| 306 | + size: "{{ volume_size_before }}" |
| 307 | + mount_point: "{{ mount_location }}" |
306 | 308 |
|
307 | | - - name: Verify role results |
308 | | - include_tasks: verify-role-results.yml |
| 309 | + - name: Verify role results |
| 310 | + include_tasks: verify-role-results.yml |
309 | 311 |
|
310 | | - - name: Clean up |
311 | | - include_role: |
312 | | - name: linux-system-roles.storage |
313 | | - vars: |
314 | | - storage_pools: |
315 | | - - name: foo |
316 | | - disks: "{{ unused_disks }}" |
317 | | - state: absent |
318 | | - volumes: |
319 | | - - name: test1 |
320 | | - size: "{{ volume_size_before }}" |
321 | | - mount_point: "{{ mount_location }}" |
| 312 | + always: |
| 313 | + - name: Clean up |
| 314 | + include_role: |
| 315 | + name: linux-system-roles.storage |
| 316 | + vars: |
| 317 | + storage_pools: |
| 318 | + - name: foo |
| 319 | + disks: "{{ unused_disks }}" |
| 320 | + state: absent |
| 321 | + volumes: |
| 322 | + - name: test1 |
| 323 | + size: "{{ volume_size_before }}" |
| 324 | + mount_point: "{{ mount_location }}" |
322 | 325 |
|
323 | 326 | - name: Verify role results |
324 | 327 | include_tasks: verify-role-results.yml |
|
348 | 351 | is_fedora: "{{ ansible_facts.distribution == 'Fedora' }}" |
349 | 352 |
|
350 | 353 | # For ext4 FS -- online resize |
351 | | - |
352 | | - - name: Run test on supported platforms |
353 | | - when: ((is_fedora and blivet_pkg_version is version("3.7.1-3", ">=")) or |
354 | | - (is_rhel8 and blivet_pkg_version is version("3.6.0-6", ">=")) or |
355 | | - (is_rhel9 and blivet_pkg_version is version("3.6.0-8", ">=")) or |
356 | | - is_rhel10) |
| 354 | + - name: Test ext4 online resize |
357 | 355 | block: |
358 | | - - name: >- |
359 | | - Create one LVM logical volume under one volume group with size |
360 | | - {{ volume_size_before }} |
361 | | - include_role: |
362 | | - name: linux-system-roles.storage |
363 | | - vars: |
364 | | - storage_pools: |
365 | | - - name: foo |
366 | | - disks: "{{ unused_disks }}" |
367 | | - type: lvm |
368 | | - volumes: |
369 | | - - name: test1 |
370 | | - fs_type: ext4 |
371 | | - size: "{{ volume_size_before }}" |
372 | | - mount_point: "{{ mount_location }}" |
373 | | -
|
374 | | - - name: Verify role results |
375 | | - include_tasks: verify-role-results.yml |
376 | | - |
377 | | - - name: Change volume_size to {{ volume_size_after }} |
378 | | - include_role: |
379 | | - name: linux-system-roles.storage |
380 | | - vars: |
381 | | - storage_pools: |
382 | | - - name: foo |
383 | | - type: lvm |
384 | | - disks: "{{ unused_disks }}" |
385 | | - volumes: |
386 | | - - name: test1 |
387 | | - fs_type: ext4 |
388 | | - size: "{{ volume_size_after }}" |
389 | | - mount_point: "{{ mount_location }}" |
| 356 | + - name: Run test on supported platforms |
| 357 | + when: ((is_fedora and blivet_pkg_version is version("3.7.1-3", ">=")) or |
| 358 | + (is_rhel8 and blivet_pkg_version is version("3.6.0-6", ">=")) or |
| 359 | + (is_rhel9 and blivet_pkg_version is version("3.6.0-8", ">=")) or |
| 360 | + is_rhel10) |
| 361 | + block: |
| 362 | + - name: >- |
| 363 | + Create one LVM logical volume under one volume group with size |
| 364 | + {{ volume_size_before }} |
| 365 | + include_role: |
| 366 | + name: linux-system-roles.storage |
| 367 | + vars: |
| 368 | + storage_pools: |
| 369 | + - name: foo |
| 370 | + disks: "{{ unused_disks }}" |
| 371 | + type: lvm |
| 372 | + volumes: |
| 373 | + - name: test1 |
| 374 | + fs_type: ext4 |
| 375 | + size: "{{ volume_size_before }}" |
| 376 | + mount_point: "{{ mount_location }}" |
390 | 377 |
|
391 | | - - name: Verify role results |
392 | | - include_tasks: verify-role-results.yml |
| 378 | + - name: Verify role results |
| 379 | + include_tasks: verify-role-results.yml |
393 | 380 |
|
394 | | - - name: Test for correct handling of offline resize in safe mode |
395 | | - include_tasks: verify-role-failed.yml |
396 | | - vars: |
397 | | - __storage_failed_regex: must be unmounted to be resized in safe mode |
398 | | - __storage_failed_msg: >- |
399 | | - Unexpected behavior w/ resize in safe mode |
400 | | - __storage_failed_params: |
401 | | - storage_safe_mode: true |
| 381 | + - name: Change volume_size to {{ volume_size_after }} |
| 382 | + include_role: |
| 383 | + name: linux-system-roles.storage |
| 384 | + vars: |
402 | 385 | storage_pools: |
403 | 386 | - name: foo |
| 387 | + type: lvm |
404 | 388 | disks: "{{ unused_disks }}" |
405 | 389 | volumes: |
406 | 390 | - name: test1 |
407 | 391 | fs_type: ext4 |
408 | | - size: "{{ volume_size_before }}" |
| 392 | + size: "{{ volume_size_after }}" |
409 | 393 | mount_point: "{{ mount_location }}" |
410 | 394 |
|
| 395 | + - name: Verify role results |
| 396 | + include_tasks: verify-role-results.yml |
| 397 | + |
| 398 | + - name: Test for correct handling of offline resize in safe mode |
| 399 | + include_tasks: verify-role-failed.yml |
| 400 | + vars: |
| 401 | + __storage_failed_regex: must be unmounted to be resized in safe mode |
| 402 | + __storage_failed_msg: >- |
| 403 | + Unexpected behavior w/ resize in safe mode |
| 404 | + __storage_failed_params: |
| 405 | + storage_safe_mode: true |
| 406 | + storage_pools: |
| 407 | + - name: foo |
| 408 | + disks: "{{ unused_disks }}" |
| 409 | + volumes: |
| 410 | + - name: test1 |
| 411 | + fs_type: ext4 |
| 412 | + size: "{{ volume_size_before }}" |
| 413 | + mount_point: "{{ mount_location }}" |
| 414 | + |
| 415 | + always: |
411 | 416 | - name: Clean up |
412 | 417 | include_role: |
413 | 418 | name: linux-system-roles.storage |
|
0 commit comments