Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gluster_infra_lv_logicalvols['lvsize'] is not optional and doesn't default to 100% of LV #100

Open
outdooracorn opened this issue May 23, 2020 · 0 comments

Comments

@outdooracorn
Copy link

The README says that the lvsize option for gluster_infra_lv_logicalvols is "Optional, Default 100%, size of LV". However, omitting it results in the following error:

TASK [gluster.infra/roles/backend_setup : Create thin logical volume] **************************************************************************************************************************
fatal: [hc2-02]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'lvsize'\n\nThe error appears to be in '/home/ollie/.ansible/roles/gluster.infra/roles/backend_setup/tasks/thin_volume_create.yml': line 132, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n#this fails when the pool doesn't exist\n- name: Create thin logical volume\n  ^ here\n"}

Manually specifying "100%FREE" results in this error:

TASK [gluster.infra/roles/backend_setup : Create thin logical volume] **************************************************************************************************************************
failed: [hc2-02] (item={'vgname': 'vg.gluster', 'thinpool': 'thinpool', 'lvname': 'lv.thin', 'lvsize': '100%FREE'}) => {"ansible_index_var": "index", "ansible_loop_var": "item", "changed": false, "index": 0, "item": {"lvname": "lv.thin", "lvsize": "100%FREE", "thinpool": "thinpool", "vgname": "vg.gluster"}, "msg": "Thin volume sizing with percentage not supported."}

What do I need to do to get the logical volume to be 100% the size of the thinpool?

If it helps, this is my playbook (with "lvsize" omitted):
  roles:
    - role: gluster.infra
      vars:
        gluster_infra_disktype: JBOD
        gluster_infra_volume_groups:
          - { vgname: vg.gluster, pvname: /dev/sda }
        gluster_infra_lv_logicalvols:
          - { vgname: vg.gluster, thinpool: thinpool, lvname: lv.thin }
        gluster_infra_thinpools:
          - { vgname: vg.gluster, thinpoolname: thinpool, poolmetadatasize: 16G, thinpoolsize: 100%FREE }
        gluster_infra_mount_devices:
          - { path: "/mnt/brick{{ ansible_hostname[-2:] }}", vgname: vg.gluster, lvname: lv.thin }
      become: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant