File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
aws-parallelcluster-environment
aws-parallelcluster-shared/libraries Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 5555default [ 'cluster' ] [ 'shared_dir_compute' ] = node [ 'cluster' ] [ 'shared_dir' ]
5656default [ 'cluster' ] [ 'shared_dir_head' ] = node [ 'cluster' ] [ 'shared_dir' ]
5757default [ 'cluster' ] [ 'shared_dir_login' ] = node [ 'cluster' ] [ 'shared_dir_login_nodes' ]
58+ default [ 'cluster' ] [ 'shared_login_nodes_keys_sync_file' ] = "#{ node [ 'cluster' ] [ 'shared_dir_login_nodes' ] } /.login_nodes_keys_sync_file"
5859# Since this is a shared directory, it needs to be defined here first instead of in the dependent cookbook for slurm
5960default [ 'cluster' ] [ 'slurm' ] [ 'install_dir' ] = '/opt/slurm'
6061
Original file line number Diff line number Diff line change 2121script_dir = "#{ keys_dir } /scripts"
2222script_path = "#{ script_dir } /keys-manager.sh"
2323
24- sync_file_path = "#{ keys_dir } /.login_nodes_keys_sync_file "
24+ sync_file_path = "#{ node [ 'cluster' ] [ 'shared_login_nodes_keys_sync_file' ] } "
2525
2626case node [ 'cluster' ] [ 'node_type' ]
2727when 'ComputeFleet'
Original file line number Diff line number Diff line change 9393 end
9494 cached ( :node ) { chef_run . node }
9595
96- it "waits for cluster config version file " do
97- is_expected . to run_bash ( "Wait for synchronization file at #{ SYNC_FILE } to be written for version #{ CLUSTER_CONFIG_VERSION } " ) . with (
98- code : "[[ \" $(cat #{ SYNC_FILE } ) \" == \" #{ CLUSTER_CONFIG_VERSION } \" ]] || exit 1" ,
96+ it "Wait for sync file to exist " do
97+ is_expected . to run_bash ( "Wait for synchronization file at #{ SYNC_FILE } to exist " ) . with (
98+ code : "[[ -e #{ SYNC_FILE } ]] || exit 1" ,
9999 retries : 30 ,
100100 retry_delay : 10 ,
101101 timeout : 5
Original file line number Diff line number Diff line change @@ -95,13 +95,12 @@ def write_sync_file(path)
9595end
9696
9797def wait_sync_file ( path )
98- # Wait for a synchronization file to be written for the current cluster config version .
98+ # Wait for a synchronization file to exist .
9999 # Synchronization files are used as a synchronization point between cluster nodes
100100 # to signal that a group of actions have been completed.
101- cluster_config_version = node [ "cluster" ] [ "cluster_config_version" ]
102101 # Wait for the config version file to contain the current cluster config version.
103- bash "Wait for synchronization file at #{ path } to be written for version #{ cluster_config_version } " do
104- code "[[ \" $(cat #{ path } ) \" == \" #{ cluster_config_version } \" ]] || exit 1"
102+ bash "Wait for synchronization file at #{ path } to exist " do
103+ code "[[ -e #{ path } ]] || exit 1"
105104 retries 30
106105 retry_delay 10
107106 timeout 5
You can’t perform that action at this time.
0 commit comments