Bug 1656487 - ROUTER_SUBDOMAIN is set multiple times after running route-deploy playbook.
Summary: ROUTER_SUBDOMAIN is set multiple times after running route-deploy playbook.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Routing
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 3.11.z
Assignee: Miciah Dashiel Butler Masters
QA Contact: Hongan Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-05 15:44 UTC by Anshul Verma
Modified: 2019-06-26 09:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The oc_adm_router Ansible module allowed edits to add duplicate environment variables to the router deploymentconfig. Consequence: An Ansible inventory file that specified edits to the router deploymentconfig that added duplicate environment variables could produce a deploymentconfig with unpredictable behavior. Fix: If an edit appends an environment variable to the router deploymentconfig, and a variable by that name already exists, the oc_adm_router module now deletes the old variable. Result: Using an Ansible inventory file to append environment variables to the router deploymentconfig now has predictable behavior and allows users to override default environment variable settings.
Clone Of:
Environment:
Last Closed: 2019-06-26 09:07:54 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift openshift-ansible pull 11566 None closed Bug 1656487: Avoid duplicate env vars in router deploymentconfig 2020-02-20 09:10:30 UTC
Red Hat Product Errata RHBA-2019:1605 None None None 2019-06-26 09:08:02 UTC

Comment 5 Miciah Dashiel Butler Masters 2019-04-30 23:33:43 UTC
PR: https://github.com/openshift/openshift-ansible/pull/11566

Comment 7 Hongan Li 2019-06-13 05:50:34 UTC
Verified with openshift-ansible-3.11.117-1.git.0.add13ff.el7 and issue has been fixed.

Adding below options to inventory and run "ansible-playbook -i inventory /usr/share/ansible/openshift-ansible/playbooks/openshift-hosted/deploy_router.yml"

# Router Options
openshift_hosted_routers=[{"name":"router-ch-prod","certificate":{"certfile":"server.crt","keyfile":"server.key","cafile":"rootCA.pem"},"replicas":1,"serviceaccount":"router","namespace":"default","stats_port":1936,"edits":[{"action":"append","key":"spec.template.spec.containers[0].env","value":{"name":"NAMESPACE_LABELS","value":"router=router-ch-prod"}},{"action":"append","key":"spec.template.spec.containers[0].env","value":{"name":"ROUTER_OVERRIDE_HOSTNAME","value":"true"}},{"action":"append","key":"spec.template.spec.containers[0].env","value":{"name":"ROUTER_SUBDOMAIN","value":"${name}-${namespace}.apps.my.test.com"}}],"images":"registry.reg-aws.openshift.com:443/openshift3/ose-${component}:${version}","selector":"router=ch-prod","ports":["80:80","443:443"]}]

Then check the new deployment of router:
# oc get dc/router-ch-prod -o yaml | grep SUBDOMAIN -C 1
          value: "true"
        - name: ROUTER_SUBDOMAIN
          value: ${name}-${namespace}.apps.my.test.com

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