Bug 1541129 - openshift_master_extension_scripts value being overridden
Summary: openshift_master_extension_scripts value being overridden
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.7.z
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-01 19:19 UTC by Greg Rodriguez II
Modified: 2018-05-18 03:55 UTC (History)
6 users (show)

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.
Clone Of:
Environment:
Last Closed: 2018-05-18 03:54:45 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1576 None None None 2018-05-18 03:55:23 UTC

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


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