openshift-ansible: prerequisites.yml fail at Gather Cluster facts

Description

Provide a brief description of your issue here. For example:

On a multi master install, if the first master goes down we can no longer scaleup the cluster with new nodes or masters.

I’m trying to install an “all new” cluster with 3.11, Centos 7.6 (guest image) and container deploy system (alredy tried rpm playbooks with exact same issue)

Data:

[root@deployokd ~]# ansible --version ansible 2.7.8 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, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

Steps To Reproduce
  1. Prepare hosts
  2. Configure DNS
  3. Execute: atomic install --system --storage=ostree --set INVENTORY_FILE=/etc/ansible/hosts --set PLAYBOOK_FILE=/usr/share/ansible/openshift-ansible/playbooks/prerequisites.yml --set OPTS="" docker.io/openshift/origin-ansible:v3.11
Expected Results

At least… pass prerequisites playbook

Observed Results

Fail at this point:

PLAY [Initialize cluster facts] ************************************************

TASK [get openshift_current_version] *******************************************
Wednesday 03 April 2019  14:40:58 +0000 (0:00:00.535)       0:00:15.777 *******
ok: [okd6.local]
ok: [okd5.local]
ok: [okd1.local]
ok: [okd2.local]
ok: [okd3.local]
ok: [okd7.local]
ok: [okd8.local]
ok: [okd9.local]

TASK [set_fact openshift_portal_net if present on masters] *********************
Wednesday 03 April 2019  14:40:59 +0000 (0:00:00.325)       0:00:16.103 *******
skipping: [okd1.local]
skipping: [okd2.local]
skipping: [okd3.local]
skipping: [okd5.local]
skipping: [okd6.local]
skipping: [okd7.local]
skipping: [okd8.local]
skipping: [okd9.local]

TASK [Gather Cluster facts] ****************************************************
Wednesday 03 April 2019  14:40:59 +0000 (0:00:00.209)       0:00:16.313 *******
fatal: [okd6.local]: FAILED! => {"changed": false, "module_stderr": "KeyError('ansible_os_family',)\nTraceback (most recent call last):\n  File \"<stdin>\", line 113, in <module>\n  File \"<stdin>\", line 105, in _ansiballz_main\n  File \"<stdin>\", line 48, in invoke_module\n  File \"/tmp/ansible_openshift_facts_payload_CeCDD1/__main__.py\", line 1264, in <module>\n  File \"/tmp/ansible_openshift_facts_payload_CeCDD1/__main__.py\", line 1251, in main\n  File \"/tmp/ansible_openshift_facts_payload_CeCDD1/__main__.py\", line 1011, in __init__\n  File \"/tmp/ansible_openshift_facts_payload_CeCDD1/__main__.py\", line 1029, in generate_facts\n  File \"/tmp/ansible_openshift_facts_payload_CeCDD1/__main__.py\", line 1058, in get_defaults\nKeyError: 'address'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
fatal: [okd5.local]: FAILED! => {"changed": false, "module_stderr": "KeyError('ansible_os_family',)\nTraceback (most recent call last):\n  File \"<stdin>\", line 113, in <module>\n  File \"<stdin>\", line 105, in _ansiballz_main\n  File \"<stdin>\", line 48, in invoke_module\n  File \"/tmp/ansible_openshift_facts_payload_71hgh8/__main__.py\", line 1264, in <module>\n  File \"/tmp/ansible_openshift_facts_payload_71hgh8/__main__.py\", line 1251, in main\n  File \"/tmp/ansible_openshift_facts_payload_71hgh8/__main__.py\", line 1011, in __init__\n  File \"/tmp/ansible_openshift_facts_payload_71hgh8/__main__.py\", line 1029, in generate_facts\n  File \"/tmp/ansible_openshift_facts_payload_71hgh8/__main__.py\", line 1058, in get_defaults\nKeyError: 'address'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
fatal: [okd7.local]: FAILED! => {"changed": false, "module_stderr": "KeyError('ansible_os_family',)\nTraceback (most recent call last):\n  File \"<stdin>\", line 113, in <module>\n  File \"<stdin>\", line 105, in _ansiballz_main\n  File \"<stdin>\", line 48, in invoke_module\n  File \"/tmp/ansible_openshift_facts_payload_bXpBA7/__main__.py\", line 1264, in <module>\n  File \"/tmp/ansible_openshift_facts_payload_bXpBA7/__main__.py\", line 1251, in main\n  File \"/tmp/ansible_openshift_facts_payload_bXpBA7/__main__.py\", line 1011, in __init__\n  File \"/tmp/ansible_openshift_facts_payload_bXpBA7/__main__.py\", line 1029, in generate_facts\n  File \"/tmp/ansible_openshift_facts_payload_bXpBA7/__main__.py\", line 1058, in get_defaults\nKeyError: 'address'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
fatal: [okd2.local]: FAILED! => {"changed": false, "module_stderr": "KeyError('ansible_os_family',)\nTraceback (most recent call last):\n  File \"<stdin>\", line 113, in <module>\n  File \"<stdin>\", line 105, in _ansiballz_main\n  File \"<stdin>\", line 48, in invoke_module\n  File \"/tmp/ansible_openshift_facts_payload_nGU1GL/__main__.py\", line 1264, in <module>\n  File \"/tmp/ansible_openshift_facts_payload_nGU1GL/__main__.py\", line 1251, in main\n  File \"/tmp/ansible_openshift_facts_payload_nGU1GL/__main__.py\", line 1011, in __init__\n  File \"/tmp/ansible_openshift_facts_payload_nGU1GL/__main__.py\", line 1029, in generate_facts\n  File \"/tmp/ansible_openshift_facts_payload_nGU1GL/__main__.py\", line 1058, in get_defaults\nKeyError: 'address'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
fatal: [okd9.local]: FAILED! => {"changed": false, "module_stderr": "KeyError('ansible_os_family',)\nTraceback (most recent call last):\n  File \"<stdin>\", line 113, in <module>\n  File \"<stdin>\", line 105, in _ansiballz_main\n  File \"<stdin>\", line 48, in invoke_module\n  File \"/tmp/ansible_openshift_facts_payload_YGOrc0/__main__.py\", line 1264, in <module>\n  File \"/tmp/ansible_openshift_facts_payload_YGOrc0/__main__.py\", line 1251, in main\n  File \"/tmp/ansible_openshift_facts_payload_YGOrc0/__main__.py\", line 1011, in __init__\n  File \"/tmp/ansible_openshift_facts_payload_YGOrc0/__main__.py\", line 1029, in generate_facts\n  File \"/tmp/ansible_openshift_facts_payload_YGOrc0/__main__.py\", line 1058, in get_defaults\nKeyError: 'address'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
fatal: [okd1.local]: FAILED! => {"changed": false, "module_stderr": "KeyError('ansible_os_family',)\nTraceback (most recent call last):\n  File \"<stdin>\", line 113, in <module>\n  File \"<stdin>\", line 105, in _ansiballz_main\n  File \"<stdin>\", line 48, in invoke_module\n  File \"/tmp/ansible_openshift_facts_payload_8nG3Sf/__main__.py\", line 1264, in <module>\n  File \"/tmp/ansible_openshift_facts_payload_8nG3Sf/__main__.py\", line 1251, in main\n  File \"/tmp/ansible_openshift_facts_payload_8nG3Sf/__main__.py\", line 1011, in __init__\n  File \"/tmp/ansible_openshift_facts_payload_8nG3Sf/__main__.py\", line 1029, in generate_facts\n  File \"/tmp/ansible_openshift_facts_payload_8nG3Sf/__main__.py\", line 1058, in get_defaults\nKeyError: 'address'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
fatal: [okd3.local]: FAILED! => {"changed": false, "module_stderr": "KeyError('ansible_os_family',)\nTraceback (most recent call last):\n  File \"<stdin>\", line 113, in <module>\n  File \"<stdin>\", line 105, in _ansiballz_main\n  File \"<stdin>\", line 48, in invoke_module\n  File \"/tmp/ansible_openshift_facts_payload_1rbbc5/__main__.py\", line 1264, in <module>\n  File \"/tmp/ansible_openshift_facts_payload_1rbbc5/__main__.py\", line 1251, in main\n  File \"/tmp/ansible_openshift_facts_payload_1rbbc5/__main__.py\", line 1011, in __init__\n  File \"/tmp/ansible_openshift_facts_payload_1rbbc5/__main__.py\", line 1029, in generate_facts\n  File \"/tmp/ansible_openshift_facts_payload_1rbbc5/__main__.py\", line 1058, in get_defaults\nKeyError: 'address'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
fatal: [okd8.local]: FAILED! => {"changed": false, "module_stderr": "KeyError('ansible_os_family',)\nTraceback (most recent call last):\n  File \"<stdin>\", line 113, in <module>\n  File \"<stdin>\", line 105, in _ansiballz_main\n  File \"<stdin>\", line 48, in invoke_module\n  File \"/tmp/ansible_openshift_facts_payload_m1WJB2/__main__.py\", line 1264, in <module>\n  File \"/tmp/ansible_openshift_facts_payload_m1WJB2/__main__.py\", line 1251, in main\n  File \"/tmp/ansible_openshift_facts_payload_m1WJB2/__main__.py\", line 1011, in __init__\n  File \"/tmp/ansible_openshift_facts_payload_m1WJB2/__main__.py\", line 1029, in generate_facts\n  File \"/tmp/ansible_openshift_facts_payload_m1WJB2/__main__.py\", line 1058, in get_defaults\nKeyError: 'address'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP *********************************************************************
localhost                  : ok=11   changed=0    unreachable=0    failed=0
okd1.local                 : ok=23   changed=4    unreachable=0    failed=1
okd2.local                 : ok=21   changed=4    unreachable=0    failed=1
okd3.local                 : ok=21   changed=4    unreachable=0    failed=1
okd5.local                 : ok=20   changed=4    unreachable=0    failed=1
okd6.local                 : ok=20   changed=4    unreachable=0    failed=1
okd7.local                 : ok=20   changed=4    unreachable=0    failed=1
okd8.local                 : ok=20   changed=4    unreachable=0    failed=1
okd9.local                 : ok=20   changed=4    unreachable=0    failed=1


INSTALLER STATUS ***************************************************************
Initialization  : In Progress (0:00:16)
Wednesday 03 April 2019  14:41:00 +0000 (0:00:00.840)       0:00:17.153 *******
===============================================================================
Gathering Facts --------------------------------------------------------- 1.12s
Gather Cluster facts ---------------------------------------------------- 0.84s
openshift_repos : Ensure libselinux-python is installed ----------------- 0.57s
openshift_repos : Configure correct origin release repository ----------- 0.55s
Ensure openshift-ansible installer package deps are installed ----------- 0.54s
openshift_repos : Configure origin gpg keys ----------------------------- 0.53s
openshift_repos : refresh cache ----------------------------------------- 0.49s
openshift_repos : Remove openshift_additional.repo file ----------------- 0.45s
Determine if chrony is installed ---------------------------------------- 0.36s
openshift_repos : include_tasks ----------------------------------------- 0.35s
Start and enable ntpd/chronyd ------------------------------------------- 0.35s
Detecting Operating System from ostree_booted --------------------------- 0.35s
openshift_sanitize_inventory : include_tasks ---------------------------- 0.34s
get openshift_current_version ------------------------------------------- 0.33s
openshift_sanitize_inventory : include_tasks ---------------------------- 0.31s
openshift_sanitize_inventory : Ensure that dynamic provisioning is set if using dynamic storage --- 0.30s
openshift_sanitize_inventory : Check for usage of deprecated variables --- 0.26s
openshift_sanitize_inventory : At least one master is schedulable ------- 0.24s
openshift_sanitize_inventory : set_fact --------------------------------- 0.24s
openshift_repos : Ensure clean repo cache in the event repos have been changed manually --- 0.24s

Additional Information

My inventory: ‘’’ [OSEv3:children] masters nodes etcd

[etcd] okd1.local openshift_public_hostname=okd1.local okd2.local openshift_public_hostname=okd2.local okd3.local openshift_public_hostname=okd3.local

[masters] okd1.local openshift_public_hostname=okd1.local okd2.local openshift_public_hostname=okd2.local okd3.local openshift_public_hostname=okd3.local

[nodes] okd1.local openshift_public_hostname=okd1.local openshift_node_group_name=‘node-config-master’ okd2.local openshift_public_hostname=okd2.local openshift_node_group_name=‘node-config-master’ okd3.local openshift_public_hostname=okd3.local openshift_node_group_name=‘node-config-master’ okd5.local openshift_public_hostname=okd5.local openshift_node_group_name=‘node-config-infra’ okd6.local openshift_public_hostname=okd6.local openshift_node_group_name=‘node-config-infra’ okd7.local openshift_public_hostname=okd7.local openshift_node_group_name=‘node-config-compute’ okd8.local openshift_public_hostname=okd8.local openshift_node_group_name=‘node-config-compute’ okd9.local openshift_public_hostname=okd9.local openshift_node_group_name=‘node-config-compute’

[OSEv3:vars] ansible_ssh_user=root ansible_become=false debug_level=2 openshift_deployment_type=origin

openshift_master_cluster_method=native openshift_master_cluster_hostname=okd4.local openshift_master_cluster_public_hostname=okd.dev

openshift_master_identity_providers=[{‘name’: ‘htpasswd_auth’, ‘login’: ‘true’, ‘challenge’: ‘true’, ‘kind’: ‘HTPasswdPasswordIdentityProvider’}] openshift_master_htpasswd_users={‘admin’: ‘xxxxxxxxxxxxxxxxxxx’}

openshift_docker_additional_registries=hub.docker.com openshift_master_default_subdomain=local ‘’’

I’m already test with a clone of 3.11 branch with git, and rpm installed playbooks. Same errors.

Any help? Thanks a lot.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

What’s the contents of /etc/ansible/facts.d on the target hosts? Does it has ansible_os_family key?