File tree Expand file tree Collapse file tree 6 files changed +23
-0
lines changed
Expand file tree Collapse file tree 6 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,10 @@ def before_save
138138 self . memory ||= Config . config [ :default_app_memory ]
139139 self . disk_quota ||= Config . config [ :default_app_disk_in_mb ]
140140
141+ if Config . config [ :container_file_descriptor_limit ]
142+ self . file_descriptors ||= Config . config [ :container_file_descriptor_limit ]
143+ end
144+
141145 set_new_version if version_needs_to_be_updated?
142146
143147 AppStopEvent . create_from_app ( self ) if generate_stop_event?
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ default_app_memory: <%= p("cc.default_app_memory") %>
7474default_app_disk_in_mb: <%= p("cc.default_app_disk_in_mb") %>
7575maximum_app_disk_in_mb: <%= p("cc.maximum_app_disk_in_mb") %>
7676
77+ container_file_descriptor_limit: <%= p("cc.container_file_descriptor_limit") %>
78+
7779request_timeout_in_seconds: <%= p("request_timeout_in_seconds") %>
7880
7981cc_partition: <%= p("cc.cc_partition") %>
Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ default_app_memory: <%= p("cc.default_app_memory") %>
7878default_app_disk_in_mb: <%= p("cc.default_app_disk_in_mb") %>
7979maximum_app_disk_in_mb: <%= p("cc.maximum_app_disk_in_mb") %>
8080
81+ container_file_descriptor_limit: <%= p("cc.container_file_descriptor_limit") %>
82+
8183request_timeout_in_seconds: <%= p("request_timeout_in_seconds") %>
8284
8385cc_partition: <%= p("cc.cc_partition") %>
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ default_app_memory: <%= p("cc.default_app_memory") %>
7474default_app_disk_in_mb: <%= p("cc.default_app_disk_in_mb") %>
7575maximum_app_disk_in_mb: <%= p("cc.maximum_app_disk_in_mb") %>
7676
77+ container_file_descriptor_limit: <%= p("cc.container_file_descriptor_limit") %>
78+
7779request_timeout_in_seconds: <%= p("request_timeout_in_seconds") %>
7880
7981cc_partition: <%= p("cc.cc_partition") %>
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ class Config < VCAP::Config
4444 optional ( :maximum_app_disk_in_mb ) => Fixnum ,
4545 :maximum_health_check_timeout => Fixnum ,
4646
47+ optional ( :container_file_descriptor_limit ) => Fixnum ,
48+
4749 optional ( :allow_debug ) => bool ,
4850
4951 optional ( :login ) => {
Original file line number Diff line number Diff line change @@ -1643,6 +1643,17 @@ def self.it_does_not_mark_for_re_staging
16431643 expect ( app . disk_quota ) . to eq ( 512 )
16441644 end
16451645 end
1646+
1647+ describe 'container_file_descriptor_limit' do
1648+ before do
1649+ TestConfig . override ( { container_file_descriptor_limit : 200 } )
1650+ end
1651+
1652+ it 'uses the container_file_descriptor_limit config variable' do
1653+ app = App . create_from_hash ( name : 'awesome app' , space_guid : space . guid )
1654+ expect ( app . file_descriptors ) . to eq ( 200 )
1655+ end
1656+ end
16461657 end
16471658
16481659 describe 'saving' do
You can’t perform that action at this time.
0 commit comments