Bug 1541129

Summary: openshift_master_extension_scripts value being overridden
Product: OpenShift Container Platform Reporter: Greg Rodriguez II <grodrigu>
Component: InstallerAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.7.1CC: aos-bugs, jokerman, mmccomas, sdodson, tmanor, yapei
Target Milestone: ---   
Target Release: 3.7.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, the value of `openshift_master_extension_scripts` was not preserved during installs when the service catalog was enabled. The bug has fixed been, and now the scripts in `openshift_master_extension_scripts` are correctly set during install.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-18 03:54:45 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 Greg Rodriguez II 2018-02-01 19:19:05 UTC
Description of problem: 
From the customer - 
The wire_aggregator task in the openshift-ansible (v3.7/v3.9/master) playbook has a yedit that overrides assetConfig.extensionScripts instead of appending. This makes the openshift_master_extension_scripts variable useless. This is currently affecting multiple versions of the playbook.
https://github.com/openshift/openshift-ansible/blob/release-3.7/playbooks/common/openshift-master/tasks/wire_aggregator.yml#L170

Version-Release number of the following components:
Gathering the below details from customer.  Will add in new case note.

rpm -q openshift-ansible
rpm -q ansible
ansible --version

How reproducible: unconfirmed

Steps to Reproduce:
From the customer - 
I tested a local fix but need this to be propagated to the official playbook for production deploys. It looks like this:
170     - key: assetConfig.extensionScripts 
171       value: [/etc/origin/master/openshift-ansible-catalog-console.js] 
It should look like this:
170     - key: assetConfig.extensionScripts 
171         value: /etc/origin/master/openshift-ansible-catalog-console.js
172        action: append

Here is the connected issue on github: https://github.com/openshift/openshift-ansible/issues/6921

Actual results:
170     - key: assetConfig.extensionScripts 
171       value: [/etc/origin/master/openshift-ansible-catalog-console.js] 

Expected results:
170     - key: assetConfig.extensionScripts 
171         value: /etc/origin/master/openshift-ansible-catalog-console.js
172        action: append

Additional info:
Gathering this information from customer, will add in new note: Please attach logs from ansible-playbook with the -vvv flag

https://github.com/openshift/openshift-ansible/blob/release-3.7/playbooks/common/openshift-master/tasks/wire_aggregator.yml#L170

https://github.com/openshift/openshift-ansible/issues/6921

Comment 1 Greg Rodriguez II 2018-02-03 00:19:53 UTC
From customer: 

This particular bug is present in all versions of the playbook and is unaffected by ansible version. The issue can be quickly identified just by looking at the code. The exact code fix has already been provided in the comments. Here is a link to a git patch that I created: https://github.com/allen13/openshift-ansible-vagrant/blob/master/playbooks/roles/openshift_ansible_patches/files/fix-extension-scripts.patch

Comment 10 Yadan Pei 2018-05-08 09:15:18 UTC
set openshift_master_extension_scripts=['/root/project-left-nav.js'] in inventory and start installation v3.7, finally the installation succeed.

/etc/origin/master/openshift-ansible-catalog-console.js is appended to extensionScripts along with '/root/project-left-nav.js' instead of overriding '/root/project-left-nav.js'

extensionScripts value in master-config.yaml:
  extensionScripts:
  - /root/project-left-nav.js
  - /etc/origin/master/openshift-ansible-catalog-console.js

Verified with openshift-ansible-3.7.46-1.git.0.37f607e.el7.noarch.rpm for openshift v3.7.46

Comment 13 errata-xmlrpc 2018-05-18 03:54:45 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-2018:1576