3 Commits

Author SHA1 Message Date
Paul Belanger
84a0f2dd5b Make sure /etc/hostname is valid for SELinux
In the gate, it is possible for /etc/hostname to not have a valid
SELinux security conext. So, reset them to default before we update
the hostname to avoid:

  TASK: [Assign hostname]
  failed: [node1] => {"failed": true}
  msg: Command failed rc=1, out=, err=Could not set property: Access
  denied

Closes-Bug: #1568047
Change-Id: Ie30c8437b310d1ea5bc75307375c255131dfe934
Needed-By: I2ff5fbb315832b8cf07c93d0dd0cdaacd958631e
2016-04-11 15:38:04 +00:00
Steven Dake
a789346727 Fix gate to use world writeable docker socket
A recent change related to sudo securepath broke how sudo -E
works.  Now the PATH is reset by sudo as set by tox.  As a result
we can no longer rely on sudo -E anywhere in our gating system
relating to path inheritence from the parent shell.

This patch uses a shell operation in the setup_nodes.yml code
to chmod the docker socket to 666 so docker containers can build
properly.  Now docker operations don't return a permission denied
and we no longer require the sudo -E operation in any of our tox
scripts.  This isn't a security vulnerability because our gate
scripts are only meant to be run in OpenStack infrastructure.
To make this more clear I recommend moving these shell scripts to
tests/gate.

Change-Id: I5b3d6e280e3c12a25defedb14b5589ba642043fa
Closes-Bug: #1562383
2016-03-26 22:23:35 -07:00
SamYaple
6adb5c0aa5 Convert gate to file backend rather than partition
The existing gate partitioned a disk for use with docker, depending
on the gate it would use the swap disk (RAX) or a spare disk (HP).
However, with the new gates (Bluebox + OVH) there is neither a spare
disk nor a swap disk. This leaves us with one choice: File based loop
device.

This patch creates a file at /swapfile to ensure we have swap. It
creates a file at /docker to ensure we have a loop device for Docker.

Right now the /docker file is 10GB and the /swapfile is 4GB due to
size limitations in the gate across all servers and types. This has
proven to be enough space for all our current tests.

Additionally, reduce the number of threads the gate uses to 4 to
prevent the lockup and hour timeout we have been seeing as more
recently in the gate.

The scripts that setup the gate are moved to the tools directory
rather than the tests directory to match the structure of the other
projects.

Partially-Implements: blueprint functional-testing-gate

Change-Id: I3e370f2382b6df36103d8b2ceda9b21d9b4229d5
2016-01-21 22:59:13 +00:00