Skip to content

Commit e128633

Browse files
committed
Configure systemd timer to check for perf deg
1 parent fedc257 commit e128633

File tree

4 files changed

+59
-0
lines changed

4 files changed

+59
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Unit]
2+
Description=Check for recent file modifications
3+
4+
[Service]
5+
Type=oneshot
6+
ExecStart=/bin/bash -c 'cat /opt/slurm/etc/pcluster/.slurm_plugin/clustermgtd_heartbeat'
7+
8+
[Install]
9+
WantedBy=multi-user.target
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Unit]
2+
Description=Check file modification time every minute
3+
4+
[Timer]
5+
OnBootSec=20sec
6+
OnUnitActiveSec=20sec
7+
Unit=check-update.service
8+
9+
[Install]
10+
WantedBy=timers.target

cookbooks/aws-parallelcluster-computefleet/recipes/config.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@
1212
# limitations under the License.
1313

1414
include_recipe 'aws-parallelcluster-computefleet::fleet_status'
15+
16+
if node['cluster']['node_type'] == 'ComputeFleet'
17+
include_recipe 'aws-parallelcluster-computefleet::config_check_update_systemd_service'
18+
end
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# frozen_string_literal: true
2+
3+
#
4+
# Cookbook:: aws-parallelcluster-slurm
5+
# Recipe:: config_compute
6+
#
7+
# Copyright:: 2013-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
8+
#
9+
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the
10+
# License. A copy of the License is located at
11+
#
12+
# http://aws.amazon.com/apache2.0/
13+
#
14+
# or in the "LICENSE.txt" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
15+
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
cookbook_file '/etc/systemd/system/check-update.service' do
19+
source 'check_update/check-update.service'
20+
owner 'root'
21+
group 'root'
22+
mode '0644'
23+
action :create
24+
end
25+
26+
cookbook_file '/etc/systemd/system/check-update.timer' do
27+
source 'check_update/check-update.timer'
28+
owner 'root'
29+
group 'root'
30+
mode '0644'
31+
action :create
32+
end
33+
34+
service 'check-update.timer' do
35+
action [:enable, :start]
36+
end

0 commit comments

Comments
 (0)