Skip to content

Commit

Permalink
Closes-Bug: #1610573
Browse files Browse the repository at this point in the history
Puppet execution stop after database completion in contrail_roles.rb.
Neutron-server doesnt start due to openstack release match regexp doesnt handle
centos pattern in neutron.pp.
For upgrade case, need to check against installed vs what is available in repo.

Change-Id: Ie8a26cdb1a80ee0c5b2c35387d3f7a3bf28fb935
  • Loading branch information
kamleshp committed Aug 6, 2016
1 parent 430c6ae commit dc9b66e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Expand Up @@ -38,7 +38,9 @@
operatingsystem = Facter.value('operatingsystem')
case operatingsystem
when "CentOS"
Facter::Util::Resolution.exec('yum list | grep contrail-lib | awk \'{ printf $2}\' | awk -F \'.e\' \'{printf $1}\'')
# need to check installed version, one below check the version in repo
# need for upgrade check
Facter::Util::Resolution.exec('yum list installed | grep contrail-lib | awk \'{ printf $2}\' | awk -F \'.e\' \'{printf $1}\'')
when "Ubuntu"
Facter::Util::Resolution.exec('dpkg -l contrail-lib | grep contrail-lib | awk \'{ printf $3}\'')
end
Expand Down
Expand Up @@ -7,7 +7,6 @@

roles_array.each do |role|
service_str = "service supervisor-" + role + " status"
puts(service_str)
is_service_running = system(service_str)
if role == "analytics"
role = "collector"
Expand Down
Expand Up @@ -35,9 +35,11 @@
$database_credentials = join([$service_password, "@", $neutron_mysql_ip],'')
$keystone_db_conn = join(["mysql://neutron:",$database_credentials,"/neutron"],'')

if ( $package_sku =~ /^*:12\.0.*$/) {
# sku pattern for centos is 12.0.1-1.el7.noarch. while
# sku pattern for ubuntu is 2:12.0.1-0ubuntu1~cloud0.1contrail
if ( $package_sku =~ /12\.0./) {
$neutron_extensions = ":${::python_dist}/neutron_lbaas/extensions"
} elsif ( $package_sku =~ /^*:13\.0.*$/) {
} elsif ( $package_sku =~ /13\.0./) {
$neutron_extensions = ":${::python_dist}/neutron_lbaas/extensions"
} else {
$neutron_extensions = ""
Expand Down

0 comments on commit dc9b66e

Please sign in to comment.