-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: extending to ' +100%FREE' calculating wrong size #2370
Comments
Files identified in the description: If these files are inaccurate, please update the |
@dominikkaminski can you check whether the PR #2369 fixes the issue for you? |
@felixfontein I'm sorry to say but it didn't fix my issue. |
@dominikkaminski might have been a lucky guess :) |
I just tested a few scenarios, I see I should have tested the module more... The #2369 had no chance of fixing it since this bug is related to the calculation of the logical volume size in the module. That's the concern I mentioned when I was asking if it's smart to do the calculations inside the module and not just let the tool handle it. Here's a version of the documentation for LVEXTEND(8) --size option which is being used in this case:
As mentioned there are slight differences between versions and the documentation also differs. Given that the size is dependant on the version of the tool on the system, it's most likely preferable to do the calculation in the module for consistency's sake. We have a couple of options:
|
For a bit of extra context, I think this is because you're trying to round up/down when you don't need to. I create a new LV, with space lvol.py#L511
A fix could be to add a protection whereby is the size_requested is zero, simply return rather than trying to attempt rounding? Or only add the second line above |
That's true. I missed that one. This will still leave us with the discrepancy between the newer versions of the actual tools and the module though. |
Summary
When I try to extend lv to max free available disk space, it calculates the wrong size after upgrading from 2.5.1 to current release (3.0.0)
Error:
Possibly related to:
#1988
#2267
Issue Type
Bug Report
Component Name
lvol
Ansible Version
Configuration
$ ansible-config dump --only-changed
OS / Environment
UCS
Steps to Reproduce
Expected Results
Volumes should be extended to available free space or calculating free available size correct.
Actual Results
fatal: [vm-001]: FAILED! => {"changed": false, "msg": "Logical Volume root could not be extended. Not enough free space left (5120.0m required / 5116.0m available)"}
Code of Conduct
The text was updated successfully, but these errors were encountered: