Hide Forgot
Description of problem: When launching openshift using BYO playbook, registry replicas seem to only depend on one selector, not the full one. e.g. registry selector is "region=infra,zone=registry" and we have 2 nodes with "region=infra,zone=registry" and 2 nodes with "region=infra,zone=router". This results in *4* replicas being used instead of *2*. Version-Release number of selected component (if applicable): 3.2.0.15 How reproducible: always
Created attachment 1148564 [details] ansible inventory Attaching inventory file. Please find a full log of installation. Search for string "byo/config" to see where ansible playbook is being run.
Seen from the log, found one interesting things, router is never created, due to openshift_hosted_router_nodes is empty. Just checked oo_oc_nodes_matching_selector function in playbooks/common/openshift-cluster/filter_plugins/oo_filters.py, seem like ansible code currently only could recognize one selector - key=value, rather than key1=value1,key2=value2.
Based on the comment 3, will clone this bug to open a new bug to tracking router replicas bases on selector issue.
This will be fixed by work associated with keynote refactor.
Proposed fix: https://github.com/openshift/openshift-ansible/pull/2023
#cat hosts <--snip--> openshift_hosted_registry_selector="role=node,registry=enabled" openshift_hosted_router_selector="role=node,router=enabled" <--snip--> [nodes] openshift-111.xx.redhat.com ansible_user=root openshift_public_hostname=openshift-111.xx.redhat.com openshift_hostname=openshift-111.xx.redhat.com openshift_node_labels="{'role': 'node'}" openshift-114.xx.redhat.com ansible_user=root openshift_public_hostname=openshift-114.lab.sjc.redhat.com openshift_hostname=openshift-114.xx.redhat.com openshift_node_labels="{'role': 'node','registry': 'enabled'}" openshift-122.xx.redhat.com ansible_user=root openshift_public_hostname=openshift-122.xx.redhat.com openshift_hostname=openshift-122.xx.redhat.com openshift_node_labels="{'role': 'node','router': 'enabled'}" <--snip--> Check RC of router and docker-registry after installation: [root@openshift-111 ~]# oc get dc NAME REVISION REPLICAS TRIGGERED BY docker-registry 2 1 config router 1 1 config Verified with openshift-ansible-3.2.13-1.git.0.0afa976.el7.noarch
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-2016:1467