Remove all 'validate_array' statements
authorJaume Devesa <devvesa@gmail.com>
Fri, 27 Nov 2015 11:44:05 +0000 (12:44 +0100)
committerJaume Devesa <devvesa@gmail.com>
Fri, 11 Dec 2015 11:46:53 +0000 (11:46 +0000)
Unfortunately, some distributions like CentOS 7 (I guess RedHat 7 as
well) still using puppet < 3.7, which experience the annoying 'PUP-1299'
bug:

https://tickets.puppetlabs.com/browse/PUP-1299

So passing a single array element, it magically transforms to a string
(or whatever the inside elements are) and the validate_array fails. We
need to get rid of these validations.

Change-Id: Icc22ee575b7c236d1a6358f8593cf813d339a4b5

manifests/cluster/cassandra.pp
manifests/cluster/zookeeper.pp
manifests/network/midonet/agent.pp
manifests/network/midonet/api.pp

index a810ccd..39e6e5e 100644 (file)
@@ -52,7 +52,12 @@ class tripleo::cluster::cassandra(
   $client_port_thrift = '9160'
 )
 {
-  validate_array($cassandra_servers)
+
+  # TODO: Remove this comment once we can guarantee that all the distros
+  # deploying TripleO use Puppet > 3.7 because of this bug:
+  # https://tickets.puppetlabs.com/browse/PUP-1299
+  #
+  # validate_array($cassandra_servers)
   validate_ipv4_address($cassandra_ip)
 
   class {'::cassandra::run':
index 6f4adbc..82d21ee 100644 (file)
@@ -39,9 +39,13 @@ class tripleo::cluster::zookeeper(
   $zookeeper_hostnames
 )
 {
-  validate_array($zookeeper_server_ips)
+  # TODO: Remove comments below once we can guarantee that all the distros
+  # deploying TripleO use Puppet > 3.7 because of this bug:
+  # https://tickets.puppetlabs.com/browse/PUP-1299
+
+  # validate_array($zookeeper_server_ips)
   validate_ipv4_address($zookeeper_client_ip)
-  validate_array($zookeeper_hostnames)
+  validate_array($zookeeper_hostnames)
 
   # TODO(devvesa) Zookeeper package should provide these paths,
   # remove this lines as soon as it will.
index 2f1da94..0e65282 100644 (file)
@@ -33,8 +33,13 @@ class tripleo::network::midonet::agent (
   $cassandra_seeds
 ) {
 
-  validate_array($zookeeper_servers)
-  validate_array($cassandra_seeds)
+  # TODO: Remove comments below once we can guarantee that all the distros
+  # deploying TripleO use Puppet > 3.7 because of this bug:
+  # https://tickets.puppetlabs.com/browse/PUP-1299
+
+  # validate_array($zookeeper_servers)
+  # validate_array($cassandra_seeds)
+
 
   # FIXME: This statement should be controlled by hiera on heat templates
   # project
index 33b2217..83efd2c 100644 (file)
@@ -78,7 +78,12 @@ class tripleo::network::midonet::api(
   $admin_tenant_name     = 'admin'
 )
 {
-  validate_array($zookeeper_servers)
+
+  # TODO: Remove this comment once we can guarantee that all the distros
+  # deploying TripleO use Puppet > 3.7 because of this bug:
+  # https://tickets.puppetlabs.com/browse/PUP-1299
+
+  # validate_array($zookeeper_servers)
   validate_ip_address($vip)
   validate_ip_address($keystone_ip)
   validate_ip_address($bind_address)