Skip to content

Commit

Permalink
SM-HA: galera sync have some issue sometimes
Browse files Browse the repository at this point in the history
Closes-Bug: #1658778

1. /etc/init.d/haproxy stop may stop
2. don't bootstrap other keystone on openstack nodes( other than first node).
This way,
there is no data into non-bootstrapped nodes.

Change-Id: I9a18d91f7813c9bf21ca7c433e64a7d3908f404f
  • Loading branch information
Dheeraj Gautam committed Feb 7, 2017
1 parent 7ac049a commit b41196e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Expand Up @@ -184,6 +184,7 @@
exec { 'initd_haproxy_stop' :
command => "/etc/init.d/haproxy stop ",
provider => shell,
returns => [ "0", "1", ],
logoutput => true,
}->
package { 'contrail-openstack-ha':
Expand Down
@@ -1,5 +1,6 @@
class contrail::profile::openstack::keystone(
$internal_vip = $::contrail::params::internal_vip,
$openstack_ip_list = $::contrail::params::openstack_ip_list,
$host_control_ip = $::contrail::params::host_ip,
$sync_db = $::contrail::params::os_sync_db,
$package_sku = $::contrail::params::package_sku,
Expand Down Expand Up @@ -47,16 +48,27 @@
$keystone_admin_port = "35357"
}

$database_credentials = join([$service_password_to_use, "@", $keystone_ip_to_use],'')
$database_credentials = join([$service_password_to_use, "@", $host_control_ip],'')
$keystone_db_conn = join(["mysql://keystone:",$database_credentials, $mysql_port_url],'')

#bootstrap is only for mitaka. kilo is always false
$tmp_index = inline_template('<%= @openstack_ip_list.index(@host_control_ip) %>')
if ($tmp_index != nil) {
$openstack_index = $tmp_index + 1
}
# only first node should bootstrap the keystone
if($openstack_index == '1' ) {
$bootstrap_keystone = true
} else {
$bootstrap_keystone = false
}
$paste_config = ''

case $package_sku {
/13\.0/: {
class { '::keystone':
database_connection => $keystone_db_conn,
admin_token => $admin_token,
admin_token => $admin_token,
public_port => $keystone_public_port,
admin_port => $keystone_admin_port,
rabbit_hosts => $openstack_rabbit_servers,
Expand All @@ -72,7 +84,8 @@
rabbit_use_ssl => $rabbit_use_ssl,
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
kombu_ssl_certfile => $kombu_ssl_certfile,
kombu_ssl_keyfile => $kombu_ssl_keyfile
kombu_ssl_keyfile => $kombu_ssl_keyfile,
enable_bootstrap => $bootstrap_keystone
}

if ($keystone_version == "v3") {
Expand Down

0 comments on commit b41196e

Please sign in to comment.