Bug 1446167
Summary: | [downstream clone - 4.1.3] [Test Only] Test Ansible playbook for registration | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | rhev-integ |
Component: | rhev-hypervisor-ng | Assignee: | Douglas Schilling Landgraf <dougsland> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | dguo |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 4.1.0 | CC: | bgraveno, cshao, danken, dfediuck, dguo, dougsland, eheftman, huzhao, jiawu, mgoldboi, mperina, qiyuan, rbarry, sbonazzo, stirabos, weiwang, yaniwang, ycui, yzhao |
Target Milestone: | ovirt-4.1.3 | Keywords: | ZStream |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | 1422676 | Environment: | |
Last Closed: | 2017-07-06 13:43:35 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Node | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1422676, 1458126 | ||
Bug Blocks: | 1475678 |
Description
rhev-integ
2017-04-27 11:30:11 UTC
Moving this bug to MODIFIED status because it is set to ovirt-4.2-0, no build yet for 4.2. (Originally by Ying Cui) Ansible 2.3 should become available in 4.1.1 (Originally by Sandro Bonazzola) Douglas, We need to clarify that whether the ansible 2.3 package will be build into rhvh4.1.1 from comment 3? Besides, we wonder the customer's use scenario, ansible-playbook in https://github.com/dougsland/misc-ovirt/blob/master/ansible/ will be documented to customer, or we QE just test this ansible way can be supported in node is enough? (Originally by Daijie Guo) (In reply to dguo from comment #4) > Douglas, > > We need to clarify that whether the ansible 2.3 package will be build into > rhvh4.1.1 from comment 3? > We will need to check. > Besides, we wonder the customer's use scenario, ansible-playbook in > https://github.com/dougsland/misc-ovirt/blob/master/ansible/ will be > documented to customer, or we QE just test this ansible way can be > supported in node is enough? Probably both, I can see at least two scenarios for justifying the tests/documentation of registration: #1 Users already use ansible for others automation tasks in their environment. Based on that, they would like to use ansible to automate rhv deploy. #2 Users would like to automate their install/registration/approval/manage rhv/ of several hundreds servers by kickstart and ansible. (Originally by dougsland) ansible 2.3 not yet available,postponing to 4.1.2 (Originally by Sandro Bonazzola) ansible 2.3 not yet available,postponing to 4.1.3 Moving to ON_QA being ansible 2.3.0.0 available now When bug 1458126 is fixed, will verify this bug. On rhvh-4.1-0.20170609.0+1, the ovirt-engine-sdk-python version does not meet the requirements which is version 4 or higher from description [root@dhcp-9-52 yum.repos.d]# imgbase w 2017-06-13 04:16:48,108 [INFO] You are on rhvh-4.1-0.20170609.0+1 [root@dhcp-9-52 yum.repos.d]# rpm -qa|grep ovirt-engine-sdk-python ovirt-engine-sdk-python-3.6.9.1-1.el7ev.noarch [root@dhcp-9-52 ansible]# ansible-playbook register-hosts.yml [WARNING]: provided hosts list is empty, only localhost is available PLAY [localhost] ************************************************************************************************************************************************************************ TASK [Gathering Facts] ****************************************************************************************************************************************************************** ok: [localhost] TASK [Obtain SSO token] ***************************************************************************************************************************************************************** fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "ovirtsdk4 version 4.0.0 or higher is required for this module"} to retry, use: --limit @/root/misc-ovirt/ansible/register-hosts.retry PLAY RECAP ****************************************************************************************************************************************************************************** localhost : ok=1 changed=0 unreachable=0 failed=1 Martin what do you suggest? Running on the RHV-H side or ssh to engine and runt here using sdk4 installed onthe engine? Several notes: 1. ovirt-engine-sdk-python provides Python SDK v3, but you need to use Python SDK v4 (provided by python-ovirt-engine-sdk4) which is required by Ansible modules for oVirt 2. It depends on the usage: - if you want register single host, then the Ansible playbook can be executed on this host, but you need to have installed python-ovirt-engine-sdk4 on this host - if you want to register multiple hosts, then Ansible playbook can be executed on different hosts (either engine host or any other host which has installed python-ovirt-engine-sdk4) 3. If you want to execute on engine host, you don't need to SSH to it and execute Ansible there, you can tell Ansible where playbook should be executed and Ansible will connect to the host automatically (but you need to install all dependencies like python-ovirt-engine-sdk4 on that host manually, Ansible does not install dependencies automatically) I'd say (In reply to Martin Perina from comment #14) > Several notes: > > 1. ovirt-engine-sdk-python provides Python SDK v3, but you need to use > Python SDK v4 (provided by python-ovirt-engine-sdk4) which is required by > Ansible modules for oVirt > Could you please share the ansible ovirt module name for downstream? > > 2. It depends on the usage: > > - if you want register single host, then the Ansible playbook can be > executed on this host, but you need to have installed > python-ovirt-engine-sdk4 on this host > > - if you want to register multiple hosts, then Ansible playbook can be > executed on different hosts (either engine host or any other host which has > installed python-ovirt-engine-sdk4) > > > 3. If you want to execute on engine host, you don't need to SSH to it and > execute Ansible there, you can tell Ansible where playbook should be > executed and Ansible will connect to the host automatically (but you need to > install all dependencies like python-ovirt-engine-sdk4 on that host > manually, Ansible does not install dependencies automatically) Would be nice to see this documented in a way that users could follow steps to install packages/channels needed and enable the usage of ansible for registering/approving the hosts. In others words, doesn't matter if it's RHVM, RHVH or RHEL host. Does it make sense? (In reply to Douglas Schilling Landgraf from comment #15) > I'd say (In reply to Martin Perina from comment #14) > > Several notes: > > > > 1. ovirt-engine-sdk-python provides Python SDK v3, but you need to use > > Python SDK v4 (provided by python-ovirt-engine-sdk4) which is required by > > Ansible modules for oVirt > > > > Could you please share the ansible ovirt module name for downstream? Ansible modules for oVirt have the same name for both upstream and downstream (always ovirt_???), no renaming "craziness" as we performed with RPM packages ... > > > > > 2. It depends on the usage: > > > > - if you want register single host, then the Ansible playbook can be > > executed on this host, but you need to have installed > > python-ovirt-engine-sdk4 on this host > > > > - if you want to register multiple hosts, then Ansible playbook can be > > executed on different hosts (either engine host or any other host which has > > installed python-ovirt-engine-sdk4) > > > > > > 3. If you want to execute on engine host, you don't need to SSH to it and > > execute Ansible there, you can tell Ansible where playbook should be > > executed and Ansible will connect to the host automatically (but you need to > > install all dependencies like python-ovirt-engine-sdk4 on that host > > manually, Ansible does not install dependencies automatically) > > Would be nice to see this documented in a way that users could follow steps > to install packages/channels needed and enable the usage of ansible for > registering/approving the hosts. In others words, doesn't matter if it's > RHVM, RHVH or RHEL host. > > Does it make sense? We are still discussion with Documentation team, how our docs around Ansible integration will look like (In reply to Martin Perina from comment #16) > (In reply to Douglas Schilling Landgraf from comment #15) > > I'd say (In reply to Martin Perina from comment #14) > > > Several notes: > > > > > > 1. ovirt-engine-sdk-python provides Python SDK v3, but you need to use > > > Python SDK v4 (provided by python-ovirt-engine-sdk4) which is required by > > > Ansible modules for oVirt > > > > > > > Could you please share the ansible ovirt module name for downstream? > > Ansible modules for oVirt have the same name for both upstream and > downstream (always ovirt_???), no renaming "craziness" as we performed with > RPM packages ... > If we add python-ovirt-engine-sdk4 into ovirt-release-host-node should be enough to get all packages required? > > > > > > > > 2. It depends on the usage: > > > > > > - if you want register single host, then the Ansible playbook can be > > > executed on this host, but you need to have installed > > > python-ovirt-engine-sdk4 on this host > > > > > > - if you want to register multiple hosts, then Ansible playbook can be > > > executed on different hosts (either engine host or any other host which has > > > installed python-ovirt-engine-sdk4) > > > > > > > > > 3. If you want to execute on engine host, you don't need to SSH to it and > > > execute Ansible there, you can tell Ansible where playbook should be > > > executed and Ansible will connect to the host automatically (but you need to > > > install all dependencies like python-ovirt-engine-sdk4 on that host > > > manually, Ansible does not install dependencies automatically) > > > > Would be nice to see this documented in a way that users could follow steps > > to install packages/channels needed and enable the usage of ansible for > > registering/approving the hosts. In others words, doesn't matter if it's > > RHVM, RHVH or RHEL host. > > > > Does it make sense? > > We are still discussion with Documentation team, how our docs around Ansible > integration will look like Sure, let me know if you guys need anything from our side. (In reply to Douglas Schilling Landgraf from comment #17) > (In reply to Martin Perina from comment #16) > > (In reply to Douglas Schilling Landgraf from comment #15) > > > I'd say (In reply to Martin Perina from comment #14) > > > > Several notes: > > > > > > > > 1. ovirt-engine-sdk-python provides Python SDK v3, but you need to use > > > > Python SDK v4 (provided by python-ovirt-engine-sdk4) which is required by > > > > Ansible modules for oVirt > > > > > > > > > > Could you please share the ansible ovirt module name for downstream? > > > > Ansible modules for oVirt have the same name for both upstream and > > downstream (always ovirt_???), no renaming "craziness" as we performed with > > RPM packages ... > > > > If we add python-ovirt-engine-sdk4 into ovirt-release-host-node should be > enough to get all packages required? Yes, that should pull all requirements for Python SDK v4 I have added a patch in the ovirt-release-host-node for review, even if we are going to write a documentation requiring such packages, the node should be ready to go distro. Verified on rhvh-4.1-0.20170622.0 Test version: redhat-virtualization-host-4.1-20170622.3 python-ovirt-engine-sdk4-4.1.5-1.el7ev.x86_64 ansible-2.3.0.0-4.el7.noarch Red Hat Virtualization Manager Version: 4.1.3.1-0.1.el7 vdsm-4.19.20-1.el7ev.x86_64 Test step: 1. Install rhvh via pxe 2. Check the ansible version and python-ovirt-engine-sdk version [root@dhcp-9-52 ansible]# rpm -qa|grep python-ovirt python-ovirt-engine-sdk4-4.1.5-1.el7ev.x86_64 [root@dhcp-9-52 ansible]# rpm -qa|grep ansible ansible-2.3.0.0-4.el7.noarch= 3. Clone the ansible registration codes from https://github.com/dougsland/misc-ovirt based on this bug Description 4. Modify the corresponding value in the register-host.yml 5. "ansible-playbook register-host.yml" Test result: After step #5, the two hosts are added to the rhvm Re-verify this bug according #c22. Hi Emma, Should we open a specific bug report for doc team ? Would be nice to have such step by step in our official docs. Thanks! (In reply to Martin Perina from comment #16) > (In reply to Douglas Schilling Landgraf from comment #15) > > I'd say (In reply to Martin Perina from comment #14) > > > Several notes: > > > > > > 1. ovirt-engine-sdk-python provides Python SDK v3, but you need to use > > > Python SDK v4 (provided by python-ovirt-engine-sdk4) which is required by > > > Ansible modules for oVirt > > > > > > > Could you please share the ansible ovirt module name for downstream? > > Ansible modules for oVirt have the same name for both upstream and > downstream (always ovirt_???), no renaming "craziness" as we performed with > RPM packages ... > > > > > > > > > 2. It depends on the usage: > > > > > > - if you want register single host, then the Ansible playbook can be > > > executed on this host, but you need to have installed > > > python-ovirt-engine-sdk4 on this host > > > > > > - if you want to register multiple hosts, then Ansible playbook can be > > > executed on different hosts (either engine host or any other host which has > > > installed python-ovirt-engine-sdk4) > > > > > > > > > 3. If you want to execute on engine host, you don't need to SSH to it and > > > execute Ansible there, you can tell Ansible where playbook should be > > > executed and Ansible will connect to the host automatically (but you need to > > > install all dependencies like python-ovirt-engine-sdk4 on that host > > > manually, Ansible does not install dependencies automatically) > > > > Would be nice to see this documented in a way that users could follow steps > > to install packages/channels needed and enable the usage of ansible for > > registering/approving the hosts. In others words, doesn't matter if it's > > RHVM, RHVH or RHEL host. > > > > Does it make sense? > > We are still discussion with Documentation team, how our docs around Ansible > integration will look like @Martin, are you synced with Emma? Do we have a doc bug for ansible registration/auto approve/etc? (In reply to Douglas Schilling Landgraf from comment #27) > Hi Emma, > > Should we open a specific bug report for doc team ? Would be nice to have > such step by step in our official docs. > > Thanks! Sorry Douglas, this slipped through the cracks. I know Byron has been looking into some Ansible-related documentation. Byron, is there anything new here that needs to be documented? Hi, We currently have some overview information about Ansible here: - https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html/administration_guide/chap-automating_rhv_configuration_using_ansible I think we will need to add the content of this bug to our documentation. I will raise a separate docs bug. |