Skip to content

Commit 61b8059

Browse files
committed
Fix supervisord service not enabled on Ubuntu and drop SysVinit
Change supervisord service script from SysVinit to Systemd for all OS. Add kitchen test to verify service is enabled. Also add check for other required services Drop support for SysVinit Only SystemD OS are supported Signed-off-by: Luca Carrogu <[email protected]>
1 parent d81f5e0 commit 61b8059

17 files changed

+78
-709
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ This file is used to list changes made in each version of the AWS ParallelCluste
66
3.0.1
77
------
88

9+
**CHANGES**
10+
- Change supervisord service script from SysVinit to Systemd.
11+
- Drop support for SysVinit. Only Systemd is supported.
12+
913
**BUG FIXES**
14+
- Fix supervisord service not enabled on Ubuntu.
1015
- Update ca-certificates package during AMI build time and prevent Chef from using outdated/distrusted CA certificates.
1116

1217
3.0.0

files/default/slurm-init

Lines changed: 0 additions & 309 deletions
This file was deleted.

libraries/helpers.rb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -323,17 +323,7 @@ def find_rhel_minor_version
323323
# Return chrony service reload command
324324
# Chrony doesn't support reload but only force-reload command
325325
def chrony_reload_command
326-
case node['init_package']
327-
when 'init'
328-
chrony_reload_command = "service #{node['cluster']['chrony']['service']} force-reload"
329-
when 'systemd'
330-
chrony_reload_command = "systemctl force-reload #{node['cluster']['chrony']['service']}"
331-
else
332-
raise "Init package #{node['init_package']} not supported."
333-
334-
end
335-
336-
chrony_reload_command
326+
"systemctl force-reload #{node['cluster']['chrony']['service']}"
337327
end
338328

339329
# Add an external package repository to the OS's package manager

recipes/base_install.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@
127127
owner 'root'
128128
group 'root'
129129
mode '0644'
130-
only_if { node['init_package'] == 'systemd' }
131130
end
132131

133132
include_recipe 'aws-parallelcluster::ec2_udev_rules'
@@ -174,13 +173,13 @@
174173
mode "0644"
175174
end
176175

177-
# Put init script in place
178-
template "supervisord-init" do
179-
source 'supervisord-init.erb'
180-
path "/etc/init.d/supervisord"
176+
# Put supervisord service in place
177+
template "supervisord-service" do
178+
source 'supervisord-service.erb'
179+
path "/etc/systemd/system/supervisord.service"
181180
owner "root"
182181
group "root"
183-
mode "0755"
182+
mode "0644"
184183
end
185184

186185
# AMI cleanup script

recipes/compute_slurm_config.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,4 @@
4848
group 'root'
4949
mode '0644'
5050
action :create
51-
only_if { node['init_package'] == 'systemd' }
5251
end

recipes/compute_slurm_finalize.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,14 @@
2727
mode '0644'
2828
end
2929

30-
slurm_service_binary = if node['init_package'] == 'systemd'
31-
"slurmd"
32-
else
33-
"slurm"
34-
end
35-
36-
template "/etc/sysconfig/#{slurm_service_binary}" do
30+
template "/etc/sysconfig/slurmd" do
3731
source 'slurm/slurm.sysconfig.erb'
3832
user 'root'
3933
group 'root'
4034
mode '0644'
4135
end
4236

43-
service slurm_service_binary do
37+
service 'slurmd' do
4438
supports restart: false
4539
action %i[enable start]
4640
not_if { node['kitchen'] }

0 commit comments

Comments
 (0)