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)
https://github.com/openshift/origin-server/pull/4488 should fix this
Checked on devenv_4242, the file application_container_ext/setup.rb only look for the new name in the code. # grep "config.get" /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.19.11/lib/openshift-origin-node/model/application_container_ext/setup.rb "#{@application_name}-#{@namespace}.#{@config.get("CLOUD_DOMAIN")}", "#{@container_name}-#{@namespace}.#{@config.get("CLOUD_DOMAIN")}", min_uid = (@config.get("GEAR_MIN_UID") || "500").to_i max_uid = (@config.get("GEAR_MAX_UID") || "1500").to_i And for the other fixed @uid_begin value, it is better to set the number to default value 1000 instead of 500 if no config defined. @uid_begin = (config.get("UID_BEGIN") || config.get("GEAR_MIN_UID") || "500").to_i
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/90f2dfd0bd4792696cdfd6c9b60f506ac2ee3f42 Bug 1051015 - Look for UID_BEGIN, default to 1000 Signed-off-by: Lokesh Mandvekar <lsm5>
Checked on devenv_4257, all the config files are fixed. Move bug to verified.
Re-opening this bug. Reading the key name at this point (when our own and other installations are mis-configured such that the code default is what's actually being used) is likely to cause all sorts of issues[1] unless the operator also verifies their node.conf contains the new key using whatever their previous effective value is. We need to pull this patch until we can agree on the safest way to go about it, and also accompany the change with loudly communicated details on how to verify node.conf is correctly configured following the rollout. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1056961
I think this is "solved" by https://github.com/openshift/origin-server/pull/5780 which is intended to only change the default node.conf so users have some hope of understanding what they should do here. No code changes necessary. Here is my summary: Assuming districts, GEAR_MIN_UID and GEAR_MAX_UID no longer play any role except in an obscure calculation in application_container_ext/setup.rb where, as far as I can determine, the important thing is that they not change (no need to match the actual UIDs being used). As such, I've left them in the node.conf with their existing values (not the code defaults) and designated them as vestigial/do not change. PROXY_MIN_PORT_NUM and PROXY_PORTS_PER_GEAR no longer have any role at all so they've been removed from the node.conf. PORT_BEGIN and PORTS_PER_USER (which take over the functions these formerly held) have been added to node.conf with their code defaults and a fair amount of comments that I hope will help users.
I realized that oo-accept-node will now complain about the missing PROXY_ settings, so https://github.com/openshift/origin-server/pull/5781 addresses that.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/a80d21486a579015e5daea83ad32f8da6c3133cb oo-accept-node: remove check for unused settings https://bugzilla.redhat.com/show_bug.cgi?id=1051015 Bug 1051015 - node.conf config value names have changed
The changes in https://github.com/openshift/origin-server/pull/5780 was not pushed to latest devenv_5139, needs to update the li repo for Online?
An online devenv overwrites the default node.conf and I'm not sure I really want to interfere with that (or that it would pertain to this). This is an Origin bug; I'm not sure how you would normally test that other than running an Origin install.