From 7297c02717495695e483e8955a7dbb3157b99e9c Mon Sep 17 00:00:00 2001 From: Jacopo De Amicis Date: Wed, 29 May 2024 14:43:51 +0200 Subject: [PATCH] Fix clash in logrotate configuration for cloud-init On Ubuntu systems, delete the default logrotate config for cloud-init. Ubuntu started shipping a default logrotate configuration for the cloud-init log files, which clashed with the one provided by ParallelCluster. Signed-off-by: Jacopo De Amicis --- .../recipes/config/log_rotation.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cookbooks/aws-parallelcluster-platform/recipes/config/log_rotation.rb b/cookbooks/aws-parallelcluster-platform/recipes/config/log_rotation.rb index fd8350d60c..33e5edd436 100644 --- a/cookbooks/aws-parallelcluster-platform/recipes/config/log_rotation.rb +++ b/cookbooks/aws-parallelcluster-platform/recipes/config/log_rotation.rb @@ -14,6 +14,13 @@ return if node['cluster']['log_rotation_enabled'] != 'true' +if platform?('ubuntu') + # Ubuntu recently pushed a default logrotate configuration for cloud-init that clashes with the ParallelCluster one. + file '/etc/logrotate.d/cloud-init' do + action :delete + end +end + # TODO: move the logrotate configuration of the various services to the corresponding recipes/cookbooks. case node['cluster']['node_type']