BZ #1043964 - Fix to move neutron setup after db setup.

https://bugzilla.redhat.com/show_bug.cgi?id=1043964

The 'neutron-db-manage upgrade' command was failing on first runs of puppet
agent due to a race condition where the database was not necessarily created
before this command was run.  The order matters, so we have now specified this
more precisely.

(cherry picked from commit 776c4889ef4eb19bfb4a4692050acda6f0ff2dc9)
BZ #1045137 - Ensure physical ports added to ovs bridge on networker.

https://bugzilla.redhat.com/show_bug.cgi?id=1045137

Move configuration of bridge and ports to the bridge_uplinks parameter
of the ::neutron::agents::ovs declaration in networker.pp.

Example value for the ovs_bride_uplinks parameter in networker.pp:
["br-em2:em2","br-p3p1:p3p1"]
(cherry picked from commit 81899980d02040446bc958a2896f9c5f67fc80f1)
BZ #1045132 - l3 external_network_bridge now configurable.

https://bugzilla.redhat.com/show_bug.cgi?id=1045132

$external_network_bridge is used to configure the external_network_bridge
in /etc/neutron/l3_agent.ini .  Set to '' to use a provider
network instead.
(cherry picked from commit 7a7fe553e025dfe2c70b8e283657fb1d63cfdab1)
Enable selinux boolean virt_use_fusefs on compute nodes

See https://bugzilla.redhat.com/show_bug.cgi?id=1015625

(cherry picked from commit 017fbc5eb535d2ceefb315fcb59d23fe4a473830)
BZ#1015625 - fail to attach a volume on glusterfs install because of selinux
https://bugzilla.redhat.com/show_bug.cgi?id=1015625

Set virt_use_fusefs true if selinux is enabled

(cherry picked from commit b10bdaca7ef4ea52cc1b304a45607adef07dbfa8)
BZ #1046120 - Unused parameter bridge_keep_ip in Neutron Networker

https://bugzilla.redhat.com/show_bug.cgi?id=1046120

Removed unused parameter from the networker.pp manifest.

(cherry picked from commit ad50e2b8d331bb4f024bfd5c03f9457a0e67b2fc)
BZ #1049688 - Quickstack manifest parameter renaming.

https://bugzilla.redhat.com/show_bug.cgi?id=1049688

Update some parameter names to be more meaningful.  Remove some unused
parameters.  Remove PRIVATE_/PUBLIC_ foreman_server.sh environment
vars.

(cherry picked from commit f00baed1a4195e2ca3762e0c7bcf0871a3c19121)
BZ #1050182 - remove the Gluster Storage Host Group.

https://bugzilla.redhat.com/show_bug.cgi?id=1050182

Remove the Gluster Storage Host Group -- Foreman is not responsible
for managing gluster back ends.

(cherry picked from commit b14c1642bd125f2802f43fbad508a386e0107877)
BZ #1048922 Package name cannot have array

https://bugzilla.redhat.com/show_bug.cgi?id=1048922

Puppet 3.4 doesn't allow array values for `name` attribute of
`package` resource. We need to specify them one by one.

(cherry picked from commit b93ee0158d8de87591e24a3663ecde5023fad531)
BZ#1047653 Cinder LVM setup broken

Accept gluster backend parameters into lvm_cinder.pp and make sure
that we use str2bool function when testing parameters that are
"boolean strings".

(cherry picked from commit 2a277cf0ab16ce4ae61c8f3f5f996f14a7adf425)
BZ #1053729 - Foreman controller params should end with _host instead of _ip.

https://bugzilla.redhat.com/show_bug.cgi?id=1053729

Rename controller_pub_ip and controller_priv_ip Foreman Host Group
parameters to more agnostic controller_pub_host or
controller_priv_host-- more agnostic because the user may enter a
hostname or an IP address for those values.

(cherry picked from commit de4323082340e4b5476344abbf387b4d11c49f4f)
BZ #1054181 - Set OS description consistently, install LSB

https://bugzilla.redhat.com/show_bug.cgi?id=1054181

OS descriptions are filled in by LSB, which relies on lsb_release (supplied by
redhat-lsb-core).  On RHEL, they usually contain the variant string "Server",
so also update the description we preset to match that supplied by lsb_release.

(cherry picked from commit 7e43d73c9ea51ef45fbfab2f8f867444005fad75)
BZ #1052408 - HA Mysql manifest: allow creation of neutron db user.

https://bugzilla.redhat.com/show_bug.cgi?id=1052408

Add parameters to allow (optionally) the creation of the neutron db
user and set its db password.  Also switch to str2bool_i
from str2bool.

(cherry picked from commit 0e7f230d1ac015ddf9697f582919b0b2d1adbe68)
Add case-insensitive str2bool function and use it

The source is taken from the original [1], but case-insensitivity flag
is added to the regexes used.

[1] https://github.com/puppetlabs/puppetlabs-stdlib/blob/2c8450d830453e452b819bfb05678768336c3031/lib/puppet/parser/functions/str2bool.rb

(cherry picked from commit ae4ec8ab402ca76e87af96707a761801af0f2faa)
BZ #1055852 - HTTP 500 Error using Neutron metadata agent

https://bugzilla.redhat.com/show_bug.cgi?id=1055852

metadata agent was using admin password instead of neutron user password

(cherry picked from commit cefe430dbc8e66f37be11aaa35d86a7a91916f1c)
bz 1059417,1056892 -- Handle interface names containing "."

https://bugzilla.redhat.com/show_bug.cgi?id=1056892
https://bugzilla.redhat.com/show_bug.cgi?id=1059417

This fixes problems with VLAN interfaces in astapor by calling
regsubst() to replace "." with "_" in interface names when looking up
ipaddress_* facts.

(cherry picked from commit 78619f4ab0b73f4555a92b2c2b4914b6fa5f8dc5)
BZ #1049633 - Foreman should support VXLAN

https://bugzilla.redhat.com/show_bug.cgi?id=1049633

There are 2 new parameters needed by puppet-neutron for ovs agent/plugin support
for vxlan.  This patch adds those and opens the specified udp port on the
firewall.

(cherry picked from commit 288f97a86676ca29f2858f403e426f3f277d0357)
BZ #1017281 - Add support for ML2 Core Plugin.

https://bugzilla.redhat.com/show_bug.cgi?id=1017281

The ml2 code in puppet-neutron seems a bit buggy, so this currently includes
some workarounds, like installing the ml2 package [1], which puppet-neutron
should do.  There also is some extra work required to do the configuration for
the mechanism_drivers, which seem to require installation of their related
packages as well, to get the right configuration files.

[1] Fixed upstream in https://review.openstack.org/#/c/66413/

(cherry picked from commit 80ed412c1ad7821a36c3740abc4b197a7fd515b0)
BZ #1056055 --  [RFE] create cinder-volumes VG backed by a loopback file

https://bugzilla.redhat.com/show_bug.cgi?id=1056055

The default behavior most customers expect for small to medium installations
is to run cinder-volume on the controller node. Packstack does this but
Foreman only allows a dedicated storage backend backed by iSCSI or RHS.
This patch deploys cinder-volume on the Nova or Neutron controller node if
cinder_backend_{iscsi,gluster} are both set to false. It will detect a VG
named cinder-volumes (whether backed by an iSCSI target or loopback device)
and share it via tgtd. The user must create the VG, which is also the case
with the cinder_backend_iscsi parameter for the LVM backend storage group. In
a sense this patch replicates functionality customers expect from packstack.
I tested it against the RHEL OSP 01.31.2014-1 puddle for both iSCSI and LVM
backed Cinder from the controller node.

(cherry picked from commit 8599024a351912939c8327f011beafcf5b1144b6)
BZ #1062664 - Configure qpid_hostname for Controller host groups

https://bugzilla.redhat.com/show_bug.cgi?id=1062664

The default controller common manifest assumes that qpid is
running locally on the hypervisor. This may or may not be the case
and therefore it should take the '$qpid_host' parameter used within
other manifests. Without this change, Nova attempts to use
localhost as it's qpid broker, which obviously breaks if using
multiple controller hosts.

(cherry picked from commit 027b0c5a06bc56bd60070703ce1a9b2ce974c29f)