-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify the check_login_stopped.sh script to directly use TG name to q…
…uery (#2524) Reduce the check steps when checking if LoginNodes stopped. So that we can delete the checking NLB loop to reduce running time.
- Loading branch information
Showing
4 changed files
with
45 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
cookbooks/aws-parallelcluster-slurm/spec/unit/libraries/get_target_group_name_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require_relative '../../../libraries/helpers' | ||
|
||
describe 'get_target_group_name' do | ||
shared_examples 'a valid target group name generator' do |cluster_name, pool_name, expected_result| | ||
it 'generates a correctly formatted target group name' do | ||
target_group_name = get_target_group_name(cluster_name, pool_name) | ||
expect(target_group_name).to eq(expected_result) | ||
end | ||
end | ||
|
||
context 'when cluster and pool names are regular strings' do | ||
include_examples 'a valid target group name generator', 'test-cluster', 'test-pool', 'test-cl-test-po-18c74b16dfbc78ac' | ||
end | ||
|
||
context 'when cluster and pool names are longer strings' do | ||
include_examples 'a valid target group name generator', 'abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'abcdefg-zyxwvut-20f1fcdf919164c7' | ||
end | ||
|
||
context 'when cluster and pool names are single characters' do | ||
include_examples 'a valid target group name generator', 'a', 'b', 'a-b-fb8e20fc2e4c3f24' | ||
end | ||
end |
41 changes: 5 additions & 36 deletions
41
...-parallelcluster-slurm/templates/default/slurm/head_node/check_login_nodes_stopped.sh.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters