Skip to content

Commit da356ab

Browse files
committed
Disable log4j-cve-2021-44228-hotpatch service on Amazon Linux
Signed-off-by: Francesco De Martino <[email protected]>
1 parent fa42de3 commit da356ab

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ aws-parallelcluster-cookbook CHANGELOG
33

44
This file is used to list changes made in each version of the AWS ParallelCluster cookbook.
55

6+
3.0.3
7+
------
8+
9+
**CHANGES**
10+
- Disable log4j-cve-2021-44228-hotpatch service on Amazon Linux to avoid incurring in potential performance degradation.
11+
612
3.0.2
713
------
814

recipes/base_install.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
include_recipe "aws-parallelcluster::setup_envars"
1919
include_recipe "aws-parallelcluster::sudoers_install"
20+
include_recipe "aws-parallelcluster::disable_log4j_patcher"
2021

2122
return if node['conditions']['ami_bootstrapped']
2223

recipes/disable_log4j_patcher.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# frozen_string_literal: true
2+
3+
#
4+
# Cookbook Name:: aws-parallelcluster
5+
# Recipe:: disable_log4j_patcher
6+
#
7+
# Copyright 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+
if platform_family?('amazon')
19+
# masking the service in order to prevent it from being automatically enabled
20+
# if not installed yet
21+
service 'log4j-cve-2021-44228-hotpatch' do
22+
action %i[disable stop mask]
23+
end
24+
end

0 commit comments

Comments
 (0)