Skip to content

Commit 48376df

Browse files
committed
Add test for log4j-cve-2021-44228-hotpatch service
Signed-off-by: Francesco De Martino <[email protected]>
1 parent a2c144d commit 48376df

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
CHANGELOG
22
=========
33

4+
3.0.3
5+
-----
6+
7+
**CHANGES**
8+
- Disable log4j-cve-2021-44228-hotpatch service on Amazon Linux to avoid incurring in potential performance degradation.
9+
410
3.0.2
511
-----
612

cli/src/pcluster/resources/imagebuilder/parallelcluster_test.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,19 @@ phases:
3838
/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a status | grep status | grep stopped
3939
[[ $? -ne 0 ]] && echo "amazon-cloudwatch-agent is not stopped" && exit 1
4040
echo "CloudWatch test passed"
41+
42+
- name: Log4jPatcher
43+
action: ExecuteBash
44+
inputs:
45+
commands:
46+
- |
47+
set -vx
48+
OS="{{ test.OperatingSystemName.outputs.stdout }}"
49+
if [[ ${OS} =~ ^alinux ]]; then
50+
echo "verify log4j-cve-2021-44228-hotpatch service is disabled"
51+
systemctl show -p SubState log4j-cve-2021-44228-hotpatch | grep -i -v running
52+
[[ $? -ne 0 ]] && echo "log4j-cve-2021-44228-hotpatch service is running" && exit 1
53+
systemctl show -p LoadState log4j-cve-2021-44228-hotpatch | grep -i "LoadState=masked"
54+
[[ $? -ne 0 ]] && echo "log4j-cve-2021-44228-hotpatch service is not masked" && exit 1
55+
fi
56+
echo "Log4jPatcher Group test passed"

0 commit comments

Comments
 (0)