Bug 1051251 - node.conf config value names have changed
Summary: node.conf config value names have changed
Keywords:
Status: CLOSED DUPLICATE of bug 1064631
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1051015 1136983
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-09 22:35 UTC by Luke Meyer
Modified: 2018-12-04 16:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1051015
Environment:
Last Closed: 2014-05-01 13:30:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


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