Skip to content

HW Virtualization Task Not Skipped for Kubernetes #258

Description

@mattroark
SUMMARY

HW virtualization task is not skipped for Kubernetes, causing the deployment/run to fail.

ISSUE TYPE
  • Bug Report
COMPONENT NAME
  • Ansible
ANSIBLE VERSION
ansible 2.9.4
  config file = /home/ubuntu/express/ansible.cfg
  configured module search path = [u'/home/ubuntu/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Oct  8 2019, 14:14:10) [GCC 5.4.0 20160609]
CONFIGURATION
ANSIBLE_NOCOWS(/home/ubuntu/express/ansible.cfg) = True
ANSIBLE_PIPELINING(/home/ubuntu/express/ansible.cfg) = True
COMMAND_WARNINGS(/home/ubuntu/express/ansible.cfg) = False
DEFAULT_CALLBACK_WHITELIST(/home/ubuntu/express/ansible.cfg) = [u'profile_roles']
DEFAULT_HOST_LIST(/home/ubuntu/express/ansible.cfg) = [u'/home/ubuntu/express/inventory/hosts']
DEPRECATION_WARNINGS(/home/ubuntu/express/ansible.cfg) = False
HOST_KEY_CHECKING(/home/ubuntu/express/ansible.cfg) = False
RETRY_FILES_ENABLED(/home/ubuntu/express/ansible.cfg) = False
OS / ENVIRONMENT
  • Ubuntu 16.04.6 LTS
STEPS TO REPRODUCE
  1. Populate inventory hosts file with only Kubernetes hosts.
##
## Ansible Inventory
##
[all]
[all:vars]
ansible_ssh_private_key_file = ~/k8s.pem
ansible_become = True
ansible_user=ubuntu

################################################################################################
## Kubernetes Groups
################################################################################################
[pmk:children]
k8s_master
k8s_worker
## global variables defined in group_vars/containervisors.yml
## note: if the following variables are not defined, their tasks will be skipped
##   - cluster_uuid
[k8s_master]
master-0 ansible_host=172.20.34.152
master-1 ansible_host=172.20.34.138
master-2 ansible_host=172.20.34.136
[k8s_worker]
worker-0 ansible_host=172.20.34.137
worker-1 ansible_host=172.20.34.144
  1. Execute the pf9-express script, specifying only PMK.
# ./pf9-express -a pmk
EXPECTED RESULTS
  • HW virtualization support task would be skipped; it is not needed for K8s.
ACTUAL RESULTS
TASK [common : Check for hardware virtualization support] **************************************************************************************************************************************************************************************
Tuesday 04 February 2020  19:46:45 +0000 (0:00:00.627)       0:00:10.364 ******
fatal: [public-fission-master-0]: FAILED! => {"msg": "The conditional check 'inventory_hostname in groups.hypervisors' failed. The error was: error while evaluating conditional (inventory_hostname in groups.hypervisors): Unable to look up a name or access an attribute in template string ({% if inventory_hostname in groups.hypervisors %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'AnsibleUndefined' is not iterable\n\nThe error appears to be in '/home/ubuntu/express/roles/common/tasks/main.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Check for hardware virtualization support\n  ^ here\n"}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions