[ovirt-users] Re: Python error when deploying SHE on Rocky Linux

2022-05-24 Thread paul . chapman
Sorry. My fault. 

ansible -m firewalld -a state=enabled localhost -e 
ansible_python_interpreter=/usr/bin/python3 

returns

localhost | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: root@localhost: Permission 
denied (publickey,gssapi-keyex,gssapi-with-mic,password).",
"unreachable": true
}

This is since I added the path /usr/bin/python to ansible.cfg. Previously it 
returned 

localhost | FAILED! => {
"changed": false,
"msg": "Python Module not found: firewalld and its python module are 
required for this module, version 0.2.11 or newer 
required (0.3.9 or newer for offline operations)"
}
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/AWQG5D2GN62JBVFDYZ6LF66JPVOQX64T/


[ovirt-users] Re: Python error when deploying SHE on Rocky Linux

2022-05-24 Thread paul . chapman
Here you go --

# ansible --version
ansible [core 2.12.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  ansible collection location = 
/root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.12 (default, May 10 2022, 23:46:40) [GCC 8.5.0 20210514 
(Red Hat 8.5.0-10)]
  jinja version = 2.10.3
  libyaml = True

[root@frm-cta-ov3 plugins]# rpm -qa | grep ovirt-hosted-engine-setup
ovirt-hosted-engine-setup-2.6.3-1.el8.noarch

[root@frm-cta-ov3 plugins]# rpm -qa | grep ovirt-ansible-collection
ovirt-ansible-collection-2.0.3-1.el8.noarch

ansible -m firewalld -a state=enabled localhost -e 

This returns the ansible syntax help. Should I change something?

ansible_python_interpreter=/usr/bin/python3

This doesn't return anything.

Hope this is enlightening!



___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/ZK7YIESGE6ZNUVZ2GHUTSFROPHBSFA2G/


[ovirt-users] Re: Python error when deploying SHE on Rocky Linux

2022-05-24 Thread Asaf Rachmani
Hi,
can you please share the output of:

# ansible --version

# rpm -qa | grep ovirt-hosted-engine-setup

# rpm -qa | grep ovirt-ansible-collection
# ansible -m firewalld -a state=enabled localhost -e
'ansible_python_interpreter=/usr/bin/python3'


On Tue, May 24, 2022 at 12:15 PM  wrote:

> Thanks Didi.
>
> I've edited ansible.cfg to hardwire the interpreter path but I still get
> the error when trying to deploy the SHE.
>
> ansible -m firewalld -a state=enabled localhost
>
> Returns
>
> localhost | FAILED! => {
> "changed": false,
> "msg": "Python Module not found: firewalld and its python module are
> required for this module, version 0.2.11 or newer
> required (0.3.9 or newer for offline operations)"
>
> and
>
> ansible -m firewalld -a state=enabled -c local -i localhost, all
>
> returns
>
> [WARNING]: Platform linux on host localhost is using the discovered Python
> interpreter at /usr/bin/python3.8, but future installation of
> another Python interpreter could change the meaning of that path. See
> https://docs.ansible.com/ansible-
> core/2.12/reference_appendices/interpreter_discovery.html
> 
> for more information.
> localhost | FAILED! => {
> "ansible_facts": {
> "discovered_interpreter_python": "/usr/bin/python3.8"
> },
> "changed": false,
> "msg": "Python Module not found: firewalld and its python module are
> required for this module, version 0.2.11 or newer
> required (0.3.9 or newer for offline operations)"
>
> Thanks for your reply by the way. It's really appreciated.
>
> Paul.
>
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/VHQAUYLSNDX5UIP4FJLU2Z3V4FZFDVXJ/
>
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/IZIOSAMKQMTMD7PDLTLG5K3C57QG6CHU/


[ovirt-users] Re: Python error when deploying SHE on Rocky Linux

2022-05-24 Thread paul . chapman
Thanks Didi.

I've edited ansible.cfg to hardwire the interpreter path but I still get the 
error when trying to deploy the SHE.

ansible -m firewalld -a state=enabled localhost

Returns

localhost | FAILED! => {
"changed": false,
"msg": "Python Module not found: firewalld and its python module are 
required for this module, version 0.2.11 or newer 
required (0.3.9 or newer for offline operations)"

and  

ansible -m firewalld -a state=enabled -c local -i localhost, all

returns 

[WARNING]: Platform linux on host localhost is using the discovered Python 
interpreter at /usr/bin/python3.8, but future installation of
another Python interpreter could change the meaning of that path. See 
https://docs.ansible.com/ansible-
core/2.12/reference_appendices/interpreter_discovery.html for more information.
localhost | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3.8"
},
"changed": false,
"msg": "Python Module not found: firewalld and its python module are 
required for this module, version 0.2.11 or newer 
required (0.3.9 or newer for offline operations)"

Thanks for your reply by the way. It's really appreciated.

Paul.

___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/VHQAUYLSNDX5UIP4FJLU2Z3V4FZFDVXJ/


[ovirt-users] Re: Python error when deploying SHE on Rocky Linux

2022-05-23 Thread Yedidyah Bar David
On Fri, May 20, 2022 at 3:07 PM  wrote:
>
> Hi, I'm trying to deploy a self hosted engine on a Rocky Linux 8.6. Ovirt has 
> installed ok but I get this when deploying the engine -
>
> [ ERROR ] fatal: [localhost]: FAILED! => {"changed": false, "msg": "Python 
> Module not found: firewalld and its python module are required for this 
> module, version 0.2.11 or newer required (0.3.9 or newer for offline 
> operations)"}
>
> I've tried running ansible_python_interpreter=/usr/bin/python3 on the host 
> pre deployment but that hasn't worked.

Where and how did you try this?

> I've copied the progress below. Does the engine exist in part at the point it 
> fails and the problem is Python on the Engine not the host?

[snip]
> [ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : Open a port on firewalld]
> [ ERROR ] fatal: [localhost]: FAILED! => {"changed": false, "msg": "Python 
> Module not found: firewalld and its python module are required for this 
> module, version 0.2.11 or newer required (0.3.9 or newer for offline 
> operations)"}

This error is from the host, not the engine VM.

I thought I might know the reason, but checking further shows me I
still do not...
Adding a few other people that might be able to help.

What I did check so far (only by looking at code and testing on quite
current CentOS Stream 8, not Rocky Linux):

1. This seems to be a minimal reproducer of your issue, on Stream:

# ansible -m firewalld -a state=enabled localhost

2. This seems to be a minimal "fix", for the above:

# ansible -m firewalld -a state=enabled -c local -i localhost, all

Meaning: Specifying an inventory, instead of directly a host. See also e.g.:

https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html

https://stackoverflow.com/questions/61561744/why-do-i-get-different-python-version-for-implicit-and-explicit-localhost

Running both of them with ANSIBLE_DEBUG=1 and -v shows that there
are differences in which python is used, but I failed to completely
understand how it's done.

A wild guess as to why this fails on Rocky Linux:

https://github.com/ansible/ansible/blob/devel/lib/ansible/config/base.yml#L1528

Perhaps there should have been code that would have caused the code
using the this map, to use 'redhat', but perhaps this does not work
well there.

If the "fixed" version (2.) above fails on Rocky Linux, perhaps open a
ticket on Rocky Linux's ansible packaging and have it fixed, then try
hosted-engine deployment again.

Hope this helps at least a bit...

Best regards,
--
Didi
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/EHG5EYY6IGBFIIAP2AZLNFQM4AXIT62P/