Make ceilometer hardware meters work out of the box

Although we were configuring the ceilometer hardware section on the
undercloud, none of the hardware meters were showing up in
ceilometer.  There are a couple of reasons for this:

1) The auto-generated readonly SNMP username was too long.  It seems
   to have a limit of 32 characters, and we default to generating
   a 40 character value.
2) The generated SNMP username wasn't automatically passed to the
   overcloud template, so by default the overcloud was deploying
   with an SNMP user named ro_snmp_user, regardless of what was
   configured on the undercloud.

To address these issues, this change sets the default SNMP user
to ro_snmp_user so it is not necessary to pass it as a parameter
in a default install.  It also makes a note of the length
restrictions on custom values.

Change-Id: I99768fd402a13056adef7fdafd8568ff5f08d1a1
(cherry picked from commit 00dd8c82de)
This commit is contained in:
Ben Nemec 2015-11-06 22:06:08 +00:00 committed by Ben Nemec
parent dd2f653a34
commit 874d11bf64
2 changed files with 11 additions and 5 deletions

View File

@ -232,8 +232,12 @@ _auth_opts = [
'If left unset, one will be automatically generated.')
),
cfg.StrOpt('undercloud_ceilometer_snmpd_user',
help=('Ceilometer snmpd user. '
'If left unset, one will be automatically generated.')
default='ro_snmp_user',
help=('Ceilometer snmpd read-only user. If this value is '
'changed from the default, the new value must be passed '
'in the overcloud environment as the parameter '
'SnmpdReadonlyUserName. This value must be between '
'1 and 32 characters long.')
),
cfg.StrOpt('undercloud_ceilometer_snmpd_password',
help=('Ceilometer snmpd password. '

View File

@ -141,9 +141,11 @@
# generated. (string value)
#undercloud_ceilometer_metering_secret = <None>
# Ceilometer snmpd user. If left unset, one will be automatically
# generated. (string value)
#undercloud_ceilometer_snmpd_user = <None>
# Ceilometer snmpd read-only user. If this value is changed from the
# default, the new value must be passed in the overcloud environment
# as the parameter SnmpdReadonlyUserName. This value must be between 1
# and 32 characters long. (string value)
#undercloud_ceilometer_snmpd_user = ro_snmp_user
# Ceilometer snmpd password. If left unset, one will be automatically
# generated. (string value)