From cfe73594dc02da2359bfca092ffb363472ba37f1 Mon Sep 17 00:00:00 2001 From: Luca Carrogu Date: Tue, 1 Oct 2019 13:24:33 +0200 Subject: [PATCH] Reload httpd_service when ganglia conf is copied in sites-enabled folder This fix https://github.com/aws/aws-parallelcluster/issues/1322 Signed-off-by: Luca Carrogu --- recipes/_ganglia_install.rb | 1 + recipes/_master_base_config.rb | 2 +- recipes/intel_install.rb | 3 +++ recipes/intel_mpi.rb | 7 +++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/recipes/_ganglia_install.rb b/recipes/_ganglia_install.rb index 8ad8b126db..7703d39c7c 100644 --- a/recipes/_ganglia_install.rb +++ b/recipes/_ganglia_install.rb @@ -143,6 +143,7 @@ # Setup ganglia-web.conf apache config execute "copy ganglia apache conf" do command "cp /etc/ganglia-webfrontend/apache.conf /etc/apache2/sites-enabled/ganglia.conf" + notifies :reload, "service[#{node['cfncluster']['ganglia']['httpd_service']}]", :immediately not_if "test -f /etc/apache2/sites-enabled/ganglia.conf" end diff --git a/recipes/_master_base_config.rb b/recipes/_master_base_config.rb index 296e667256..b2f013a48b 100644 --- a/recipes/_master_base_config.rb +++ b/recipes/_master_base_config.rb @@ -150,7 +150,7 @@ end service node['cfncluster']['ganglia']['httpd_service'] do - supports restart: true + supports restart: true, reload: true action %i[enable start] end end diff --git a/recipes/intel_install.rb b/recipes/intel_install.rb index b49191981a..8594990cc0 100644 --- a/recipes/intel_install.rb +++ b/recipes/intel_install.rb @@ -19,6 +19,7 @@ code <<-INTEL set -e yum-config-manager --add-repo http://yum.repos.intel.com/hpc-platform/el7/setup/intel-hpc-platform.repo + yum-config-manager --save --setopt=intel-hpc-platform.skip_if_unavailable=true rpm --import http://yum.repos.intel.com/hpc-platform/el7/setup/PUBLIC_KEY.PUB yum -y install intel-hpc-platform-* INTEL @@ -32,6 +33,7 @@ set -e rpm --import https://yum.repos.intel.com/2019/setup/RPM-GPG-KEY-intel-psxe-runtime-2019 yum -y install https://yum.repos.intel.com/2019/setup/intel-psxe-runtime-2019-reposetup-1-0.noarch.rpm + yum-config-manager --save --setopt=intel-psxe-runtime-2019.skip_if_unavailable=true yum -y install intel-psxe-runtime-#{node['cfncluster']['psxe']['version']} INTEL creates '/opt/intel/psxe_runtime' @@ -43,6 +45,7 @@ code <<-INTEL set -e yum-config-manager --add-repo https://yum.repos.intel.com/intelpython/setup/intelpython.repo + yum-config-manager --save --setopt=intelpython.skip_if_unavailable=true yum -y install intelpython2 intelpython3 INTEL creates '/opt/intel/intelpython2' diff --git a/recipes/intel_mpi.rb b/recipes/intel_mpi.rb index 5dffb96aeb..1cb17ebbfb 100644 --- a/recipes/intel_mpi.rb +++ b/recipes/intel_mpi.rb @@ -36,3 +36,10 @@ INTELMPI creates '/opt/intel/impi' end + +if (node['platform'] == 'centos' && node['platform_version'].to_i >= 7) \ + || node['platform'] == 'amazon' + execute 'yum-config-manager_skip_if_unavail_intel_mpi' do + command "yum-config-manager --save --setopt=intel-mpi.skip_if_unavailable=true" + end +end \ No newline at end of file