Bug 1004466 - Port range does not wrap indefinetly
Port range does not wrap indefinetly
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers (Show other bugs)
x86_64 Linux
urgent Severity high
: ---
: ---
Assigned To: Brenton Leanhardt
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-09-04 12:42 EDT by Timothy Williams
Modified: 2017-03-08 12 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
OpenShift Enterprise 1.2
Last Closed: 2013-12-16 04:11:24 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Timothy Williams 2013-09-04 12:42:24 EDT
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):

How reproducible:

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

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 04:14:22 EST
Verify this bug on puddle 2.0/2013-11-15.1:

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 ->
haproxy ->
httpd ->

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 ->

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.