Bug 1004466 - Port range does not wrap indefinetly
Summary: Port range does not wrap indefinetly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 1.2.1
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-04 16:42 UTC by Timothy Williams
Modified: 2018-12-03 19:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
OpenShift Enterprise 1.2
Last Closed: 2013-12-16 09:11:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


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