13 Commits

Author SHA1 Message Date
Jenkins
d89ba57f59 Merge "Make sure we bind the rabbit inter-cluster to a specific interface" 2017-01-25 02:29:17 +00:00
Dan Prince
a3de7c0942 Add a noop_resource function
A function to create noop providers (set as the default) for the named
resource. This works alongside of 'puppet apply --tags' to disable
some custom resource types that still attempt to run commands during
prefetch, etc.

Change-Id: Icabdb30369c8ca15e77d169dc441bee8cfd3631f
2017-01-20 20:14:32 -05:00
Michele Baldessari
2f038b30e8 Make sure we bind the rabbit inter-cluster to a specific interface
Currently the inter-cluster communication port listens to all ip
addresses:
tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN 25631/beam.smp

In order to limit it to listen only to the network assigned to rabbitmq
we need to add the following:
{kernel, [
    ...
    {inet_dist_use_interface, {172,17,0,16}},
    ...
  ]}

In order to do the conversion from an ip address to the Erlang
representation we add a function that takes a string and returns a
converted output. The (~400 randomly generated) IPv6/4 addresses at [1]
have been parsed both via erl's built-in inet:parse_address() function
and our ruby implementation. All converted ip addresses resulted in the
same output [2], [3]. The only difference is that Erlang's parse_address()
considers network ip addresses (e.g. 10.0.0.0) invalid whereas the ruby
function does not. This should not be a problem as the use case here is
to bind a service to a specific ip address on an interface and if
anything we likely prefer the less strict behaviour, given that at least
in theory it is perfectly valid for an interface to have a network
address assigned to it.

[1] http://acksyn.org/files/tripleo/ip-addresses.txt
[2] http://acksyn.org/files/tripleo/ip-addresses-ruby.txt
[3] http://acksyn.org/files/tripleo/ip-addresses-erl.txt
Change-Id: I211c75b9bab25c545bcc7f90f34edebc92bba788
Partial-Bug: #1645898
2017-01-20 08:41:22 +01:00
Steven Hardy
4b006b7c32 Convert ringbuilder to build devices array
Currently we have some hard-coded mangling in t-h-t but we
instead need to build the array based on the nodes running swift
storage, combined with the SwiftRawDisks parameter.

This will enable running SwiftStorage on nodes other than Controller
and SwiftStorage roles, and is required for custom-roles due to
the hard-coded stuff in the role templates and overcloud.yaml

Change-Id: I11deed1df712ecccf85d36a75b3bd2e9d226af36
Partially-Implements: blueprint custom-roles
2016-09-02 17:22:48 +02:00
Giulio Fidente
4e5ebf3ad8 Add lookup_hiera_hash function
The lookup_hiera_hash function is meant to lookup for the value
of a given key from a given Hiera hash. In the manifests this is
possible by saving the value of the hash in a variable first but
when driving lookups from the Heat templates we can't do it.

Change-Id: Ie31bb70314db44a0a18e86090cc74aa4df5de169
2016-05-25 23:55:44 +02:00
Emilien Macchi
f9c33aeb81 IPv6 dual-stack support
TL;DR:
If keystone_public_api_vip and/or public_virtual_ip is an array of IPs,
HAproxy will be configured to listen on all IPs that are given in the
arrays.
It allows to specify an array for keystone_public_api_vip and/or
public_virtual_ip where one IP is v4 and another one is v6.
HAproxy will configured to listen on both and redirect the traffic to
the IPv6 network (Dual-Stack).

Implementation & background:
HAproxy requires binding options as an hash where each IP contains an
array of binding options.
TripleO does not support Puppet Parser [1] (yet) so we can't manipulate
data iterations inside the manifests.
This patch creates a custom function, called list_to_hash.

Example:
keystone_vips = ['192.168.0.1:5000', '192.168.0.2:5000']
$keystone_bind_opts = ['transparent']

Using this function:
$keystone_vips_hash = list_to_hash($keystone_vips,
$keystone_bind_opts)

Would return:
$keystone_vips_hash = {
  '192.168.0.1:5000' => ['transparent'],
  '192.168.0.2:5000' => ['transparent'],
}

This function will help us in loadbalancer.pp to construct binding
options in dynamic way.
It's backward compatible, so you don't have to give an array.
But if you do, multiple binding will be configured in HAproxy and you'll
also be able to deploy IPv6 Dual-Stack.

[1] https://docs.puppetlabs.com/puppet/latest/reference/lang_iteration.html

Change-Id: I003b6d7d171652654745861d4231882f9e0d373e
2016-04-19 14:36:38 +00:00
Gilles Dubreuil
11a0619a29 Adds IPv6 support for interface_for_ip function
Proper interface matching when an IPv6 address is provided.

If Facter version used is < 3 then it adds the netmask6 facts as custom facts.

Fix bugs https://bugzilla.redhat.com/show_bug.cgi?id=1280523

Change-Id: Ide26ca1740dc12ea5f47a28f4cecacd6ef0b18f9
2015-12-15 17:07:57 +11:00
Jaume Devesa
6021323d41 Remove validate_ip_address validator.
It is already merged on the puppetlabs-stdlib module:

88a9a314c3

And we don't need to carry with this validation anymore.

Change-Id: I2cee12e7601c546e616e2c249157e7739af29490
2015-12-01 11:26:11 +01:00
Jaume Devesa
95c87ea79b MidoNet services manifests
Provide TripleO overcloud manifests to deploy MidoNet and the cluster
services that needs to run.

Change-Id: I24f852e74fc4652d4609e1a71897e813448055fe
2015-11-23 11:53:07 +01:00
Dan Prince
e3abcd6b53 Add package_manifest resource.
This patch converts the write_package_names function into
a proper resource. Using the write_package_names only works
if the function comes last in the puppet manifest. By
making the same functionality a custom resource we allow
for it to exist anywhere in the manifest and provide the
same functionality.

 The new syntax would be:

 package_manifest{'/tmp/foo': ensure => present}

Co-Authored-By: Martin Mágr <mmagr@redhat.com>
Change-Id: If3e03b1983fed47082fac8ce63f975557dbc503c
2015-09-03 11:35:25 +02:00
Dan Prince
9f066c60f3 Add a function to write package names
This function writes out package names that have been
defined in a given puppet catalog.

In order to work this should be place last (or very late)
in a manifest to ensure it picks up packages.

Change-Id: Ie21b5bf7df71337da02ea43915dc4e70d3052bb7
2015-06-25 14:23:11 -04:00
Jiri Stransky
9793b3c972 Configure fencing devices
Adds a class to configure fence devices and a helper function which
helps to select the devices for configuration on appropriate nodes.

Depends on patches outside OpenStack's Gerrit:
https://github.com/redhat-openstack/puppet-pacemaker/pull/50
https://github.com/redhat-openstack/puppet-pacemaker/pull/52

Change-Id: I819fc8c126ec47cd207c59b3dcf92ff699649c5a
2015-06-12 18:40:50 +02:00
Dan Prince
10ac6980f9 Add interface_for_ip function
This patch adds a custom Puppet function called interface_for_ip
This function will be used within the TripleO puppet implementation
to help obtain the correct interface for a given IP address.

Change-Id: I0979f69a49052fda888277fa64ebeadc038bc778
2015-06-03 10:51:29 -04:00