]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commit
Update mysql allowed_hosts conditional statement
authorXingchao Yu <xingchao@unitedstack.com>
Sun, 4 Aug 2013 09:09:06 +0000 (17:09 +0800)
committerXingchao Yu <xingchao@unitedstack.com>
Sun, 4 Aug 2013 09:38:44 +0000 (17:38 +0800)
commit10107796ff2751da858a4616f97e6e3166ec40a8
tree92cb6560183af82e13ce5bdcc1e50ffdf9480a6d
parent9b17b8dadc7ce6b1e1042e1748f945d3f32b5ff0
Update mysql allowed_hosts conditional statement

In the origin ceilometer::db::mysql, if the value of $allowed_hosts
contains or equals to $host, then puppet will complain duplicate
declaration error. This patch is aim to update the allowed_hosts
conditonal statement in ceilometer::db::mysql.

There are two cases to pass $allowed_hosts to $real_allowed_hosts:

   - If $allowed_hosts is array,then remove $host from $allowed_hosts;
   - elsif $allowed_hosts is string and not equivalent to $host;

At last, if $real_allowed_hosts is not undef, then run
ceilometer::db::mysql::host_access

Fix bug 1206444

Change-Id: Ib6c33e6a27113d01326bee32c105fea4003059ce
manifests/db/mysql.pp
spec/classes/ceilometer_db_mysql_spec.rb