Bug 1051251

Summary: node.conf config value names have changed
Product: OpenShift Container Platform Reporter: Luke Meyer <lmeyer>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED DUPLICATE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0.0CC: bleanhar, libra-onpremise-devel, tiwillia
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1051015 Environment:
Last Closed: 2014-05-01 13:30:04 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: 1051015, 1136983    
Bug Blocks:    

Description Luke Meyer 2014-01-09 22:35:25 UTC
+++ This bug was initially created as a clone of Bug #1051015 +++

The default /etc/openshift/node.conf is installed with the following values defined:
GEAR_MIN_UID=1000        # Lower bound of UID used to create gears
GEAR_MAX_UID=6999        # Upper bound of UID used to create gears
PROXY_MIN_PORT_NUM=35531 # Lower bound of port numbers used to proxy ports externally
PROXY_PORTS_PER_GEAR=5   # Number of proxy ports available per gear

Code looking for these values now looks for new names and ignores these.
https://github.com/openshift/origin-server/blob/master/node/lib/openshift-origin-node/model/frontend_proxy.rb#L50
        @port_begin = (config.get("PORT_BEGIN") || "35531").to_i
        @ports_per_user = (config.get("PORTS_PER_USER") || "5").to_i
        @uid_begin = (config.get("UID_BEGIN") || "500").to_i
(I couldn't find any analog to GEAR_MAX_UID but should be consistent ).

I think this happened around the v2 cartridge refactor, and actually there is some code looking at both forms (grep for GEAR_MIN_ID as well as UID_BEGIN). Most people never want to change the defaults, but they should be able to using what's in the config file.

Proposed steps to remedy:
1. Update all code using any of these names to look for both the new and old value names (frontend_proxy.rb, oo-accept-node, application_container_ext/setup.rb, libvirt_container.rb, probably others need updates).
2. Update node.conf with new values (optional, really)

Comment 4 Brenton Leanhardt 2014-05-01 13:30:04 UTC
When this bug was investigated it was discovered that the undocumented PORT_BEGIN, PORTS_PER_USER and UID_BEGIN settings were required for OpenShift Online and made there way into OpenShift Enterprise.  For backwards compatibility these defaults need to stay in place.  Thankfully the port numbers wrap around infinitely now so they shouldn't be a problem going forward.

As for the settings UID settings that are documented, there should no longer be a limit imposed by OpenShift.  Since the case associated with this bug has been close I'm closing this as a duplicate of Bug #1064631 since that's is where we are testing the fix.

*** This bug has been marked as a duplicate of bug 1064631 ***