
I am having issues while trying to deploy an automated HC install ================================ ansible 2.8.2 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Jun 20 2019, 20:27:34) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] Ovirt node = 4.3.5 or 4.3.5 1.- Followed the procedure listed in the following link: https://access.redhat.com/documentation/en-us/red_hat_hyperconverged_infrast... 2.-Ran the playbook within Path: /etc/ansible/roles/gluster.ansible/playbooks/hc-ansible-deployment: ansible-playbook -i gluster_inventory.yml hc_deployment.yml --extra-vars='@he_gluster_vars.json' 3.-Json file [root@host1 hc-ansible-deployment]# cat he_gluster_vars.json { "he_appliance_password": "changeme", "he_admin_password": "changeme", "he_domain_type": "glusterfs", "he_fqdn": "ovirt-engine.example.com", "he_vm_mac_addr": "00:16:fe:05:e1:ee", "he_default_gateway": "10.10.10.1", "he_mgmt_network": "ovirtmgmt", "he_ansible_host_name": "host1.example.com", "he_storage_domain_name": "HostedEngine", "he_storage_domain_path": "/engine", "he_storage_domain_addr": "vmm10.virt.aid3p", "he_mount_options": "backup-volfile-servers=host2.example.com:host3.example.com", "he_bridge_if": "eno49", "he_enable_hc_gluster_service": true, "he_mem_size_MB": "32768", "he_cluster": "Default", } Error: task path: /usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml:8 fatal: [localhost]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'he_host_ip'\n\nThe error appears to be in '/usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml': line 8, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n timeout: 180\n - name: Add an entry for this host on /etc/hosts on the local VM\n ^ here\n" } task path: /usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml:8 fatal: [localhost]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'he_host_ip'\n\nThe error appears to be in '/usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml': line 8, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n timeout: 180\n - name: Add an entry for this host on /etc/hosts on the local VM\n ^ here\n" } task path: /usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml:57 fatal: [localhost]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'he_local_vm_dir'\n\nThe error appears to be in '/usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml': line 57, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n delegate_to: \"{{ he_ansible_host_name }}\"\n - name: Get local VM dir path\n ^ here\n" } PLAY RECAP ****************************************************************************************************************************************************************************** localhost : ok=184 changed=56 unreachable=0 failed=2 skipped=65 rescued=0 ignored=0 host1.example.com : ok=34 changed=17 unreachable=0 failed=0 skipped=70 rescued=0 ignored=0 host2.example.com : ok=37 changed=20 unreachable=0 failed=0 skipped=100 rescued=0 ignored=0 host3.example.com : ok=34 changed=17 unreachable=0 failed=0 skipped=70 rescued=0 ignored=0 So it seems that for some strange reason it is not getting the correct he_host_ip and he_local_vm_dir. has anybody else encountered this error? -Adrian

On Tue, Oct 8, 2019 at 6:12 PM <adrianquintero@gmail.com> wrote:
I am having issues while trying to deploy an automated HC install ================================ ansible 2.8.2 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Jun 20 2019, 20:27:34) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Ovirt node = 4.3.5 or 4.3.5
1.- Followed the procedure listed in the following link:
https://access.redhat.com/documentation/en-us/red_hat_hyperconverged_infrast...
2.-Ran the playbook within Path: /etc/ansible/roles/gluster.ansible/playbooks/hc-ansible-deployment: ansible-playbook -i gluster_inventory.yml hc_deployment.yml --extra-vars='@he_gluster_vars.json'
3.-Json file [root@host1 hc-ansible-deployment]# cat he_gluster_vars.json { "he_appliance_password": "changeme", "he_admin_password": "changeme", "he_domain_type": "glusterfs", "he_fqdn": "ovirt-engine.example.com", "he_vm_mac_addr": "00:16:fe:05:e1:ee", "he_default_gateway": "10.10.10.1",
"he_mgmt_network": "ovirtmgmt",
"he_ansible_host_name": "host1.example.com", "he_storage_domain_name": "HostedEngine", "he_storage_domain_path": "/engine", "he_storage_domain_addr": "vmm10.virt.aid3p", "he_mount_options": "backup-volfile-servers=host2.example.com:h ost3.example.com", "he_bridge_if": "eno49", "he_enable_hc_gluster_service": true, "he_mem_size_MB": "32768", "he_cluster": "Default", }
Error: task path: /usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml:8 fatal: [localhost]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'he_host_ip'\n\nThe error appears to be in '/usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml': line 8, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n timeout: 180\n - name: Add an entry for this host on /etc/hosts on the local VM\n ^ here\n" }
task path: /usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml:8 fatal: [localhost]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'he_host_ip'\n\nThe error appears to be in '/usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml': line 8, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n timeout: 180\n - name: Add an entry for this host on /etc/hosts on the local VM\n ^ here\n" }
task path: /usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml:57 fatal: [localhost]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'he_local_vm_dir'\n\nThe error appears to be in '/usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/03_engine_initial_tasks.yml': line 57, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n delegate_to: \"{{ he_ansible_host_name }}\"\n - name: Get local VM dir path\n ^ here\n" } PLAY RECAP ****************************************************************************************************************************************************************************** localhost : ok=184 changed=56 unreachable=0 failed=2 skipped=65 rescued=0 ignored=0 host1.example.com : ok=34 changed=17 unreachable=0 failed=0 skipped=70 rescued=0 ignored=0 host2.example.com : ok=37 changed=20 unreachable=0 failed=0 skipped=100 rescued=0 ignored=0 host3.example.com : ok=34 changed=17 unreachable=0 failed=0 skipped=70 rescued=0 ignored=0
So it seems that for some strange reason it is not getting the correct he_host_ip and he_local_vm_dir.
has anybody else encountered this error?
Hi Adrian, you want to configure your engine VM to get an IP address from DHCP, right? Are you sure that the value of he_ansible_host_name exactly matches the address of your first host as used in your inventory file? In {{ hostvars[he_ansible_host_name]['he_host_ip'] }} syntax the deployment process is trying, running a task on the engine VM, to access a value set on the first host. This uses ansible hostvars mechanism to let a task run on the engine VM access a variable set on an another host, in this case an host named in the inventory as the value of he_ansible_host_name so he_ansible_host_name should exactly match the name of the host in the inventory: using just the hostname on one side and the FQDN on the other could make it fail. If the configuration was instead fine, can you please send me a log file?
-Adrian _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/737OW75GZGPLXN...

Hi Simone, I do not want to configure the VM to get an IP from DHCP and not 100% sure if I need to define the information in /usr/share/ansible/roles/ovirt.hosted_engine_setup/defaults/main.yml? because I see the following: ---------------------------------------------- # Define if using STATIC ip configuration he_vm_ip_addr: null he_vm_ip_prefix: null he_dns_addr: null # up to 3 DNS servers IPs can be added he_vm_etc_hosts: false # user can add lines to /etc/hosts on the engine VM he_default_gateway: null he_network_test: 'dns' # can be: 'dns', 'ping', 'tcp' or 'none' he_tcp_t_address: null he_tcp_t_port: null ---------------------------------------------- But if I thought that playbooks/he_gluster_vars.json was used for ? I tried to follow: https://access.redhat.com/documentation/en-us/red_hat_hyperconverged_infrast... From those instructions I modified: 1.-playbooks/gluster_inventory.yml #Here I don't see he_ansible_host_name variable # I do have hc_nodes: hosts: host1.example.com host2.example.com host3.example.com Should I had "he_ansible_host_name": "host1.example.com" to this file also? 2.-playbooks/he_gluster_vars.json "he_ansible_host_name": "host1.example.com" I have 3 servers freshly rekicked and ready to redeploy the hosted engine, but will wait for your thoughts as I might be missing something from my process. thank you, Adrian

Simone, I was able to deploy the environment with your suggetion above, the issue was my FQDN host1.example.com vs host1.example.other.com however right at the end the playbooks launched a acouple of errors/warnings and that prevented the other 2 hosts to be joined into the cluster. Note that the hosted-engine is up and running and reachable thru the WEB UI. TASK [Add additional gluster hosts to engine] ********************************************** task path: /etc/ansible/roles/gluster.ansible/playbooks/hc-ansible-deployment/tasks/add_hosts_storage_domains.yml:17 fatal: [localhost]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'ovirt_auth' is undefined\n\nThe error appears to be in '/etc/ansible/roles/gluster.ansible/playbooks/hc-ansible-deployment/tasks/add_hosts_storage_domains.yml': line 17, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Add additional gluster hosts to engine\n ^ here\n" } ...ignoring TASK [Add additional glusterfs storage domains] *********************** task path: /etc/ansible/roles/gluster.ansible/playbooks/hc-ansible-deployment/tasks/add_hosts_storage_domains.yml:34 fatal: [localhost]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'he_host_name' is undefined\n\nThe error appears to be in '/etc/ansible/roles/gluster.ansible/playbooks/hc-ansible-deployment/tasks/add_hosts_storage_domains.yml': line 34, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: \"Add additional glusterfs storage domains\"\n ^ here\n" } ...ignoring META: ran handlers META: ran handlers PLAY RECAP ***************** localhost : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=2 host1.example.other.com : ok=408 changed=144 unreachable=0 failed=0 skipped=210 rescued=0 ignored=1 host2.example.other.com : ok=34 changed=17 unreachable=0 failed=0 skipped=70 rescued=0 ignored=0 host3.example.other.com : ok=34 changed=17 unreachable=0 failed=0 skipped=70 rescued=0 ignored=0 Thanks, Adrian

I think I finally found the issue, it it was related to tasks/add_hosts_storage_domains.yml where hosts: localhost should be set to hosts: host1.example.other.com As mentioned all worked except for one warning: TASK [ovirt.hosted_engine_setup : Always revoke the SSO token] *************************************************************************************************** fatal: [host1.example.other.com]: FAILED! => {"changed": false, "msg": "You must specify either 'url' or 'hostname'."} ...ignoring host1.example.other.com : ok=418 changed=150 unreachable=0 failed=0 skipped=220 rescued=0 ignored=1 I researched a bit about this error and found https://github.com/ansible/ansible/issues/53379 but not sure if this is still the case. any feedback is welcome. thank you, Adrian

On Fri, Oct 11, 2019 at 9:01 AM <adrianquintero@gmail.com> wrote:
I think I finally found the issue, it it was related to tasks/add_hosts_storage_domains.yml where hosts: localhost should be set to hosts: host1.example.other.com
As mentioned all worked except for one warning:
TASK [ovirt.hosted_engine_setup : Always revoke the SSO token]
*************************************************************************************************** fatal: [host1.example.other.com]: FAILED! => {"changed": false, "msg": "You must specify either 'url' or 'hostname'."} ...ignoring
host1.example.other.com : ok=418 changed=150 unreachable=0 failed=0 skipped=220 rescued=0 ignored=1
I researched a bit about this error and found https://github.com/ansible/ansible/issues/53379 but not sure if this is still the case.
Yes, it's that one. AFAIK it's not going to fail the whole deployment because we added an ignore over that kind of errors. AFAIK it's not systematic.
any feedback is welcome.
thank you,
Adrian _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/UN5OWABCO4FCYT...
participants (2)
-
adrianquintero@gmail.com
-
Simone Tiraboschi