From b540c365b216a442032b25e117cd0127d3119b09 Mon Sep 17 00:00:00 2001 From: Kamlesh Parmar Date: Fri, 16 Dec 2016 01:24:01 -0800 Subject: [PATCH] Closes-Bug: #1650463 Move the editing of /etc/yum/pluginconf.d/priorities.conf after yum-plugin- priorities package is installed Change-Id: I444bfc07c431f344a490c31bda567196a1d5062a --- .../environment/modules/contrail/manifests/common.pp | 9 ++++++++- .../contrail/manifests/lib/contrail_setup_repo.pp | 7 ------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contrail/environment/modules/contrail/manifests/common.pp b/contrail/environment/modules/contrail/manifests/common.pp index e0b1190c..b2eaa9b3 100644 --- a/contrail/environment/modules/contrail/manifests/common.pp +++ b/contrail/environment/modules/contrail/manifests/common.pp @@ -128,7 +128,14 @@ lens_to_use => 'properties.lns', } -> Sysctl::Value['kernel.core_pattern'] - package { 'yum-plugin-priorities' : ensure => present,} + package { 'yum-plugin-priorities' : ensure => present,} -> + # add check_obsoletes flag off, for bug #1650463 + exec { "/etc/yum/pluginconf.d/priorities.conf": + command => "echo 'check_obsoletes=1' >> /etc/yum/pluginconf.d/priorities.conf && echo exec-yum-priorities-fix >> /etc/contrail/exec-yum-pririties-fix.out", + provider => shell, + unless => "grep -qx exec-yum-priorities-fix /etc/contrail/exec-yum-pririties-fix.out", + logoutput => true + } contain ::contrail::disable_selinux } diff --git a/contrail/environment/modules/contrail/manifests/lib/contrail_setup_repo.pp b/contrail/environment/modules/contrail/manifests/lib/contrail_setup_repo.pp index 1eaef3de..8ee30082 100644 --- a/contrail/environment/modules/contrail/manifests/lib/contrail_setup_repo.pp +++ b/contrail/environment/modules/contrail/manifests/lib/contrail_setup_repo.pp @@ -8,13 +8,6 @@ file { "/etc/yum.repos.d/cobbler-config.repo" : ensure => present, content => template("${module_name}/contrail-yum-repo.erb") - } -> - # add check_obsoletes flag off, for bug #1649596 - exec { "/etc/yum/pluginconf.d/priorities.conf": - command => "echo 'check_obsoletes=1' >> /etc/yum/pluginconf.d/priorities.conf && echo exec-yum-priorities-fix >> /etc/contrail/exec-yum-pririties-fix.out", - provider => shell, - unless => "grep -qx exec-yum-priorities-fix /etc/contrail/exec-yum-pririties-fix.out", - logoutput => true } } if ($operatingsystem == "Ubuntu") {