File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
cookbooks/aws-parallelcluster-platform Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ This file is used to list changes made in each version of the AWS ParallelCluste
7
7
------
8
8
** ENHANCEMENTS**
9
9
- Add support for Ubuntu24.
10
+ - Disable unused services like cups and wpa_supplicant from Official ParallelCluster AMIs to improve security.
10
11
11
12
** CHANGES**
12
13
- On Ubuntu 22.04, install the Nvidia driver with the same compiler version used to compile the kernel.
Original file line number Diff line number Diff line change 27
27
service 'log4j-cve-2021-44228-hotpatch' do
28
28
action %i( disable stop mask )
29
29
end unless on_docker?
30
+
31
+ # Disable services if node['cluster']['disable_services'] is provided
32
+ if node [ 'cluster' ] [ 'disable_services' ]
33
+ node [ 'cluster' ] [ 'disable_services' ] . split ( ) . each do |service_name |
34
+ service service_name do
35
+ action %i( disable stop mask )
36
+ end unless on_docker?
37
+ end
38
+ end
Original file line number Diff line number Diff line change 1
1
require 'spec_helper'
2
2
3
+ DISABLE_SERVICE_NAME = 'service_name1 service_name_2' . freeze
4
+
3
5
describe 'aws-parallelcluster-platform::disable_services' do
4
6
for_all_oses do |platform , version |
5
7
context "on #{ platform } #{ version } " do
6
8
cached ( :chef_run ) do
7
- runner ( platform : platform , version : version ) . converge ( described_recipe )
9
+ runner = ChefSpec ::Runner . new do |node |
10
+ node . override [ 'cluster' ] [ 'disable_services' ] = DISABLE_SERVICE_NAME
11
+ end
12
+ runner . converge ( described_recipe )
8
13
end
9
14
10
15
it 'disables DLAMI multi eni helper' do
18
23
is_expected . to stop_service ( 'log4j-cve-2021-44228-hotpatch' )
19
24
is_expected . to mask_service ( 'log4j-cve-2021-44228-hotpatch' )
20
25
end
26
+
27
+ DISABLE_SERVICE_NAME . split ( ) . each do |service_name |
28
+ it "disables #{ service_name } " do
29
+ is_expected . to disable_service ( service_name )
30
+ is_expected . to stop_service ( service_name )
31
+ is_expected . to mask_service ( service_name )
32
+ end
33
+ end
21
34
end
22
35
end
23
36
end
You can’t perform that action at this time.
0 commit comments