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

lvol modules does not compute the correct size when using 100%VG with mirrored LVM volume #8352

Open
1 task done
pstumpf-wizai opened this issue May 13, 2024 · 5 comments
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)

Comments

@pstumpf-wizai
Copy link

Summary

The issue was already reported in ansible/ansible#64250 for the old repository, but not migrated. I have nothing much to add to the original report. The problem still persists.

Issue Type

Bug Report

Component Name

lvol

Ansible Version

$ ansible --version
ansible [core 2.16.4]
  config file = /home/pascal/.ansible.cfg
  configured module search path = ['/home/pascal/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/pascal/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.13 (main, Mar 15 2024, 07:36:23) [Clang 16.0.6 ] (/usr/local/bin/python3.10)
  jinja version = 3.1.3
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general
ansible [core 2.16.4]
  config file = /home/pascal/.ansible.cfg
  configured module search path = ['/home/pascal/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/pascal/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.13 (main, Mar 15 2024, 07:36:23) [Clang 16.0.6 ] (/usr/local/bin/python3.10)
  jinja version = 3.1.3
  libyaml = True
~/src/hypervisors $ ansible-galaxy collection list community.general

# /usr/local/lib/python3.10/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 8.4.0

Configuration

$ ansible-config dump --only-changed
ANSIBLE_NOCOLOR(env: ANSIBLE_NOCOLOR) = True
CONFIG_FILE() = /home/pascal/.ansible.cfg
EDITOR(env: EDITOR) = vi
PAGER(env: PAGER) = more

OS / Environment

Target: Debian 12.

Steps to Reproduce

community.general.lvol:
    vg: "foo"
    lv: "bar"
    size: "100%VG"
    opts: "-m1"

Expected Results

The module is idempotent, i.e. does nothing on subsequent runs.

Actual Results

msg: Logical Volume bar could not be extended. Not enough free space left (1526184.0m required / 0.0m available)

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels May 13, 2024
@andrensairr
Copy link

A PR was supplied in the old repository to address the original issue which was itself imported from an earlier era, but it missed the boat in the transition to this repo. Do we know if the PR was resubmitted here? I couldn't find any evidence of it. It would be nice to put this one to rest; I've found myself foiled at every turn trying to use this module. I couldn't event specify the size by number of extents because the lvcreate --extents option is only supported with a percentage! 🙄

@felixfontein
Copy link
Collaborator

That PR was redone here as #229 and merged almost four years ago.

You likely didn't find it in the history since the module was moved to another path and GitHub is not very good at showing history for moved things, when the new name was already used earlier (it used to be a symlink before the move).

@andrensairr
Copy link

Thanks @felixfontein, I can see that line was staring at me the whole time; I just missed it because the comment changed. In my situation lvol wants include an lvextend operation, so this line must hold true - i.e. the size_requested calculation method differs to that used by lvcreate in the first place, at least for my case of using 100%VG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

4 participants