Closed yizhanglinux closed 1 month ago
Thank you but are partition pools really supported? They are not documented in the README. @dwlehman
Here is the commit which seems suppot it[1], and already have some cases in tests_create_partition_volume_then_remove.yml and tests_disk_errors.yml[2]
[1] b3ee952 Fix key for partition pool class lookup.
[2]
$ cat tests_create_partition_volume_then_remove.yml
---
- hosts: all
become: true
vars:
storage_safe_mode: false
mount_location: '/opt/test1'
tasks:
- include_role:
name: storage
- include_tasks: get_unused_disk.yml
vars:
max_return: 1
- name: Create a partition device mounted on "{{ mount_location }}"
include_role:
name: storage
vars:
storage_pools:
- name: "{{ unused_disks[0] }}"
type: partition
disks: "{{ unused_disks }}"
volumes:
- name: test1
type: partition
mount_point: "{{ mount_location }}"
From the log, seems it's due to the "size:" paramter for partition
ansible/modules/blivet.py\", line 461, in _create\nAttributeError: 'DiskDevice' object has no attribute 'free_space'\n"
The code is there, but I think it was intentionally not announced to users.
You have a volume of type 'lvm' inside a pool of type 'partition', which does not make sense. Obviously we should handle this more gracefully.
does https://github.com/linux-system-roles/storage/pull/214 fix this issue?
From the description of pull/64
I designed one case about storage_pool with parition type, see my bellow env/playbook/execution log
[1] Fix key for partition pool... This leads to a failure (crash?) any time a pool of type 'partition' is present.
environment: RHEL-8.2
playbook
ansible-playbook -i inventory tests/a.yml -vvvv