File tree Expand file tree Collapse file tree 4 files changed +14
-15
lines changed
cookbooks/aws-parallelcluster-slurm Expand file tree Collapse file tree 4 files changed +14
-15
lines changed Original file line number Diff line number Diff line change 1515# the instance id and the cluster config version deployed on that instance.
1616# This is done to understand what is the deployed cluster config in each node, for example, during a CFN Stack update.
1717
18-
1918DDB_CONFIG_STATUS = {
2019 DEPLOYED : "DEPLOYED" ,
21- SKIPPED_LIVE_UPDATE : "SKIPPED_LIVE_UPDATE"
22- }
20+ SKIPPED_LIVE_UPDATE : "SKIPPED_LIVE_UPDATE" ,
21+ } . freeze
2322
2423def save_instance_config_version_to_dynamodb ( status )
2524 unless on_docker? || kitchen_test? && !node [ 'interact_with_ddb' ]
Original file line number Diff line number Diff line change @@ -114,16 +114,16 @@ def is_live_update_required?
114114 Chef ::Log . info ( "Changeset found: evaluating changes #{ changes } " )
115115
116116 outcome = case node [ "cluster" ] [ "node_type" ]
117- when 'HeadNode'
118- # The head node supports live updates regardless the content of the changeset.
119- true
120- when 'ComputeFleet' , 'LoginNode'
121- # The compute and login nodes support live updates only in specific cases:
122- # * changeset contains only shared storage changes that support live updates
123- storage_change_supports_live_update? ( changes )
124- else
125- raise "node_type must be HeadNode, LoginNode or ComputeFleet"
126- end
117+ when 'HeadNode'
118+ # The head node supports live updates regardless the content of the changeset.
119+ true
120+ when 'ComputeFleet' , 'LoginNode'
121+ # The compute and login nodes support live updates only in specific cases:
122+ # * changeset contains only shared storage changes that support live updates
123+ storage_change_supports_live_update? ( changes )
124+ else
125+ raise "node_type must be HeadNode, LoginNode or ComputeFleet"
126+ end
127127
128128 Chef ::Log . info ( "Live update required: #{ outcome } " )
129129end
Original file line number Diff line number Diff line change 1515# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
1616# limitations under the License.
1717
18- unless lambda { is_live_update_required? } . call
18+ unless -> { is_live_update_required? } . call
1919 save_instance_config_version_to_dynamodb ( DDB_CONFIG_STATUS [ :SKIPPED_LIVE_UPDATE ] )
2020 return
2121end
Original file line number Diff line number Diff line change 1515# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
1616# limitations under the License.
1717
18- unless lambda { is_live_update_required? } . call
18+ unless -> { is_live_update_required? } . call
1919 save_instance_config_version_to_dynamodb ( DDB_CONFIG_STATUS [ :SKIPPED_LIVE_UPDATE ] )
2020 return
2121end
You can’t perform that action at this time.
0 commit comments