[arvados] updated: 2.5.0-53-g508a25a9f
git repository hosting
git at public.arvados.org
Fri Jan 27 21:34:51 UTC 2023
Summary of changes:
services/api/app/models/node.rb | 5 +++--
services/api/config/arvados_config.rb | 1 -
services/api/test/unit/node_test.rb | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
via 508a25a9f3677c913b081e79350bc76d25c76698 (commit)
from be5771dd0fe41d5108d8fd72e62223b37948cf2d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 508a25a9f3677c913b081e79350bc76d25c76698
Author: Tom Clegg <tom at curii.com>
Date: Fri Jan 27 16:33:30 2023 -0500
18075: Kill off MaxComputeVMs properly.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/services/api/app/models/node.rb b/services/api/app/models/node.rb
index c8b463696..c8a606e2b 100644
--- a/services/api/app/models/node.rb
+++ b/services/api/app/models/node.rb
@@ -24,6 +24,7 @@ class Node < ArvadosModel
attr_accessor :job_readable
UNUSED_NODE_IP = '127.40.4.0'
+ MAX_VMS = 3
api_accessible :user, :extend => :common do |t|
t.add :hostname
@@ -159,7 +160,7 @@ class Node < ArvadosModel
# query label:
'Node.available_slot_number',
# [col_id, val] for $1 vars:
- [[nil, Rails.configuration.Containers.MaxComputeVMs]],
+ [[nil, MAX_VMS]],
).rows.first.andand.first
end
@@ -267,7 +268,7 @@ class Node < ArvadosModel
!Rails.configuration.Containers.SLURM.Managed.DNSServerConfTemplate.to_s.empty? and
!Rails.configuration.Containers.SLURM.Managed.AssignNodeHostname.empty?)
- (0..Rails.configuration.Containers.MaxComputeVMs-1).each do |slot_number|
+ (0..MAX_VMS-1).each do |slot_number|
hostname = hostname_for_slot(slot_number)
hostfile = File.join Rails.configuration.Containers.SLURM.Managed.DNSServerConfDir, "#{hostname}.conf"
if !File.exist? hostfile
diff --git a/services/api/config/arvados_config.rb b/services/api/config/arvados_config.rb
index c47eeb551..d928d592c 100644
--- a/services/api/config/arvados_config.rb
+++ b/services/api/config/arvados_config.rb
@@ -132,7 +132,6 @@ arvcfg.declare_config "Containers.DefaultKeepCacheRAM", Integer, :container_defa
arvcfg.declare_config "Containers.MaxDispatchAttempts", Integer, :max_container_dispatch_attempts
arvcfg.declare_config "Containers.MaxRetryAttempts", Integer, :container_count_max
arvcfg.declare_config "Containers.AlwaysUsePreemptibleInstances", Boolean, :preemptible_instances
-arvcfg.declare_config "Containers.MaxComputeVMs", Integer, :max_compute_nodes
arvcfg.declare_config "Containers.Logging.LogBytesPerEvent", Integer, :crunch_log_bytes_per_event
arvcfg.declare_config "Containers.Logging.LogSecondsBetweenEvents", ActiveSupport::Duration, :crunch_log_seconds_between_events
arvcfg.declare_config "Containers.Logging.LogThrottlePeriod", ActiveSupport::Duration, :crunch_log_throttle_period
diff --git a/services/api/test/unit/node_test.rb b/services/api/test/unit/node_test.rb
index 9fa3febe1..c3d070886 100644
--- a/services/api/test/unit/node_test.rb
+++ b/services/api/test/unit/node_test.rb
@@ -196,13 +196,12 @@ class NodeTest < ActiveSupport::TestCase
end
test 'run out of slots' do
- Rails.configuration.Containers.MaxComputeVMs = 3
act_as_system_user do
Node.destroy_all
(1..4).each do |i|
n = Node.create!
args = { ip: "10.0.0.#{i}", ping_secret: n.info['ping_secret'] }
- if i <= Rails.configuration.Containers.MaxComputeVMs
+ if i <= 3 # MAX_VMS
n.ping(args)
else
assert_raises do
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list