Skip to content

Commit

Permalink
Partial-Bug: #1533386
Browse files Browse the repository at this point in the history
When storage roles is present,
contrail_repo_name is an array,
So need to pick the first one.

PATCH 2:
=========
remove dpdk_depends from contrail_setup_repo.pp and moved to common.pp as it
is only required single time.

Change-Id: I9bf898b69ddbb393ea3bba7c0b3a521e9e234d3c
  • Loading branch information
thilakrajs authored and Dheeraj Gautam committed Jan 28, 2016
1 parent 57fdcc3 commit efef9c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 5 additions & 1 deletion contrail/environment/modules/contrail/manifests/common.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
$contrail_repo_type = $::contrail::params::contrail_repo_type,
$contrail_upgrade = $::contrail::params::contrail_upgrade,
$contrail_logoutput = $::contrail::params::contrail_logoutput,
$host_roles = $::contrail::params::host_roles,
) {
include ::contrail

Expand Down Expand Up @@ -66,11 +67,14 @@
apt::pin { 'contrail_repo_preferences':
priority => '998',
codename => 'contrail'
} ->
}

# Resource declarations for class contrail::common
# macro to perform common functions
# Create repository config on target.
if ('compute' in $host_roles) {
contrail::lib::setup_dpdk_depends{ 'dpdk_depends':}
}
contrail::lib::contrail_setup_repo{ $contrail_repo_name:
contrail_repo_ip => $contrail_repo_ip,
contrail_logoutput => $contrail_logoutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
define contrail::lib::contrail_setup_repo(
$contrail_repo_ip,
$contrail_logoutput = false,
$host_roles = $::contrail::params::host_roles,
) {
$contrail_repo_name = $name
if ($operatingsystem == "Centos" or $operatingsystem == "Fedora") {
Expand All @@ -18,7 +17,4 @@
release => 'contrail',
}
}
if ('compute' in $host_roles) {
contrail::lib::setup_dpdk_depends{ 'dpdk_depends':}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
notify { "settting up DPDK Repo":; }
->
apt::source { 'contrail-dpdk-depends':
location => "http://puppet/contrail/repo/${contrail_repo_name}/dpdk_depends",
location => "http://puppet/contrail/repo/${contrail_repo_name[0]}/dpdk_depends"
repos => 'main',
release => 'contrail-dpdk-depends',
}
Expand Down

0 comments on commit efef9c3

Please sign in to comment.