File tree Expand file tree Collapse file tree 4 files changed +11
-12
lines changed
aws-parallelcluster-environment
aws-parallelcluster-shared/libraries Expand file tree Collapse file tree 4 files changed +11
-12
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 "waits for synchronization file to exist" do
97+ is_expected . to touch_file ( SYNC_FILE ) . with (
9998 retries : 30 ,
100- retry_delay : 10 ,
101- timeout : 5
99+ retry_delay : 10
102100 )
103101 end
104102
Original file line number Diff line number Diff line change @@ -95,15 +95,15 @@ 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" ]
102- # 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"
101+ Chef ::Log . info ( "Wait for synchronization file at #{ path } to exist" )
102+ file path do
103+ action :touch
105104 retries 30
106105 retry_delay 10
107- timeout 5
108106 end
107+
108+
109109end
You can’t perform that action at this time.
0 commit comments