Open markfaine opened 3 years ago
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @abulimov @jhoekx @unkaputtbar112 @zigaSRC click here for bot help
Hi @markfaine thanks for reporting this. This error message comes from lvreduce itself, not from the lvol module. If I may ask, what is the rationale for passing the PV when doing a lvreduce, to begin with?
Same issue here.
The invocation for lvextend
and lvreduce
shares the same code, and lvextend
accepts pv
as argument while lvreduce
doesn't
I have developed a fix by omitting pvs
when lvreduce
is used instead of lvextend
. Shall I make a PR?
@eszense PRs are always welcome!
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.
Summary
I have a task that is used to manage a logical volume. It's a one size fits all task that is intended to be used for creating, reducing, extending, etc. a logical volume, however, it fails with the error message: "Command does not accept argument"
This works fine when I create or extend the logical volume.
I suspect because it's being included in the command here as a parameter and the lvreduce command doesn't know what to do with it.
So I tested removing that variable from the format string and it works fine without it. Is this a bug or is there something else going on that I don't understand that necessitates the variable being present?
I was also able to work around it by omitting the pvs value when shrink is true:
Though, in some cases, this will result in an empty string for pvs, even when it should not be since more than one operation in the role may use that same variable.
Issue Type
Bug Report
Component Name
lvol
Ansible Version
Configuration
OS / Environment
Red Hat Enterprise Linux Server release 7.9 (Maipo)
Steps to Reproduce
The vars looks like this:
Expected Results
I expected the volume to be reduced in size to the size specified
Actual Results
Code of Conduct