Skip to content

Commit

Permalink
SM-Quench: Fix issue that broke mainline
Browse files Browse the repository at this point in the history
Change-Id: I31bcb29f2cb754044760b96570f6d3a89aff3915
Partial-Bug: #1472554
  • Loading branch information
Dheeraj Gautam committed Jul 20, 2015
1 parent f946262 commit b531a83
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,40 @@

#Make ha-mon start later
if($internal_vip != "") {
#Get the value for hiera and not from openstack::config
#as with sequencing changes openstack modules is disabled after its
#step is completed.
#Get the value for hiera and not from openstack::config
#as with sequencing changes openstack modules is disabled after its
#step is completed.

$password = hiera(openstack::mysql::service_password)
exec { "ha-mon-restart":
command => "service contrail-hamon restart && echo contrail-ha-mon >> /etc/contrail/contrail_openstack_exec.out",
provider => shell,
before => "Exec[exec_start_supervisor_openstack]",
logoutput => $contrail_logoutput,
unless => "grep -qx contrail-ha-mon /etc/contrail/contrail_openstack_exec.out",
}
# Set mysql cpnnection string at the end
# as setting before will result in provision failure.
# Openstack is setup before galera is setup.
# Intiailly mysql connection string is setup to internal_vip:3306,
# making all mysql commands to land on vip node.
# Later mysql needs to change to localip to support failover scenarios.
# If mysql connection string is setup to local_ip while provisoning openstack.
# openstack 2,3 provision will fail as db-sync is done only on 1,
# and they dont find the tables.
$password = hiera(openstack::mysql::service_password)
exec { "ha-mon-restart":
command => "service contrail-hamon restart && echo contrail-ha-mon >> /etc/contrail/contrail_openstack_exec.out",
provider => shell,
before => "Exec[exec_start_supervisor_openstack]",
logoutput => $contrail_logoutput,
unless => "grep -qx contrail-ha-mon /etc/contrail/contrail_openstack_exec.out",
}
# Set mysql cpnnection string at the end
# as setting before will result in provision failure.
# Openstack is setup before galera is setup.
# Intiailly mysql connection string is setup to internal_vip:3306,
# making all mysql commands to land on vip node.
# Later mysql needs to change to localip to support failover scenarios.
# If mysql connection string is setup to local_ip while provisoning openstack.
# openstack 2,3 provision will fail as db-sync is done only on 1,
# and they dont find the tables.

exec { 'exec_set_mysql':
command => "openstack-config --set /etc/keystone/keystone.conf database connection mysql://keystone:${password}@${host_control_ip/}keystone &&
openstack-config --set /etc/keystone/keystone.conf sql connection mysql://keystone:${password}@${host_control_ip}/keystone &&
openstack-config --set /etc/cinder/cinder.conf database connection mysql://cinder:${password}@${host_control_ip}/cinder &&
openstack-config --set /etc/glance/glance-registry.conf database connection mysql://glance:${password}@${host_control_ip}/glance &&
openstack-config --set /etc/glance/glance-api.conf database connection mysql://glance:${password}@${host_control_ip}/glance &&
openstack-config --set /etc/neutron/neutron.conf database connection mysql://neutron:${password}@${host_control_ip}/neutron &&
echo exec_set_mysql >> /etc/contrail/contrail_openstack_exec.out",
provider => shell,
before => Exec['exec_start_supervisor_openstack'],
logoutput => $contrail_logoutput
exec { 'exec_set_mysql':
command => "openstack-config --set /etc/keystone/keystone.conf database connection mysql://keystone:${password}@${host_control_ip}/keystone &&
openstack-config --set /etc/keystone/keystone.conf sql connection mysql://keystone:${password}@${host_control_ip}/keystone &&
openstack-config --set /etc/cinder/cinder.conf database connection mysql://cinder:${password}@${host_control_ip}/cinder &&
openstack-config --set /etc/glance/glance-registry.conf database connection mysql://glance:${password}@${host_control_ip}/glance &&
openstack-config --set /etc/glance/glance-api.conf database connection mysql://glance:${password}@${host_control_ip}/glance &&
openstack-config --set /etc/neutron/neutron.conf database connection mysql://neutron:${password}@${host_control_ip}/neutron &&
echo exec_set_mysql >> /etc/contrail/contrail_openstack_exec.out",
provider => shell,
before => Exec['exec_start_supervisor_openstack'],
logoutput => $contrail_logoutput
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$contrail_logoutput = false,
) {
exec { "contrail-status-${state}" :
command => "mkdir -p /etc/contrail/ && wget --post-data=\"\" \"http://puppet:9002/server_status?server_id=${::hostname}&state=${state} \" && echo contrail-status-${state} >> /etc/contrail/contrail_common_exec.out",
command => "mkdir -p /etc/contrail/ && wget --post-data=\"\" \"http://puppet:9002/server_status?server_id=${::hostname}&state=${state}\" && echo contrail-status-${state} >> /etc/contrail/contrail_common_exec.out",
provider => shell,
logoutput => $contrail_logoutput
}
Expand Down

0 comments on commit b531a83

Please sign in to comment.