Bug 1328464 - registry replicas based on full selector
Summary: registry replicas based on full selector
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Andrew Butcher
QA Contact: Gan Huang
URL:
Whiteboard:
Depends On:
Blocks: 1328902
TreeView+ depends on / blocked
 
Reported: 2016-04-19 12:57 UTC by Aleksandar Kostadinov
Modified: 2016-07-20 19:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The installer previously only took into consideration the first selector when computing the registry replica count. Consequence: The registry may have been created with an incorrect replica count. Fix: The entire selector is now used when determining the replica count for registry installation. Result: The registry is now configured with the correct replica count based on the number of nodes that match the full selector.
Clone Of:
: 1328902 (view as bug list)
Environment:
Last Closed: 2016-07-20 19:40:57 UTC
Target Upstream Version:


Attachments (Terms of Use)
ansible inventory (6.35 KB, text/plain)
2016-04-19 12:59 UTC, Aleksandar Kostadinov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1467 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise atomic-openshift-utils bug fix update 2016-07-20 23:40:43 UTC

Description Aleksandar Kostadinov 2016-04-19 12:57:56 UTC
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

Comment 1 Aleksandar Kostadinov 2016-04-19 12:59:50 UTC
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.

Comment 3 Johnny Liu 2016-04-20 14:17:31 UTC
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.

Comment 4 Johnny Liu 2016-04-20 14:19:14 UTC
Based on the comment 3, will clone this bug to open a new bug to tracking router replicas bases on selector issue.

Comment 5 Scott Dodson 2016-06-21 15:06:19 UTC
This will be fixed by work associated with keynote refactor.

Comment 7 Andrew Butcher 2016-07-08 14:16:43 UTC
Proposed fix: https://github.com/openshift/openshift-ansible/pull/2023

Comment 9 Gan Huang 2016-07-19 07:15:02 UTC
#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

Comment 11 errata-xmlrpc 2016-07-20 19:40:57 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-2016:1467


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