Bug 1056899

Summary: Cannot scale up via haproxy_ctld in the secondary haproxy since broker auth does not exist on that gear
Product: OpenShift Container Platform Reporter: Gaoyun Pei <gpei>
Component: NodeAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.2.0CC: adellape, bleanhar, bmeng, dmcphers, jhou, jolamb, libra-onpremise-devel, mpatel, pruan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-openshift-origin-controller-1.17.12.1-1 Doc Type: Bug Fix
Doc Text:
Authorization tokens were not properly distributed between HAProxy gears in the same application. As a result, attempting to scale up an application from a secondary HAProxy gear failed. This bug fix adds logic to replicate broker authorization tokens between HAProxy gears in the same application. The following command must be run after applying this fix: # oo-admin-upgrade upgrade-node --version=2.0.3 See the Solution section in the errata advisory for full details.
Story Points: ---
Clone Of: 1035186 Environment:
Last Closed: 2014-02-25 15:43:32 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:
Bug Depends On: 1035186    
Bug Blocks:    

Description Gaoyun Pei 2014-01-23 06:42:24 UTC
This bug could be reproduced with 
rubygem-openshift-origin-controller-1.17.11-1.el6op.noarch in puddle 2.0.z/2014-01-22.1

+++ This bug was initially created as a clone of Bug #1035186 +++

Description of problem:
For a HA enabled scalable app, when trying to scale-up in the secondary haproxy-gear, will get failed due to the broker auth does not exist on the gear.

[459590177713071029485568-bmengdev.dev.rhcloud.com 459590177713071029485568]\> haproxy_ctld -u
/var/lib/openshift/459590177713071029485568/haproxy//usr/bin/remove-gear:36:in `read': No such file or directory - /var/lib/openshift/459590177713071029485568/.auth/token (Errno::ENOENT)
	from /var/lib/openshift/459590177713071029485568/haproxy//usr/bin/remove-gear:36:in `execute'
	from /var/lib/openshift/459590177713071029485568/haproxy//usr/bin/remove-gear:208:in `<main>'


Version-Release number of selected component (if applicable):
devenv_4077

How reproducible:
always

Steps to Reproduce:
1.Create scalable app
2.Make the app HA via rest api
3.SSH login to the secondary haproxy gear
4.Try to scale-up with haproxy_ctld cmd

Actual results:
It will fail due to the broker auth does not exist on the gear.

Expected results:
Should be able to scale up manually on all the haproxy gears.

Additional info:

--- Additional comment from Dan McPherson on 2014-01-15 09:36:24 EST ---

https://github.com/openshift/origin-server/pull/4477

--- Additional comment from openshift-github-bot on 2014-01-15 19:20:22 EST ---

Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/e5f5265c5ddbe6f3f98a1df1d1f01961563858b1
Bug 1035186

--- Additional comment from Hou Jianwei on 2014-01-16 04:38:03 EST ---

Verified on devenv_4229

1. Create a scalable app and make it HA enabled
2. SSH to the 2nd gear, scale it up with 'haproxy_ctld -u'

Result:
The app scaled up successfully.

Comment 7 Peter Ruan 2014-01-31 23:15:21 UTC
verified with puddle-2014-01-30
52ec29d03eefa9b7e700002b-demo.ose203.example.com 52ec29d03eefa9b7e700002b]\> haproxy_ctld -u

Comment 9 errata-xmlrpc 2014-02-25 15:43:32 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.

http://rhn.redhat.com/errata/RHBA-2014-0209.html