Skip to content

Commit acc15d4

Browse files
committed
60 secoconds
1 parent 467555b commit acc15d4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cookbooks/aws-parallelcluster-computefleet/files/check_update/check-update.timer

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Description=Check file modification time every minute
33

44
[Timer]
5-
OnActiveSec=20sec
6-
OnUnitActiveSec=20sec
5+
OnActiveSec=60sec
6+
OnUnitActiveSec=60sec
77
Unit=check-update.service
88

99
[Install]

cookbooks/aws-parallelcluster-computefleet/templates/check_update/check-update.service.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Description=Check for recent file modifications
33

44
[Service]
55
Type=oneshot
6-
ExecStart=/bin/bash -c "echo \"Checking file at $(date): <%= node['cluster']['shared_update_path'] %>\"; if [ $(( $(date +%%s) - $(stat -c %%Y <%= node['cluster']['shared_update_path'] %>) )) -lt 20 ]; then echo 'File modified recently, running action'; <%= node['cluster']['scripts_dir'] %>/cfn-hup-update-action.sh; else echo 'File not modified recently'; fi"
6+
ExecStart=/bin/bash -c "echo \"Checking file at $(date): <%= node['cluster']['shared_update_path'] %>\"; if [ $(( $(date +%%s) - $(stat -c %%Y <%= node['cluster']['shared_update_path'] %>) )) -lt 60 ]; then echo 'File modified recently, running action'; <%= node['cluster']['scripts_dir'] %>/cfn-hup-update-action.sh; else echo 'File not modified recently'; fi"
77

88
[Install]
99
WantedBy=multi-user.target

cookbooks/aws-parallelcluster-environment/templates/cfn_hup_configuration/cfn-hook-update.conf.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ triggers=post.update
33
<% case node['cluster']['node_type'] -%>
44
<% when 'HeadNode', 'LoginNode' -%>
55
path=Resources.<%= @launch_template_resource_id %>.Metadata.AWS::CloudFormation::Init
6-
action=PATH=/usr/local/bin:/bin:/usr/bin:/opt/aws/bin; . /etc/parallelcluster/pcluster_cookbook_environment.sh; $CFN_BOOTSTRAP_VIRTUALENV_PATH/cfn-init -v --stack <%= @stack_id %> --resource <%= @launch_template_resource_id %> --configsets update --region <%= @region %> --url <%= @cloudformation_url %> --role <%= @cfn_init_role %>; echo "Update triggered at $(date) by <% node['cluster']['node_type'] %>" >> <%= @update_dir %>
6+
action=PATH=/usr/local/bin:/bin:/usr/bin:/opt/aws/bin; . /etc/parallelcluster/pcluster_cookbook_environment.sh; $CFN_BOOTSTRAP_VIRTUALENV_PATH/cfn-init -v --stack <%= @stack_id %> --resource <%= @launch_template_resource_id %> --configsets update --region <%= @region %> --url <%= @cloudformation_url %> --role <%= @cfn_init_role %>; echo "Update triggered at $(date) by <%= node['cluster']['node_type'] %>" >> <%= @update_dir %>
77
<% end %>
88
runas=root

0 commit comments

Comments
 (0)