Bug 1688250 - oc_project fails when project already exist
Summary: oc_project fails when project already exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.11.z
Assignee: Tzu-Mainn Chen
QA Contact: GenadiC
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-13 12:00 UTC by Itzik Brown
Modified: 2019-06-26 09:08 UTC (History)
3 users (show)

Fixed In Version: openshift-ansible-3.11.96-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-26 09:07:55 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift openshift-ansible pull 11351 'None' closed [release-3.11] Add race condition protection when creating projects 2020-03-12 17:19:15 UTC
Red Hat Product Errata RHBA-2019:1605 None None None 2019-06-26 09:08:04 UTC

Description Itzik Brown 2019-03-13 12:00:47 UTC
Description of problem:
When installing Openshift on Openstack using multi-master setup I have the following error:

TASK [kuryr : Ensure project exists] *******************************************
fatal: [master-1.openshift.example.com]: FAILED! => {"changed": false, "msg": {"cmd": "/bin/oc adm new-project kuryr --admin-role=admin --node-selector=", "results": {}, "returncode": 1, "stderr": "error: project kuryr already exists\n", "stdout": ""}}
fatal: [master-2.openshift.example.com]: FAILED! => {"changed": false, "msg": {"cmd": "/bin/oc adm new-project kuryr --admin-role=admin --node-selector=", "results": {}, "returncode": 1, "stderr": "error: project kuryr already exists\n", "stdout": ""}}
changed: [master-0.openshift.example.com]

The step of ensuring the existence of the kuryr openshift project fails.

Version-Release number of the following components:
OSP14
openshift-ansible-3.11.95-1.git.0.d080cce.el7.noarch
ansible-2.6.14-1.el7ae.noarch
ansible 2.6.14
  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, Sep 12 2018, 05:31:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]


How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
Please include the entire output from the last TASK line through the end of output if an error is generated

Expected results:

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 Tzu-Mainn Chen 2019-03-13 16:45:20 UTC
This is caused by a race condition, where multiple masters will try and create the project if it doesn't yet exist. Note that this means that re-running the playbook should allow you to progress.

A more permanent fix is here: https://github.com/openshift/openshift-ansible/pull/11351

Comment 2 Itzik Brown 2019-03-18 18:49:16 UTC
Verified with: 3.11.97

Comment 4 errata-xmlrpc 2019-06-26 09:07:55 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.

https://access.redhat.com/errata/RHBA-2019:1605


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