Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add default value when no ip_local_port_range found in /proc

  • Loading branch information...
commit 0fa1f98b615a4bf1e3b3d1df43111a229eef09aa 1 parent 0781da5
@Kaixiang Kaixiang authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 warden/lib/warden/config.rb
View
7 warden/lib/warden/config.rb
@@ -108,7 +108,12 @@ def self.network_schema
end
def self.ip_local_port_range
- File.read("/proc/sys/net/ipv4/ip_local_port_range").split.map(&:to_i)
+ # if no ip_local_port_range found, make some guess"
+ if File.exist?("/proc/sys/net/ipv4/ip_local_port_range")
+ File.read("/proc/sys/net/ipv4/ip_local_port_range").split.map(&:to_i)
+ else
+ return 32768, 61000
+ end
end
def self.port_defaults

4 comments on commit 0fa1f98

@drnic

@Kaixiang @mkocher why this month-old patch isn't in cf-141? did it only recently get merged into warden master branch?

@drnic

I noticed its absence in cloudfoundry/cf-release#179

@syslxg
Collaborator

because it is in nested branch instead of warden-master. the nested branch was just merged into warden-master recently, and src/warden in cf-release was bumped to pickup the nested warden feature on Sep 13.

@drnic
Please sign in to comment.
Something went wrong with that request. Please try again.