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

vg_create is not idempotent #132

Open
hunter86bg opened this issue Jul 17, 2022 · 11 comments
Open

vg_create is not idempotent #132

hunter86bg opened this issue Jul 17, 2022 · 11 comments

Comments

@hunter86bg
Copy link
Contributor

For some reason vg_create is using a command that fails if you need to rerun the setup:

command: vgcreate --dataalignment {{ item.value.pv_dataalign | default(pv_dataalign) }} -s {{ vg_pesize | default(4) }} {{ (item.value | first).vgname }} {{ item.value | ovirt.ovirt.json_query('[].pvname') | unique | join(',') }}

We need to use idempotent modules where possible

@sac
Copy link
Member

sac commented Jul 17, 2022

It was idempotent earlier, but the commit 0c1f454d98 changed that. But I do not see in the commit message why it was changed.

@hunter86bg
Copy link
Contributor Author

@sac ,
I was wondering if that was on purpose or not.
I can open a PR, but most probavly we need a way to setup Molecule for the roles in this repo.

Currently, a lot of oVirt users report issues with this one (for example something failed later and when rerunning it complains the VG exists).

@hunter86bg
Copy link
Contributor Author

Also, I don't see peer review on that commit . How is that possible?

@sac
Copy link
Member

sac commented Jul 18, 2022

I don't think you should spend time on the PR. The committer should revert his changes unless he has a good reason. We can ask the maintainers to take a look.

@rchikatw @gobindadas can you please take a look at this issue? Also, why did a non-idempotent CLI replace the module?

@rchikatw
Copy link
Collaborator

@sac @hunter86bg
Hello,
ansible-core 2.12 introduced from RHV 4.4 SP1 release and ansible-core no longer uses the gluster.gluster and community.general ansible collection. Because of this change, I have posted the patches to remove these gluster modules to CLI.

@rchikatw
Copy link
Collaborator

rchikatw commented Jul 19, 2022

Because ansible-core 2.12 is no longer used these packages (gluster.gluster and community.general ansible collection) that means they have been removed from RHV packages

@hunter86bg
Copy link
Contributor Author

hunter86bg commented Jul 19, 2022

@rchikatw
we can't provide the modules with a separate rpm ?
This role is used not only by RHV but also by other users
I think it makes sense to include a task file for RHV separately while we keep the current task file with the modules for the rest of the world.

@gobindadas
Copy link
Collaborator

This is not the issue only for RHV, it's also issue for centos stream which has ansible-core. So it's a problem for both upstream and downstream.

@hunter86bg
Copy link
Contributor Author

So, the modules need to be updated for ansible-core ?

@gobindadas
Copy link
Collaborator

So basically there are two ways to deal with it.
1- Change all the modules to command/shell
2- Convert all the modules into ansile collection and use those (Which need lot of effort and process)
So we decided to go with command line approach for quicker fix.

@hunter86bg
Copy link
Contributor Author

@gobindadas ,
I have never done an Ansible collection before but at least I can take a look if it's in my capabilities to do it.

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

4 participants