Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1744248

Summary: redefining openshift_metrics_project from default openshift-infra will cause installation to fail
Product: OpenShift Container Platform Reporter: Chuck Douglas <cdouglas>
Component: InstallerAssignee: Russell Teague <rteague>
Installer sub component: openshift-ansible QA Contact: Junqi Zhao <juzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: low    
Version: 3.11.0   
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-18 14:52:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chuck Douglas 2019-08-21 15:55:19 UTC
Description of problem:
./roles/openshift_metrics/README.md states that:

`The following variables need to be set and will be validated:

- `openshift_metrics_hawkular_hostname`: hostname used on the hawkular metrics route.

- `openshift_metrics_project`: project (i.e. namespace) where the components will be
  deployed.`


Setting `openshift_metrics_project` to anything other than the default of `openshift-infra`, however, causes the installation to fail during the
`./roles/openshift_metrics/tasks/pre_install.yaml` playbook with the message:

`Cannot get annotations on {{ openshift_metrics_project }} namespace`

where `{{ openshift_metrics_project }}` is the redefined name.  This appears to be due to the fact that there is not a play that creates a newly defined `openshift_metrics_project` namespace.  `openshift-infra` is created by default in other plays.

Version-Release number of the following components:

rpm -q openshift-ansible
openshift-ansible-3.11.104-1.git.0.379a011.el7.noarch

rpm -q ansible                                                                                                                           
ansible-2.6.14-1.el7ae.noarch

ansible --version
ansible 2.6.14
  config file = /root/openshift-cluster-311-lab/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 = /bin/ansible
  python version = 2.7.5 (default, Jun 11 2019, 12:19:05) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

How reproducible: Always

Steps to Reproduce:
1.  define an OSEv3 variable `openshift_metrics_project=openshift-metrics`
2. run installer.
3. fails

Actual results:
Cannot get annotations on openshift-metrics namespace

Expected results:
Functioning cluster with metrics installed.

Comment 1 Scott Dodson 2019-10-15 15:20:11 UTC
Thanks, however this cannot be reconfigured due to several other factors as such it's not included in the product documentation at docs.openshift.com.

Do you mind opening a pull request to amend in the in project documentation?

Comment 2 Chuck Douglas 2019-10-22 15:12:58 UTC
Pull request submitted.

https://github.com/openshift/openshift-ansible/pull/11973

Comment 6 errata-xmlrpc 2019-11-18 14:52:08 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:3817