Difference between revisions of "Access control scripts (admission rules)"
From Supercomputación y Cálculo Científico UIS
(Created page with "Back to OAR These scripts must be entered in the sql table called "admission_rules": 1. Maximum walltime: passive 336 hours, interactive 12 hours. {{Note|<wiki>Este sir...") |
(Improved the format) |
||
Line 1: | Line 1: | ||
Back to [[OAR]] | Back to [[OAR]] | ||
− | These scripts must be entered in the sql table called "admission_rules": | + | '''These scripts must be entered in the sql table called "admission_rules": |
1. Maximum walltime: passive 336 hours, interactive 12 hours. | 1. Maximum walltime: passive 336 hours, interactive 12 hours. | ||
− | {{Note|< | + | {{Note|<nowiki>Este sirve en oar 2.4</nowiki>}} |
− | |||
update admission_rules set rule= | update admission_rules set rule= | ||
'my $max_interactive_walltime = iolib::sql_to_duration("12:00:00")\; | 'my $max_interactive_walltime = iolib::sql_to_duration("12:00:00")\; | ||
Line 22: | Line 21: | ||
} | } | ||
}' where id=11; | }' where id=11; | ||
− | |||
{{Note|<nowiki>Está toda la instrucción sql, para editar la regla 11, que la que tenía el límite para las interactivas. La regla original se presenta a continuación:</nowiki>}} | {{Note|<nowiki>Está toda la instrucción sql, para editar la regla 11, que la que tenía el límite para las interactivas. La regla original se presenta a continuación:</nowiki>}} | ||
− | |||
# Set the maximum walltime | # Set the maximum walltime | ||
my $max_walltime = iolib::sql_to_duration("12:00:00"); | my $max_walltime = iolib::sql_to_duration("12:00:00"); | ||
Line 35: | Line 32: | ||
} | } | ||
} | } | ||
+ | 2. Limitar a que debe haber un nodo en interactivo a lo menos | ||
− | + | To be continued. |
Revision as of 22:03, 11 October 2014
Back to OAR
These scripts must be entered in the sql table called "admission_rules":
1. Maximum walltime: passive 336 hours, interactive 12 hours.
NOTE: Este sirve en oar 2.4
update admission_rules set rule= 'my $max_interactive_walltime = iolib::sql_to_duration("12:00:00")\; # 14 days = 336 hours my $max_batch_walltime = iolib::sql_to_duration("336:00:00")\; foreach my $mold (@{$ref_resource_list}){ if (defined($mold->[1])){ if (($jobType eq "INTERACTIVE") and ($reservationField eq "None") and ($max_interactive_walltime < $mold->[1])){ print("[ADMISSION RULE] Walltime too big for an INTERACTIVE job so it is set to $max_interactive_walltime.\n")\; $mold->[1] = $max_interactive_walltime\; }elsif ($max_batch_walltime < $mold->[1]){ print("[ADMISSION RULE] Walltime too big for a BATCH job so it is set to $max_batch_walltime.\n")\; $mold->[1] = $max_batch_walltime\; } } }' where id=11;
NOTE: Está toda la instrucción sql, para editar la regla 11, que la que tenía el límite para las interactivas. La regla original se presenta a continuación:
# Set the maximum walltime my $max_walltime = iolib::sql_to_duration("12:00:00"); if (($jobType eq "INTERACTIVE") and ($reservationField eq "None")){ foreach my $mold (@{$ref_resource_list}){ if ((defined($mold->[1])) and ($max_walltime < $mold->[1])){ print("[ADMISSION RULE] Walltime to big for an INTERACTIVE job so it is set to $max_walltime.\n"); $mold->[1] = $max_walltime; } } }
2. Limitar a que debe haber un nodo en interactivo a lo menos
To be continued.