Bug 1004466

Summary: Port range does not wrap indefinetly
Product: OpenShift Container Platform Reporter: Timothy Williams <tiwillia>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: urgent    
Version: 1.2.1CC: gpei, jkeck, libra-onpremise-devel, ofayans
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
OpenShift Enterprise 1.2
Last Closed: 2013-12-16 09:11:24 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:

Description Timothy Williams 2013-09-04 16:42:24 UTC
Description of problem:

Port ranges that can be assigned by uid do not wrap indefinetly. This means that if a minimum uid is set too high, ports will not be assigned correctly

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

How reproducible:
Always

Steps to Reproduce:
1. Set UID_BEGIN to 10000
2. Create scaled applications
3.

Actual results:
Ports are not assigned correctly

Expected results:
The correct ports correlating to the uid are assigned

Additional info:

This has already been fixed in the upstream code (https://github.com/openshift/origin-server/pull/3528). This bug has been opened to track porting the fix into OpenShift Enterprise.

Comment 4 Gaoyun Pei 2013-11-18 09:14:22 UTC
Verify this bug on puddle 2.0/2013-11-15.1:
rubygem-openshift-origin-node-1.17.4-2.el6op.noarch

Change the GEAR_MIN_UID=10000 in node.conf, restart mcollective service.

Create a scalable php app, check its uid and ports.
[app2-www.ose-1115.com.cn 5289d4b567ee3c939f000140]\> id
uid=10000(5289d4b567ee3c939f000140) gid=10000(5289d4b567ee3c939f000140) groups=10000(5289d4b567ee3c939f000140) context=unconfined_u:system_r:openshift_t:s0:c9,c838
[app2-www.ose-1115.com.cn 5289d4b567ee3c939f000140]\> rhc-list-ports 
haproxy -> 127.19.136.2:8080
haproxy -> 127.19.136.3:8080
httpd -> 127.19.136.1:8080

This gear could be accessed via the 8080 port.


Scale-up the app, log into the new gear, check its uid and ports.
[5289d78667ee3c2c00000303-www.ose-1115.com.cn 5289d78667ee3c2c00000303]\> id
uid=10001(5289d78667ee3c2c00000303) gid=10001(5289d78667ee3c2c00000303) groups=10001(5289d78667ee3c2c00000303) context=unconfined_u:system_r:openshift_t:s0:c9,c839
[5289d78667ee3c2c00000303-www.ose-1115.com.cn 5289d78667ee3c2c00000303]\> rhc-list-ports 
httpd -> 127.19.136.129:8080

This gear could also be accessed via the 8080 port