Remove mostly empty directories

The os-apply-config and os-config-applier directories are empty other
than 1 hidden file in each. This appears to be the case just so that
they will exist when the rsync commands run to install the templates
into the image. It's possible the directories won't exist otherwise if
no elements provided any templates.

Instead of using empty directories and hidden files to force them to
exist in git, just check for the existence of each directory before
running the rsync commands.

Change-Id: I0f286a28601c292b5f70258747def36a08d93a87
Fix tgt target in cinder element

The package install version creates a file at /etc/tgt/conf.d/cinder.conf
and the cinder element has been adding an additional file. This would have
the effect of the source install working properly, but the package install
would end up creating volumes in /etc/cinder/volume instead of /mnt/state.

This patch changes the tgt target to be written to the existing file to
bring both the source and package installs to behave the same.

Change-Id: Ieeaa9518d6ed50595fbd70f1bbf0a17e3b5b1894
Fix horizon local_settings.py
No neutron db manage upgrade head
Create and use libvirtd group for package install

For the nova-kvm package install, we need to create the libvirtd group
and add the nova user to the group. This is because the element now uses
its own libvirtd.conf which is configured to use the libvirtd group.

Change-Id: Ic345b76a17ff75b468da8a493c6bf856d730a586
Remove swift container sync service

It is not required and the service definition file is not provided
in the Fedora openstack-swift-container package.

Change-Id: Ie10152e054eb1e3ffe5ce9a3f910577207606fea
Factor out tgt-specific parts of cinder element

RHEL is only going to support the lio iscsi helper, so the tgt
parts of the element are not going to work there.  A subsequent
change will add a corresponding cinder-lio element to support that.

When this merges, the corresponding change to tripleo-incubator in
I1e33af0cb78fa9477bc5a0b9b89b06b907b81fae must merge as well to
prevent breakage of devtest.

Change-Id: Ic032204076adfa0d30b09423f2a46b587e07400d
Cinder conf patch
Update keystone's selinux policies

Allow openssl to read keystone ssl files.

Move /mnt/state directory creation to configure.d.

Change-Id: I75ccbaf3fa4efde1c48340de7c63efa30652e3e0
Update neutron's selinux policies

Allow neutron permission to /mnt/state and /var/run.

Move directory creation from post-configure.d to configure.d.

Change-Id: Ia4ea5b84bbbe69b6d2e72a5b4d7a691d5213bdfa
Update glance's selinux policies

Also moved directory creation from post-configure.d
to configure.d

Change-Id: Ic7fc2a3b053efeb4ccfc3d97b94a5a3d8d88a1bd
Update nova's selinux policies

Nova needs permissions to /mnt/state/var/lib/nova and
/mnt/state/var/log/nova.

Change-Id: Ie1f23d5d11b725c77648b15ad0738f30ada36a83
Update swift's selinux policies

Allow swift permission to /mnt/state/var/cache/swift.
Allow rsync to write to /mnt/state/var/log/rsyncd.log.

Move directory creation from post-configure.d to configure.d.

Change-Id: I9c8730be8d880229ec3224690f46406d55b2e8e1
Allow install mariadb from RDO repository

Adds elements which allow installing mariadb from RDO repository.
It's similar to mariadb element but different repo with different
package names are used (also some installation steps might be removed
in future).

Common code for mariadb and mariadb-rdo is now in mariadb-common element.

Change-Id: I8566b03a24fff7984f323442d93249e1002a6ebe
Make innodb pool size configurable

Alows configuring of buffer pool size and decreases default
value to 100MB.

For VMs with 2G RAM is 592MB buffer too big. Then you can hit
an issue that openstack requests fail because there is not
enough memory to spawn new process or mysql server restart fails
for because it fails to allocate 592MB buffer.

Change-Id: I9126c090d3d4cd03cb93735a2b0c54fa250eed61
Fix /var/lib/mysql selinux labeling

/var/lib/mysql is currently set to var_lib_t and should be
mysqld_db_t. restorecon will fix the file context.

Change-Id: Idf613fc0b9e1d218061057c0dad29929aded38bd
Fix rabbitmq-server selinux labeling

/mnt/state/var/lib/rabbitmq should be labeled as rabbitmq_var_lib_t
and not var_lib_t.
/mnt/state/var/log/rabbitmq should be labeled as rabbitmq_var_log_t
and not var_log_t.

Create /mnt/state/var/log/rabbitmq directory in pre-configure.d
so that it can be labeled before rabbitmq-server is started.

Change-Id: Ifaee9755a58c514003e1c35e73f7b9a91854046f
Ability to change default swift ports

The configuration and os-refresh-config scripts have been updated
to allow the swift ports to be changed through heat metadata.

This change is needed by Fedora based distributions running in SELinux
enforcing mode.  The SELinux policies allow swift to bind to ports
6201-6203 which is different from the default 6000-6002. The reason
the policies could not be updated to allow ports 6000-6002, is because
that range overlaps with xserver.

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

Related to Id27034a641dbc27a88b70da47b0353be4694819c

Change-Id: I44404eff352e0527e7d0d01493a7b1b7ce4a52e5

Conflicts:
	elements/swift-storage/os-config-applier/etc/swift/account-server.conf
	elements/swift-storage/os-config-applier/etc/swift/container-server.conf
	elements/swift-storage/os-config-applier/etc/swift/object-server.conf
	elements/swift/os-refresh-config/configure.d/73-swift
Move rabbitmq-server cluster port

The Fedora rabbitmq-server package requires an ephemeral port to be
used. Otherwise the service will fail to start if selinux is in enforcing
mode.

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

This patch moves the cluster port from 5535 to 61000. Port 61000 is
also reserved through sysctl by setting it as the value for
ip_local_reserved_ports.

Change-Id: I95a5bd48afea179273044c338d73d9c2dbb884a0

Conflicts:
	elements/rabbitmq-server/element-deps
	elements/rabbitmq-server/install.d/20-rabbitmq-server
	elements/rabbitmq-server/os-apply-config/etc/rabbitmq/rabbitmq.config