Skip to content

Commit

Permalink
Closes-Bug: #1638814 - Ceilometer processes restart too much
Browse files Browse the repository at this point in the history
The ordering was missing and rpc_backend being removed also caused too many restarts

Closes-Bug: #1612774 - Ceilometer HA support

Needs integration with tooz + couple missing params

Change-Id: I8640c01881836b8c61c4943dd8003d08def6b647
  • Loading branch information
nitishkrishna committed Nov 5, 2016
1 parent fa99d5a commit a951d15
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 33 deletions.
Expand Up @@ -31,15 +31,10 @@
debug => $openstack_verbose,
verbose => $openstack_debug,
rabbit_hosts => $openstack_rabbit_servers,
rpc_backend => 'rabbit',
}
}
class { '::ceilometer::agent::compute': }
->
contrail::lib::augeas_conf_rm { "ceilometer_compute_rpc_backend":
key => 'rpc_backend',
config_file => '/etc/ceilometer/ceilometer.conf',
lens_to_use => 'properties.lns'
}
}
} elsif ((!("compute" in $host_roles)) and ($contrail_roles["compute"] == true)) {
notify { "uninstalling compute":; }
Expand Down
Expand Up @@ -19,59 +19,63 @@
$keystone_ip_to_use = $::contrail::params::keystone_ip_to_use,
) {

$database_ip_to_use = $database_ip_list[0]
$mongo_connection = join([ "mongodb://ceilometer:", $mongo_password, "@", join($database_ip_list,':27017,') ,":27017/ceilometer?replicaSet=rs-ceilometer" ],'')

$auth_url = "http://${keystone_ip_to_use}:5000/v2.0"
$auth_password = $ceilometer_password
$auth_tenant_name = 'services'
$auth_username = 'ceilometer'

if (internal_vip!='') {
$coordination_url = join(["kazoo://", $database_ip_to_use, ':2181'])
Class['::ceilometer'] ->
ceilometer_config {
'notification/workload_partitioning' : value => 'True';
'compute/workload_partitioning' : value => 'True';
}
} else {
$coordination_url = undef
}

class { '::ceilometer':
metering_secret => $metering_secret,
debug => $openstack_verbose,
verbose => $openstack_debug,
rabbit_hosts => $openstack_rabbit_servers,
rpc_backend => 'rabbit',
} ->

class { '::ceilometer::db':
database_connection => $mongo_connection
}->
class { '::ceilometer::agent::auth':
auth_url => $auth_url,
auth_password => $auth_password,
auth_tenant_name => $auth_tenant_name,
auth_user => $auth_username,
}
->
class { '::ceilometer::collector': } ->
file { '/etc/ceilometer/pipeline.yaml':
ensure => file,
content => template('contrail/pipeline.yaml.erb'),
} ->
class { '::ceilometer::agent::central':
coordination_url => $coordination_url
}
if $::osfamily != 'Debian' {
class { '::ceilometer::alarm::notifier': }
class { '::ceilometer::alarm::evaluator': }
}

if (internal_vip!='') {
Contrail::Lib::Augeas_conf_rm['ceilometer_rpc_backend']->
ceilometer_config {
'notification/workload_partitioning' : value => 'True';
'compute/workload_partitioning' : value => 'True';
}
}
class { '::ceilometer::agent::auth':
auth_url => $auth_url,
auth_password => $auth_password,
auth_tenant_name => $auth_tenant_name,
auth_user => $auth_username,
}
class { '::ceilometer::db':
database_connection => $mongo_connection
}
class { '::ceilometer::api':
enabled => true,
keystone_host => $controller_mgmt_address,
keystone_password => $ceilometer_password,
}
class { '::ceilometer::collector': }

contrail::lib::augeas_conf_rm { "ceilometer_rpc_backend":
key => 'rpc_backend',
config_file => '/etc/ceilometer/ceilometer.conf',
lens_to_use => 'properties.lns',
match_value => 'ceilometer.openstack.common.rpc.impl_kombu',
if $::osfamily != 'Debian' {
class { '::ceilometer::alarm::notifier':
} ->
class { '::ceilometer::alarm::evaluator':
coordination_url => $coordination_url
}
}

}

0 comments on commit a951d15

Please sign in to comment.