Bug 1759835 - "openshift-ansible/playbooks/redeploy-certificates.yml" fails with default "openshift_metrics_install_metrics" values
Summary: "openshift-ansible/playbooks/redeploy-certificates.yml" fails with default "o...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.11.z
Assignee: Russell Teague
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-09 08:53 UTC by Pedro Amoedo
Modified: 2019-11-18 14:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: openshift_metrics_server_install had incomplet default value. Consequence: Redeploy certificates playbook would fail due to a missing value for openshift_metrics_server_install Fix: Update openshift_metrics_server_install defaults in all locations Result: Redeploy certificates playbook completes successfully, whether openshift-metrics is installed or not.
Clone Of:
Environment:
Last Closed: 2019-11-18 14:52:10 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift openshift-ansible pull 11969 0 'None' closed Bug 1759835: Fix redploy-certificates (metrics server) 2021-01-26 23:58:49 UTC
Github openshift openshift-ansible pull 11972 0 'None' closed Bug 1759835: Ensure openshift_metrics_server_install defaults are set 2021-01-26 23:59:32 UTC
Red Hat Product Errata RHBA-2019:3817 0 None None None 2019-11-18 14:52:21 UTC

Description Pedro Amoedo 2019-10-09 08:53:01 UTC
Description of problem:

When running openshift-ansible/playbooks/redeploy-certificates.yml without setting values for "openshift_metrics_server_install" nor for "openshift_metrics_server_install", the playbook fails with the following error:

~~~
    "msg": "The conditional check 'openshift_metrics_server_install | bool' failed. The error was: error while evaluating conditional (openshift_metrics_server_install | bool): 'openshift_metrics_server_install' is undefined\n\nThe error appears to have been in '/home/quicklab/openshift-ansible/playbooks/metrics-server/private/redeploy-certificates.yml': line 13, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n  - name: Create temp directory for all our templates\n    ^ here\n"
}
~~~

Version-Release number of the following components:

$ rpm -q openshift-ansible
openshift-ansible-3.11.146-1.git.0.fcedb45.el7.noarch

$ rpm -q ansible
ansible-2.6.19-1.el7ae.noarch

$ ansible --version
ansible 2.6.19
  config file = /home/quicklab/ansible.cfg
  configured module search path = [u'/home/quicklab/.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, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

How reproducible:

Steps to Reproduce:
1. Install latest 3.11.146 cluster with default metrics values (false)
2. Modify "openshift_master_cluster_public_hostname"
3. Run "openshift-ansible/playbooks/redeploy-certificates.yml"

Actual results:

TASK [Create temp directory for all our templates] *******************************************************************************************************************************************
task path: /home/quicklab/openshift-ansible/playbooks/metrics-server/private/redeploy-certificates.yml:13
fatal: [10.74.178.88]: FAILED! => {
    "msg": "The conditional check 'openshift_metrics_server_install | bool' failed. The error was: error while evaluating conditional (openshift_metrics_server_install | bool): 'openshift_metrics_server_install' is undefined\n\nThe error appears to have been in '/home/quicklab/openshift-ansible/playbooks/metrics-server/private/redeploy-certificates.yml': line 13, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n  - name: Create temp directory for all our templates\n    ^ here\n"
}

Expected results:

The workaround is to just set the following variables within the inventory or to pass them to the ansible-playbook command with "-e"

openshift_metrics_install_metrics=false
openshift_metrics_server_install=false (this second variable also fails when the first is fixed)

Additional info:

Verbose ansible-playbook (-vvv) logs are also attached.

Comment 4 Gaoyun Pei 2019-11-06 10:01:20 UTC
Could reproduce this issue with openshift-ansible-3.11.146-1.git.0.fcedb45.el7.noarch.rpm

TASK [Create temp directory for all our templates] *****************************
fatal: [ci-vm-10-0-149-71.hosted.upshift.rdu2.redhat.com]: FAILED! => {"msg": "The conditional check 'openshift_metrics_server_install | bool' failed. The error was: error while evaluating conditional (openshift_metrics_server_install | bool): 'openshift_metrics_server_install' is undefined\n\nThe error appears to have been in '/home/slave3/workspace/Run-Ansible-Playbooks-Nextge/private-openshift-ansible/playbooks/metrics-server/private/redeploy-certificates.yml': line 13, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n  - name: Create temp directory for all our templates\n    ^ here\n"}

Verify this bug with using openshift-ansible-3.11.154-1.git.0.7a11cbe.el7.noarch.rpm, no such error happened.

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

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


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