Skip to content

Commit

Permalink
Merge pull request #566 from jguiditta/BZ1271347-rabbit-heartbeat
Browse files Browse the repository at this point in the history
BZ #1271347 - Add configuration for better node reconnection with rab…
  • Loading branch information
cwolferh committed Oct 23, 2015
2 parents 436d7dc + 21022f8 commit d18e973
Show file tree
Hide file tree
Showing 18 changed files with 653 additions and 616 deletions.
58 changes: 30 additions & 28 deletions puppet/modules/quickstack/manifests/ceilometer/control.pp
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
class quickstack::ceilometer::control(
$amqp_heartbeat_timeout_threshold,
$amqp_provider,
$amqp_host = '127.0.0.1',
$amqp_port = '5672',
$amqp_host = '127.0.0.1',
$amqp_port = '5672',
$amqp_username,
$amqp_password,
$rabbit_hosts = undef,
$auth_host = '127.0.0.1',
$bind_address = '0.0.0.0',
$rabbit_hosts = undef,
$auth_host = '127.0.0.1',
$bind_address = '0.0.0.0',
$ceilometer_metering_secret,
$ceilometer_user_password,
$ceilometer_admin_host = '127.0.0.1',
$ceilometer_priv_host = '127.0.0.1',
$ceilometer_pub_host = '127.0.0.1',
$db_hosts = ['127.0.0.1:27017'],
$memcache_servers = ['127.0.0.1:11211'],
$qpid_protocol = 'tcp',
$service_enable = true,
$service_ensure = 'running',
$verbose = false,
$coordination_url = undef,
$ceilometer_admin_host = '127.0.0.1',
$ceilometer_priv_host = '127.0.0.1',
$ceilometer_pub_host = '127.0.0.1',
$db_hosts = ['127.0.0.1:27017'],
$memcache_servers = ['127.0.0.1:11211'],
$qpid_protocol = 'tcp',
$service_enable = true,
$service_ensure = 'running',
$verbose = false,
$coordination_url = undef,
) {

validate_array($db_hosts)
Expand All @@ -40,19 +41,20 @@
}

class { '::ceilometer':
metering_secret => $ceilometer_metering_secret,
qpid_hostname => $amqp_host,
qpid_port => $amqp_port,
qpid_protocol => $qpid_protocol,
qpid_username => $amqp_username,
qpid_password => $amqp_password,
rabbit_host => $amqp_host,
rabbit_port => $amqp_port,
rabbit_userid => $amqp_username,
rabbit_password => $amqp_password,
rabbit_hosts => $rabbit_hosts,
rpc_backend => amqp_backend('ceilometer', $amqp_provider),
verbose => str2bool_i("$verbose"),
metering_secret => $ceilometer_metering_secret,
qpid_hostname => $amqp_host,
qpid_port => $amqp_port,
qpid_protocol => $qpid_protocol,
qpid_username => $amqp_username,
qpid_password => $amqp_password,
rabbit_host => $amqp_host,
rabbit_port => $amqp_port,
rabbit_userid => $amqp_username,
rabbit_password => $amqp_password,
rabbit_heartbeat_timeout_threshold => $amqp_heartbeat_timeout_threshold,
rabbit_hosts => $rabbit_hosts,
rpc_backend => amqp_backend('ceilometer', $amqp_provider),
verbose => str2bool_i("$verbose"),
}

class { '::ceilometer::collector':
Expand Down
36 changes: 19 additions & 17 deletions puppet/modules/quickstack/manifests/cinder.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
$log_facility = 'LOG_USER',

$rpc_backend = 'cinder.openstack.common.rpc.impl_kombu',
$amqp_heartbeat_timeout_threshold,
$amqp_host = '127.0.0.1',
$amqp_port = '5672',
$amqp_username = '',
Expand Down Expand Up @@ -53,23 +54,24 @@
}

class {'::cinder':
rpc_backend => $rpc_backend,
qpid_hostname => $amqp_host,
qpid_port => $amqp_port,
qpid_username => $amqp_username,
qpid_password => $amqp_password_safe_for_cinder,
qpid_heartbeat => $qpid_heartbeat,
qpid_protocol => $qpid_protocol,
rabbit_host => $amqp_host,
rabbit_port => $amqp_port,
rabbit_userid => $amqp_username,
rabbit_password => $amqp_password_safe_for_cinder,
rabbit_use_ssl => $rabbit_use_ssl,
rabbit_hosts => $rabbit_hosts,
database_connection => $sql_connection,
verbose => str2bool_i("$verbose"),
use_syslog => str2bool_i("$use_syslog"),
log_facility => $log_facility,
rpc_backend => $rpc_backend,
qpid_hostname => $amqp_host,
qpid_port => $amqp_port,
qpid_username => $amqp_username,
qpid_password => $amqp_password_safe_for_cinder,
qpid_heartbeat => $qpid_heartbeat,
qpid_protocol => $qpid_protocol,
rabbit_heartbeat_timeout_threshold => $amqp_heartbeat_timeout_threshold,
rabbit_host => $amqp_host,
rabbit_port => $amqp_port,
rabbit_userid => $amqp_username,
rabbit_password => $amqp_password_safe_for_cinder,
rabbit_use_ssl => $rabbit_use_ssl,
rabbit_hosts => $rabbit_hosts,
database_connection => $sql_connection,
verbose => str2bool_i("$verbose"),
use_syslog => str2bool_i("$use_syslog"),
log_facility => $log_facility,
}
# FIXME: after we drop support for Puppet <= 3.6, we can use
# `contain ::cinder` instead of the anchors here, and use fully qualified
Expand Down
63 changes: 33 additions & 30 deletions puppet/modules/quickstack/manifests/compute_common.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# Defaults to the value of nova_host if unset.

class quickstack::compute_common (
$amqp_heartbeat_timeout_threshold,
$amqp_host = $quickstack::params::amqp_host,
$amqp_password = $quickstack::params::amqp_password,
$amqp_port = '5672',
Expand Down Expand Up @@ -203,23 +204,24 @@
}

class { '::nova':
database_connection => $nova_sql_connection,
debug => $debug,
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => "http:https://${glance_host}:9292/v1",
rpc_backend => amqp_backend('nova', $amqp_provider),
qpid_hostname => $amqp_host,
qpid_protocol => $qpid_protocol,
qpid_port => $real_amqp_port,
qpid_username => $amqp_username,
qpid_password => $amqp_password,
rabbit_host => $amqp_host,
rabbit_port => $real_amqp_port,
rabbit_userid => $amqp_username,
rabbit_password => $amqp_password,
rabbit_use_ssl => $ssl,
rabbit_hosts => $rabbit_hosts,
verbose => $verbose,
database_connection => $nova_sql_connection,
debug => $debug,
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => "http:https://${glance_host}:9292/v1",
rpc_backend => amqp_backend('nova', $amqp_provider),
qpid_hostname => $amqp_host,
qpid_protocol => $qpid_protocol,
qpid_port => $real_amqp_port,
qpid_username => $amqp_username,
qpid_password => $amqp_password,
rabbit_heartbeat_timeout_threshold => $amqp_heartbeat_timeout_threshold,
rabbit_host => $amqp_host,
rabbit_port => $real_amqp_port,
rabbit_userid => $amqp_username,
rabbit_password => $amqp_password,
rabbit_use_ssl => $ssl,
rabbit_hosts => $rabbit_hosts,
verbose => $verbose,
}

$compute_ip = find_ip("$private_network",
Expand All @@ -234,19 +236,20 @@
}

if str2bool_i("$ceilometer") {
class { 'ceilometer':
metering_secret => $ceilometer_metering_secret,
qpid_protocol => $qpid_protocol,
qpid_username => $amqp_username,
qpid_password => $amqp_password,
rabbit_host => $amqp_host,
rabbit_hosts => $rabbit_hosts,
rabbit_port => $real_amqp_port,
rabbit_userid => $amqp_username,
rabbit_password => $amqp_password,
rabbit_use_ssl => $ssl,
rpc_backend => amqp_backend('ceilometer', $amqp_provider),
verbose => $verbose,
class { '::ceilometer':
metering_secret => $ceilometer_metering_secret,
qpid_protocol => $qpid_protocol,
qpid_username => $amqp_username,
qpid_password => $amqp_password,
rabbit_heartbeat_timeout_threshold => $amqp_heartbeat_timeout_threshold,
rabbit_host => $amqp_host,
rabbit_hosts => $rabbit_hosts,
rabbit_port => $real_amqp_port,
rabbit_userid => $amqp_username,
rabbit_password => $amqp_password,
rabbit_use_ssl => $ssl,
rpc_backend => amqp_backend('ceilometer', $amqp_provider),
verbose => $verbose,
}

class { 'ceilometer::agent::auth':
Expand Down
14 changes: 8 additions & 6 deletions puppet/modules/quickstack/manifests/glance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
$enabled = true,
$manage_service = true,
$filesystem_store_datadir = '/var/lib/glance/images/',
$amqp_heartbeat_timeout_threshold,
$amqp_host = '127.0.0.1',
$amqp_port = '5672',
$amqp_username = '',
Expand Down Expand Up @@ -133,12 +134,13 @@
}
} else {
class { 'glance::notify::rabbitmq':
rabbit_password => $amqp_password,
rabbit_userid => $amqp_username,
rabbit_host => $amqp_host,
rabbit_port => $amqp_port,
rabbit_use_ssl => $rabbit_use_ssl,
rabbit_hosts => $rabbit_hosts,
rabbit_heartbeat_timeout_threshold => $amqp_heartbeat_timeout_threshold,
rabbit_password => $amqp_password,
rabbit_userid => $amqp_username,
rabbit_host => $amqp_host,
rabbit_port => $amqp_port,
rabbit_use_ssl => $rabbit_use_ssl,
rabbit_hosts => $rabbit_hosts,
}
}

Expand Down
48 changes: 25 additions & 23 deletions puppet/modules/quickstack/manifests/heat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
$db_ssl_ca = '',
$keystone_host = '127.0.0.1',
$qpid_heartbeat = '60',
$amqp_heartbeat_timeout_threshold,
$amqp_host = '127.0.0.1',
$amqp_port = '5672',
$amqp_username = '',
Expand Down Expand Up @@ -54,29 +55,30 @@
}

class { '::heat':
sql_connection => $sql_connection,
keystone_ec2_uri => "http:https://${keystone_host}:35357/v2.0/ec2tokens",
auth_uri => "http:https://${keystone_host}:35357/v2.0",
keystone_password => $heat_user_password,
keystone_tenant => "services",
keystone_user => "heat",
keystone_host => $keystone_host,
rpc_backend => amqp_backend('heat', $amqp_provider),
qpid_heartbeat => $qpid_heartbeat,
qpid_hostname => $amqp_host,
qpid_port => $amqp_port,
qpid_username => $amqp_username,
qpid_password => $amqp_password,
rabbit_host => $amqp_host,
rabbit_port => $amqp_port,
rabbit_userid => $amqp_username,
rabbit_password => $amqp_password,
rabbit_use_ssl => $rabbit_use_ssl,
rabbit_hosts => $rabbit_hosts,
use_syslog => str2bool_i("$use_syslog"),
log_facility => $log_facility,
verbose => $verbose,
debug => $debug,
sql_connection => $sql_connection,
keystone_ec2_uri => "http:https://${keystone_host}:35357/v2.0/ec2tokens",
auth_uri => "http:https://${keystone_host}:35357/v2.0",
keystone_password => $heat_user_password,
keystone_tenant => "services",
keystone_user => "heat",
keystone_host => $keystone_host,
rpc_backend => amqp_backend('heat', $amqp_provider),
qpid_heartbeat => $qpid_heartbeat,
qpid_hostname => $amqp_host,
qpid_port => $amqp_port,
qpid_username => $amqp_username,
qpid_password => $amqp_password,
rabbit_heartbeat_timeout_threshold => $amqp_heartbeat_timeout_threshold,
rabbit_host => $amqp_host,
rabbit_port => $amqp_port,
rabbit_userid => $amqp_username,
rabbit_password => $amqp_password,
rabbit_use_ssl => $rabbit_use_ssl,
rabbit_hosts => $rabbit_hosts,
use_syslog => str2bool_i("$use_syslog"),
log_facility => $log_facility,
verbose => $verbose,
debug => $debug,
}
# FIXME(jistr): after we drop support for Puppet <= 3.6, we can use
# `contain ::heat` instead of the anchors here, and use fully qualified
Expand Down
40 changes: 21 additions & 19 deletions puppet/modules/quickstack/manifests/keystone/common.pp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
$admin_endpoint = '127.0.0.1',
$admin_token,
$admin_bind_host = '0.0.0.0',
$amqp_heartbeat_timeout_threshold,
$amqp_host = 'localhost',
$amqp_port = '5672',
$rabbit_hosts = undef,
Expand Down Expand Up @@ -87,25 +88,26 @@

#FIXME: endpoint construction needs to be cleaned up and made more flexible
class { '::keystone':
admin_endpoint => "http:https://${admin_endpoint}:35357/",
admin_token => $admin_token,
admin_bind_host => $admin_bind_host,
catalog_type => 'sql',
debug => $debug,
enabled => $enabled,
database_idle_timeout => $idle_timeout,
log_facility => $log_facility,
public_bind_host => $public_bind_host,
public_endpoint => "http:https://${public_endpoint}:5000/",
rabbit_host => $amqp_host,
rabbit_port => $amqp_port,
rabbit_hosts => $rabbit_hosts,
service_provider => $service_provider,
database_connection => $sql_conn,
token_driver => $token_driver,
token_provider => $token_provider,
use_syslog => $use_syslog,
verbose => $verbose,
admin_endpoint => "http:https://${admin_endpoint}:35357/",
admin_token => $admin_token,
admin_bind_host => $admin_bind_host,
catalog_type => 'sql',
debug => $debug,
enabled => $enabled,
database_idle_timeout => $idle_timeout,
log_facility => $log_facility,
public_bind_host => $public_bind_host,
public_endpoint => "http:https://${public_endpoint}:5000/",
rabbit_heartbeat_timeout_threshold => $amqp_heartbeat_timeout_threshold,
rabbit_host => $amqp_host,
rabbit_port => $amqp_port,
rabbit_hosts => $rabbit_hosts,
service_provider => $service_provider,
database_connection => $sql_conn,
token_driver => $token_driver,
token_provider => $token_provider,
use_syslog => $use_syslog,
verbose => $verbose,
}
contain keystone

Expand Down
Loading

0 comments on commit d18e973

Please sign in to comment.