Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add schedd_blocked_users and block message. #111

Merged
merged 1 commit into from
May 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions manifests/config/scheduler.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
$remove_held_jobs_after = $htcondor::remove_held_jobs_after
# /etc/condor/config.d/21_schedd.config
$daemon_list = $htcondor::config::daemon_list
$schedd_blocked_users = $htcondor::schedd_blocked_users
$schedd_blocked_user_msg = $htcondor::schedd_blocked_user_msg
# template files
$template_ganglia = $htcondor::template_ganglia
$template_queues = $htcondor::template_queues
Expand Down
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@
$use_pid_namespaces = $htcondor::params::use_pid_namespaces,
$uses_connection_broker = $htcondor::params::uses_connection_broker,
$private_network_name = $htcondor::params::private_network_name,
$schedd_blocked_users = $htcondor::params::schedd_blocked_users,
$schedd_blocked_user_msg = $htcondor::params::schedd_blocked_user_msg,
$cert_map_file = $htcondor::params::cert_map_file,
$cert_map_file_source = $htcondor::params::cert_map_file_source,
$krb_map_file = $htcondor::params::krb_map_file,
Expand Down
4 changes: 4 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@
$uses_connection_broker = hiera('uses_connection_broker', false)
$private_network_name = hiera('private_network_name', $::domain)

# Schedd configuration
$schedd_blocked_users = hiera_array('schedd_blocked_users', [])
$schedd_blocked_user_msg = hiera('schedd_blocked_user_msg', 'Submission is blocked for you, please contact cluster admins.')

# SharedPort service configuration
$use_shared_port = hiera('use_shared_port', false)
$shared_port = hiera('shared_port', 9618)
Expand Down
6 changes: 6 additions & 0 deletions templates/21_schedd.config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ MAX_NUM_MASTER_LOG = 10
## This macro determines what daemons the condor_master will start and keep its watchful eyes on.
## The list is a comma or space separated list of subsystem names
DAEMON_LIST = <%= @daemon_list %>

<% if ! @schedd_blocked_users.empty? then -%>
SUBMIT_REQUIREMENT_NAMES = $(SUBMIT_REQUIREMENT_NAMES) NotBlockedUser
SUBMIT_REQUIREMENT_NotBlockedUser = <%= @schedd_blocked_users.map { |s| "Owner != \"#{s}\"" }.join(' && ') %>
SUBMIT_REQUIREMENT_NotBlockedUser_REASON = "<%= @schedd_blocked_user_msg %>"
<% end -%>