Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Bug 1051015 - Look for UID_BEGIN, default to 1000
Browse files Browse the repository at this point in the history
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
  • Loading branch information
lsm5 committed Jan 20, 2014
1 parent 6b3e15d commit 90f2dfd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def generate_ssh_key()
def next_uid
uids = IO.readlines("/etc/passwd").map{ |line| line.split(":")[2].to_i }
gids = IO.readlines("/etc/group").map{ |line| line.split(":")[2].to_i }
min_uid = (@config.get("GEAR_MIN_UID") || "500").to_i
min_uid = (@config.get("UID_BEGIN") || @config.get("GEAR_MIN_UID") || "1000").to_i
max_uid = (@config.get("GEAR_MAX_UID") || "1500").to_i

(min_uid..max_uid).each do |i|
Expand Down
2 changes: 1 addition & 1 deletion node/lib/openshift-origin-node/model/frontend_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def initialize

@port_begin = (config.get("PORT_BEGIN") || config.get("PROXY_MIN_PORT_NUM") || "35531").to_i
@ports_per_user = (config.get("PORTS_PER_USER") || config.get("PROXY_PORTS_PER_GEAR") || "5").to_i
@uid_begin = (config.get("UID_BEGIN") || config.get("GEAR_MIN_UID") || "500").to_i
@uid_begin = (config.get("UID_BEGIN") || config.get("GEAR_MIN_UID") || "1000").to_i
end

# Returns a Range representing the valid proxy port values for the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def initialize(application_container)

@port_begin = (@config.get("PORT_BEGIN") || @config.get("PROXY_MIN_PORT_NUM") || "35531").to_i
@ports_per_user = (@config.get("PORTS_PER_USER") || @config.get("PROXY_PORTS_PER_GEAR" || "5").to_i
@uid_begin = (@config.get("UID_BEGIN") || @config.get("GEAR_MIN_UID") || "500").to_i
@uid_begin = (@config.get("UID_BEGIN") || @config.get("GEAR_MIN_UID") || "1000").to_i
@container_metadata = File.join(@container.base_dir, ".container", @container.uuid)
end

Expand Down

0 comments on commit 90f2dfd

Please sign in to comment.