diff options
authorMichele Baldessari <michele@acksyn.org>2017-10-18 12:00:21 +0200
committerMichele Baldessari <michele@acksyn.org>2017-10-19 07:09:05 +0200
commit1e9000a4347eda009e59548353cfb3be5e661231 (patch)
parent551f739004444d9549f35a58ec3ceb86ba7702f1 (diff)
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)
1 files changed, 3 insertions, 1 deletions
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'],