Skip to content

Commit

Permalink
Closes-Bug: #1644490 - Ceilometer meter-list issue fixed
Browse files Browse the repository at this point in the history
The meter-list and sample-list were not showing up.
The ceilometer.conf was changed to match fab based provision.
service_credentials section has new params os_auth_url and os_tenant_name.
Also new resource ceilometer::agent::notification was brought in.
This change was verified for Keystone V2 but doesnt seem to work with V3.0

Change-Id: I086d125153a20ac234d9d25d72047472f58d173e
  • Loading branch information
nitishkrishna committed Dec 22, 2016
1 parent d255daa commit 6ed0d4c
Showing 1 changed file with 31 additions and 2 deletions.
Expand Up @@ -17,6 +17,8 @@
$package_sku = $::contrail::params::package_sku,
$ceilometer_password = $::contrail::params::os_ceilometer_password,
$openstack_rabbit_servers = $::contrail::params::openstack_rabbit_hosts,
$openstack_rabbit_server_to_use = $::contrail::params::openstack_rabbit_server_to_use,
$openstack_rabbit_port = $::contrail::params::rabbit_port_real,
$controller_mgmt_address = $::contrail::params::os_controller_mgmt_address,
$keystone_ip_to_use = $::contrail::params::keystone_ip_to_use,
$rabbit_use_ssl = $::contrail::params::os_amqp_ssl,
Expand All @@ -28,9 +30,12 @@
$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/${keystone_version}"
$auth_uri = "http://${keystone_ip_to_use}:5000"
$auth_password = $ceilometer_password
$auth_tenant_name = 'services'
$auth_username = 'ceilometer'
$rabbit_password = 'guest'
$telemetry_secret = $metering_secret
if (internal_vip!='') {
$coordination_url = join(["kazoo://", $database_ip_to_use, ':2181'])
Class['::ceilometer']->
Expand All @@ -42,6 +47,12 @@
$coordination_url = undef
}

if ($keystone_version == "v3" ) {
$domain_name = 'Default'
} else {
$domain_name = ''
}

class { '::ceilometer::db':
database_connection => $mongo_connection,
sync_db => $sync_db
Expand All @@ -51,22 +62,37 @@
metering_secret => $metering_secret,
debug => $openstack_verbose,
verbose => $openstack_debug,
rabbit_hosts => $openstack_rabbit_servers,
rabbit_host => $openstack_rabbit_server_to_use,
rabbit_port => $openstack_rabbit_port,
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,
rpc_backend => 'rabbit'
rpc_backend => 'rabbit',
rabbit_password => $rabbit_password
} ->
ceilometer_config {
'database/time_to_live' : value => '7200';
'publisher/telemetry_secret' : value => $metering_secret;
'DEFAULT/auth_strategy' : value => 'keystone';
'service_credentials/os_auth_url' : value => $auth_url;
'service_credentials/os_username' : value => $auth_username;
'service_credentials/os_password' : value => $auth_password;
'service_credentials/os_tenant_name' : value => $auth_tenant_name;
} ->
class { '::ceilometer::agent::auth':
auth_url => $auth_url,
auth_password => $auth_password,
auth_tenant_name => $auth_tenant_name,
auth_user => $auth_username,
auth_project_domain_name => $domain_name,
auth_user_domain_name => $domain_name
} ->
class { '::ceilometer::agent::central':
coordination_url => $coordination_url
}
class { '::ceilometer::agent::notification':
}

# NOTE: Added a ordering here, creates dependcy cycle for HA case.
class { '::ceilometer::collector': } ->
Expand All @@ -81,14 +107,17 @@
enabled => true,
keystone_auth_uri => $auth_url,
keystone_password => $ceilometer_password,
keystone_tenant => $auth_tenant_name,
}
}

default: {
class { '::ceilometer::api':
enabled => true,
auth_uri => $auth_uri,
keystone_host => $keystone_ip_to_use,
keystone_password => $ceilometer_password,
keystone_tenant => $auth_tenant_name,
}
}
}
Expand Down

0 comments on commit 6ed0d4c

Please sign in to comment.