Bug 1641085 - Openshift-on-Openstack install playbook fails after PR #10409
Summary: Openshift-on-Openstack install playbook fails after PR #10409
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.10.z
Assignee: Tomas Sedovic
QA Contact: Jon Uriarte
Depends On:
TreeView+ depends on / blocked
Reported: 2018-10-19 15:20 UTC by Jon Uriarte
Modified: 2019-01-10 09:27 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The OpenStack dynamic inventory was always setting the `openshift_kubelet_name_override` Ansible variable. Consequence: This variable is only expected to be set during upgrades from 3.10 to 3.11. Setting it for brand new deployments will cause the openshift-ansible playbooks to fail with an error. Fix: The inventory no longer sets `openshift_kubelet_name_override` variable automatically. Result: The OpenStack cloud deployments are now able to finish successfully.
Clone Of:
Last Closed: 2019-01-10 09:27:10 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github openshift openshift-ansible pull 10466 'None' 'closed' 'Remove hostname override from OpenStack inventory' 2019-12-06 12:43:52 UTC
Github openshift openshift-ansible pull 10467 'None' 'closed' '[release-3.11] Remove hostname override from OpenStack inventory' 2019-12-06 12:43:52 UTC
Github openshift openshift-ansible pull 10468 'None' 'closed' '[release-3.10] Remove hostname override from OpenStack inventory' 2019-12-06 12:43:52 UTC
Red Hat Product Errata RHBA-2019:0026 None None None 2019-01-10 09:27:16 UTC

Description Jon Uriarte 2018-10-19 15:20:39 UTC
Description of problem:

Cannot install OCP 3.10 on OSP. It seems the PR https://github.com/openshift/openshift-ansible/pull/10409 is causing this failure, but I don't know if it is a bug in OCP or Openstack install playbook needs some reordering when calling prerequisites playbook and setting facts.

Version-Release number of the following components:
rpm -q openshift-ansible

rpm -q ansible

ansible --version
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/cloud-user/.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, Feb 20 2018, 09:19:12) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

How reproducible: always

Steps to Reproduce:
1. Install OSP 13
2. Run Openstack playbooks:
$ ansible-playbook     --user openshift     -i "/usr/share/ansible/openshift-ansible/playbooks/openstack/inventory.py"     -i inventory "/usr/share/ansible/openshift-ansible/playbooks/openstack/openshift-cluster/prerequisites.yml"

$ ansible-playbook     --user openshift     -i "/usr/share/ansible/openshift-ansible/playbooks/openstack/inventory.py"     -i inventory "/usr/share/ansible/openshift-ansible/playbooks/openstack/openshift-cluster/provision.yml"

$ ansible-playbook     --user openshift     -i "/usr/share/ansible/openshift-ansible/playbooks/openstack/inventory.py"     -i inventory red-hat-ca.yml

$ ansible-playbook     --user openshift     -i "/usr/share/ansible/openshift-ansible/playbooks/openstack/inventory.py"     -i inventory repos.yml

$ ansible-playbook     --user openshift     -i "/usr/share/ansible/openshift-ansible/playbooks/openstack/inventory.py"     -i inventory "/usr/share/ansible/openshift-ansible/playbooks/openstack/openshift-cluster/install.yml"

Actual results:

PLAY [Fail openshift_kubelet_name_override for new hosts] *********************************************************************************************************************************************************

TASK [Gathering Facts] ********************************************************************************************************************************************************************************************
ok: [app-node-0.openshift.example.com]
ok: [infra-node-0.openshift.example.com]
ok: [app-node-1.openshift.example.com]
ok: [master-0.openshift.example.com]

TASK [Fail when openshift_kubelet_name_override is defined] *******************************************************************************************************************************************************
fatal: [app-node-0.openshift.example.com]: FAILED! => {"changed": false, "failed": true, "msg": "openshift_kubelet_name_override Cannot be defined for new hosts"}
fatal: [app-node-1.openshift.example.com]: FAILED! => {"changed": false, "failed": true, "msg": "openshift_kubelet_name_override Cannot be defined for new hosts"}
fatal: [master-0.openshift.example.com]: FAILED! => {"changed": false, "failed": true, "msg": "openshift_kubelet_name_override Cannot be defined for new hosts"}
fatal: [infra-node-0.openshift.example.com]: FAILED! => {"changed": false, "failed": true, "msg": "openshift_kubelet_name_override Cannot be defined for new hosts"}
 [WARNING]: Could not create retry file '/usr/share/ansible/openshift-ansible/playbooks/openstack/openshift-cluster/install.retry'.         [Errno 13] Permission denied: u'/usr/share/ansible/openshift-

PLAY RECAP ********************************************************************************************************************************************************************************************************
app-node-0.openshift.example.com : ok=1    changed=0    unreachable=0    failed=1   
app-node-1.openshift.example.com : ok=1    changed=0    unreachable=0    failed=1   
infra-node-0.openshift.example.com : ok=1    changed=0    unreachable=0    failed=1   
master-0.openshift.example.com : ok=1    changed=0    unreachable=0    failed=1   

Failure summary:

  1. Hosts:    app-node-0.openshift.example.com, app-node-1.openshift.example.com, infra-node-0.openshift.example.com, master-0.openshift.example.com
     Play:     Fail openshift_kubelet_name_override for new hosts
     Task:     Fail when openshift_kubelet_name_override is defined
     Message:  openshift_kubelet_name_override Cannot be defined for new hosts

Expected results: successful installation

Comment 1 Tomas Sedovic 2018-10-22 07:25:36 UTC
The issue is with this line:


and the corresponding:


This variable was introduced here: https://github.com/openshift/openshift-ansible/commit/1faee0942dec05b6f652669ad6cfced986a0cbc9

(it used to be called `openshift_hostname`)

And it is now disallowed for any new (non-upgrade) deploments:


So to resolve this, we must stop setting the variable in our dynamic inventory (resources.py).

I can't tell whether that will be enough, though. Not setting the variable may cause other trouble we'll have to figure out.

Comment 2 Jon Uriarte 2018-10-22 09:37:01 UTC
In OCP 3.10 the 'openshift_kubelet_name_override' is defined in inventory.py instead of in resources.py.

Commenting https://github.com/openshift/openshift-ansible/blob/release-3.10/playbooks/openstack/inventory.py#L100-L101 lines in OCP 3.10 worked and the install playbook finishes successfully.

Comment 10 GenadiC 2018-12-16 14:03:13 UTC
We can install OCP 3.10 on OSP

Comment 12 errata-xmlrpc 2019-01-10 09:27:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.