From 1e9000a4347eda009e59548353cfb3be5e661231 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Wed, 18 Oct 2017 12:00:21 +0200 Subject: Make sure tuned package is installed before calling tuned-adm With https://review.openstack.org/#/c/511509 we start erroring out properly on puppet errors. One of the jobs that is now failing is: http://logs.openstack.org/09/511509/7/check/legacy-tripleo-ci-centos-7-undercloud-containers/5d3fecc/logs/var/log/undercloud_install.txt.gz Reason for this is that we include the tripleo::base::tuned profile which has: exec { 'tuned-adm': path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'], command => "tuned-adm profile ${profile}", unless => "tuned-adm active | grep -q '${profile}'" } So if the tuned package is not installed by other means we get: "Error: /Stage[main]/Tripleo::Profile::Base::Tuned/Exec[tuned-adm]: Could not evaluate: Could not find command 'tuned-adm'", Let's add the package here in the profile instead of installing it via tripleo.sh, that way also a split stack deployment is covered. Change-Id: I130cdc59000e0c5e5fa7c542fbe6b782651a7eb7 Closes-Bug: #1724518 (cherry picked from commit 32ef340901027926ed3f77ae37d8e0d20e38e15d) --- manifests/profile/base/tuned.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'manifests/profile') diff --git a/manifests/profile/base/tuned.pp b/manifests/profile/base/tuned.pp index 8dfcea0..48951bd 100644 --- a/manifests/profile/base/tuned.pp +++ b/manifests/profile/base/tuned.pp @@ -12,9 +12,11 @@ class tripleo::profile::base::tuned ( $profile = 'throughput-performance' ) { + ensure_resource('package', 'tuned', { ensure => 'present' }) exec { 'tuned-adm': path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'], command => "tuned-adm profile ${profile}", - unless => "tuned-adm active | grep -q '${profile}'" + unless => "tuned-adm active | grep -q '${profile}'", + require => Package['tuned'], } } -- cgit 1.2.3-korg