Skip to content

Commit e070611

Browse files
demartinofratilne
authored andcommitted
Restart sshd.service to make sure the service is running
This is a workaround for Centos 8 where the sshd.service fails at first start since it does not properly wait for cloud-init.service to start. There is something wrong in Centos 8 systemd dependency chain. Signed-off-by: Francesco De Martino <[email protected]>
1 parent cc405a8 commit e070611

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

recipes/base_config.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@
1717

1818
include_recipe 'aws-parallelcluster::base_install'
1919

20+
# Restart sshd.service to make sure the service is running
21+
# This is a workaround for Centos 8 where the sshd.service fails at first start since it does not properly
22+
# wait for cloud-init.service to start. There is something wrong in Centos 8 systemd dependency chain.
23+
if node['platform'] == 'centos' && node['platform_version'].to_i == 8
24+
service "sshd" do
25+
supports restart: true
26+
action %i[enable restart]
27+
end
28+
end
29+
2030
include_recipe 'aws-parallelcluster::nfs_config'
2131

2232
# Setup ephemeral drives

0 commit comments

Comments
 (0)