File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
cookbooks/aws-parallelcluster-slurm/libraries Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -101,20 +101,29 @@ def is_live_update_required?
101101
102102 change_set_path = node [ 'cluster' ] [ 'change_set_path' ]
103103
104- return false unless File . exist? ( change_set_path )
104+ Chef ::Log . info ( "Evaluating if a live update is required according to the changeset at #{ change_set_path } " )
105+
106+ unless File . exist? ( change_set_path )
107+ Chef ::Log . info ( "Changeset not found: live update is not required" )
108+ return false
109+ end
105110
106111 change_set = JSON . load_file ( "#{ node [ 'cluster' ] [ 'change_set_path' ] } " )
107112 changes = change_set [ "changeSet" ]
108113
109- case node [ "cluster" ] [ "node_type" ]
114+ Chef ::Log . info ( "Changeset found: evaluating changes #{ changes } " )
115+
116+ outcome = case node [ "cluster" ] [ "node_type" ]
110117 when 'HeadNode'
111118 # The head node supports live updates regardless the content of the changeset.
112- return true
119+ true
113120 when 'ComputeFleet' , 'LoginNode'
114121 # The compute and login nodes support live updates only in specific cases:
115122 # * changeset contains only shared storage changes that support live updates
116- return storage_change_supports_live_update? ( changes )
123+ storage_change_supports_live_update? ( changes )
117124 else
118125 raise "node_type must be HeadNode, LoginNode or ComputeFleet"
119126 end
127+
128+ Chef ::Log . info ( "Live update required: #{ outcome } " )
120129end
You can’t perform that action at this time.
0 commit comments