896 Commits

Author SHA1 Message Date
Zuul
435b460942 Merge "Thread pools should be based on processor counts" 2018-08-25 16:20:51 +00:00
Zuul
eab48e1eca Merge "MNAIO: Compress the disk image when saving it" 2018-08-25 16:14:15 +00:00
Zuul
b63e8ff898 Merge "MNAIO: Use discard option for all mount points" 2018-08-25 16:14:15 +00:00
Zuul
320bc1f647 Merge "MNAIO: Move to using SCSI controller for TRIM support" 2018-08-25 16:14:14 +00:00
Zuul
4cfa961cd4 Merge "MNAIO: Clean up existing data when switching backing store" 2018-08-25 16:14:14 +00:00
Kevin Carter
ce9007cda5
Thread pools should be based on processor counts
The current setup was using processor cores from ansible facts which in
a multi-core, single socket system could result in 1. Using the
processor count will return the logical processor count giving us a more
performant setup when the compute power is present.

Change-Id: Ia5b63d45691f58e848d05cc4a4e5f353b993a347
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-25 01:51:16 -05:00
Kevin Carter
42603ab112
When collecting KVM data use a local connection
The KVM collector would attempt to use a network connection which
normally results in failure. This changes the collector to use a file
system socket by default.

Change-Id: Id1698a95644c6a6d5102e371a7266794196393c8
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-25 00:02:00 -05:00
Jesse Pretorius
c72cc198c4 MNAIO: Compress the disk image when saving it
When we save the VM disks, we now use compression to prepare
the base disk so that it reduces the base disk file sizes to
a much smaller base. For the infra hosts this reduces the file
from ~23GB to ~8GB. Once this is done, we then also create a
copy-on-write image in the original disk's place so that the
VM can be booted up to verify functionality or continue work
without having to re-run the 'deploy-vms' playbook.

Change-Id: If95b71d8625b4d5b2a036cec13952e4fd73cecd4
2018-08-24 14:07:38 +01:00
Jesse Pretorius
42189e272f MNAIO: Use discard option for all mount points
Using the discard option for all mount points ensures
that the deletes actually release the blocks on the disk.
This ensures that SSD performance is optimised and that
file-backed images are kept as small as possible.

Change-Id: I648cbaca56d75e355cf6c8af01e2e3ad20dfc398
2018-08-23 18:57:02 +01:00
Jesse Pretorius
f3575be76a MNAIO: Move to using SCSI controller for TRIM support
When using file-backed storage, or SSD storage, any erasing
done in the VM does not actually clear up the space. By using
the virtio-scsi controller the VM is able to use TRIM to clear
any blocks which are deleted.

This also allows us to use fstrim to reduce the size of the
qemu files before we save them for later re-use.

Change-Id: Ia9001522ce054ee9f8a6dd38270da3e3fd039813
2018-08-23 13:53:20 +01:00
Jesse Pretorius
c556bea0d7 MNAIO: Clean up existing data when switching backing store
When switching from LVM to a file backing store, the existing pool
cannot be undefined until any existing VM's and LV's are removed.

This ensures that if this is the case, it will be cleaned up so
that the switch is effortless.

Change-Id: Ie1460b37593306044f0a63f445c3da1987362d34
2018-08-23 10:23:07 +01:00
Zuul
782a884c55 Merge "import zuul job settings from project-config" 2018-08-23 03:01:14 +00:00
Jesse Pretorius
5ce798b360 MNAIO: Use images subdirectory for VM images
Instead of putting the images in the root of the disk,
we use a subdirectory. This prevents silly mistakes
from happening.

Change-Id: I19d22b7e72de88736db410a771ec22664c641c94
2018-08-21 18:30:28 +01:00
huang.zhiping
55db6d0f33 import zuul job settings from project-config
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.

Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.

Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I03144a0d6e8654ce841072554750f2ec7aa646f6
Story: #2002586
Task: #24319
2018-08-21 13:00:09 +00:00
Zuul
595c2f6cea Merge "MNAIO: When saving VM images RC=2 is not a fail" 2018-08-20 15:30:35 +00:00
Zuul
638d70c822 Merge "Add FS detection in metricbeat for containers" 2018-08-20 15:14:36 +00:00
Jesse Pretorius
ed057ece01 MNAIO: When saving VM images RC=2 is not a fail
When executing the save, the return code of 2 indicates
a change was implemented - but I forgot to include that
condition for failed_when. As it stands now the task will
be considered failed which is a bit useless.

Change-Id: Ie8b36335048d2dcf6d0f9e66f8440430f4a68398
2018-08-20 15:40:45 +01:00
Zuul
caf4818e7f Merge "Use the TESTING_BRANCH env var for constraints" 2018-08-19 18:20:27 +00:00
Kevin Carter
d69c75e8e4
Add FS detection in metricbeat for containers
When deploying metricbeat there are some container environments that
will have a mount point within the container that may differ from that
of the host; like in the case of an LXC container with an LVM backed
bind mount or an NFS share. This change will now check if the filesystem
within a container has any mounts and compare the return to that of the
provided physical host if the list is >0 the fs checks will be deployed
within the contianer environment.

Change-Id: Iae5827f4e7e0a85eb733128b54d6ef4c8721537a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-17 16:24:47 -05:00
Zuul
023b303e76 Merge "MNAIO: Ensure vm_use_snapshot is defined" 2018-08-17 09:54:13 +00:00
Jesse Pretorius
9488e76bf1 MNAIO: Ensure vm_use_snapshot is defined
When not using a file-backed backing store, the vriable is not
defined and results in an error to that effect.

Change-Id: I3142a5960bc4521f79bbdfe32b0e7a0f71742b7d
2018-08-17 10:27:26 +01:00
alexandrebassel
0fd99e4423 fix intermittent failures when deploying base glance images
CI testing is experiencing intermittent failures when deploying base glance
images as part of the openstack-image-setup.yml playbook which is kicked of
as part of the openstack-service-setup.yml playbook in openstack-ansible-ops.
Since the deployment of these resources rely on external URI endpoints, this
type of failure is something that can occur during a customer deployment.

Change-Id: Ieea0f11482646ea152920a1ff1009a2b03705f1c
2018-08-16 17:02:45 -04:00
Zuul
0b8068ef2a Merge "MNAIO: Install jmespath" 2018-08-16 17:35:19 +00:00
Zuul
bca923f084 Merge "MNAIO: Extend image saving to include manifest" 2018-08-16 17:35:18 +00:00
Zuul
4b750d0acf Merge "MNAIO: Use virt module to shut VM's down when saving images" 2018-08-16 17:35:18 +00:00
Zuul
8c480fcb2a Merge "MNAIO: Enable using a data disk for file-backed VM's" 2018-08-16 15:13:34 +00:00
Jesse Pretorius
a47369fad5 Use the TESTING_BRANCH env var for constraints
The TESTING_BRANCH environment variable is provided by the
run_tests.sh script and is derived from the .gitreview file.

This ensures that once the master branch becomes a stable
branch, the constraints from the stable branch in the
integrated repository will automatically get used once the
.gitreview file is updated.

To ensure that the required environment variables are present
we export them appropriately in run_tests.sh and modify the
tox configuration to pass them into the tox test.

Change-Id: I4a101851d656e5dce3a2cc9eb5d5508b46953c4b
Needed-By: https://review.openstack.org/579371
2018-08-16 15:29:27 +01:00
Zuul
47e8a9de99 Merge "Make journalbeat install detect if it should install" 2018-08-16 05:22:28 +00:00
Zuul
1206f6e986 Merge "Extend the embedded bootstap process" 2018-08-16 05:14:12 +00:00
Zuul
ebbd1887e6 Merge "Use the Ansible runtime venv for pw-token-gen.py" 2018-08-16 05:04:22 +00:00
Kevin Carter
57754a4346 Make journalbeat install detect if it should install
When running on a system where there is no journal or no systemd skip
the journalbeat playbooks.

Change-Id: I92c804e8eb2ab2f9b86eca09fc51d19be66c7190
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-16 04:45:53 +00:00
Zuul
71e63edc4a Merge "Add basic index templates" 2018-08-16 04:30:21 +00:00
Kevin Carter
cd299ee1ce
Extend the embedded bootstap process
The embedded bootstrap process can support all of our OS's, this change
ensures thats possible.

Change-Id: I730bb775aa5e9f87609ea885142d7361203cbb2c
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-15 23:25:53 -05:00
Kevin Carter
d62666b455
Add basic index templates
The basic index template will ensure that the replication policy is
enforced on the revolving indexes we know will exist.

Change-Id: I1e3edcfd00a73cbdd328d50e8ba6492ac2248b72
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-15 21:35:31 -05:00
Zuul
b23eab6305 Merge "Remove anti-bind mount config" 2018-08-15 20:04:02 +00:00
Zuul
cdd9c5e98c Merge "Allow for Swift Leap Upgrade to be skipped" 2018-08-15 19:12:23 +00:00
Jesse Pretorius
b5e9a6c24c MNAIO: Install jmespath
To allow us to use the json_query filter, we ensure that
the jmespath distro package is installed onto the host.

Change-Id: Icb9053fd3a7486030f4336130fe6ad503852b07a
2018-08-15 19:40:44 +01:00
Jesse Pretorius
993bac94f5 MNAIO: Extend image saving to include manifest
In order to more successfully reproduce an environment using
saved images, we include the VM XML definition files and the
output from 'pip freeze'. We capture the list of files, their
checksums and the SHA for the git repo into a json manifest
file.

Change-Id: Ia0bf74d509b4acb10b0dd832a4cfe1bb2afb2503
2018-08-15 19:25:12 +01:00
Kevin Carter
9e13b7c620
Remove anti-bind mount config
The config `default_bind_mount_logs` was being set in the leap tooling
which results in all containers not having a log bind mount. This change
removes the task that sets the offending config.

Change-Id: Ib85e77ed1f993bad44f1cb36ed11056f8a83dfc5
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-15 13:09:53 -05:00
Jesse Pretorius
6aadbb5ee9 MNAIO: Use virt module to shut VM's down when saving images
It's better to shut the VM's down cleanly instead of just turning
them off, so we change 'destroy' to 'shutdown' and use the virt
module for this action instead of the command module.

Change-Id: I896b7794328b91dc59726bf1d5366eeb7112ca21
2018-08-15 17:11:28 +01:00
Jesse Pretorius
484059205a MNAIO: Enable using a data disk for file-backed VM's
In order to make use of a data disk, we enable the 'file'
implementation of default_vm_disk_mode to use a data disk
much like the 'lvm' implementation.

To simplify changing from the default_vm_disk_mode of lvm
to file and back again, the setup-host playbook will remove
any previous implementation and replace it. This is useful
when doing testing for these different modes because it
does not require cleaning up by hand.

This patch also fixes the implementation of the virt
storage pool. Currently the tasks only execute if
'virt_data_volume.pools is not defined', but it is always
defined so the tasks never execute. We now ensure that
for both backing stores the 'default' storage pool is
defined, started and set to auto start (as three tasks
because the virt_pool module sucks really bad and can only
do one thing at a time).

The pool implementation for the 'file' backed VM's uses
the largest data disk it can find and creates the /data
mount for it. To cater for a different configuration, we
ensure that all references to the disk files use the path
that is configured in the pool ,rather than assuming the
path.

Change-Id: If7e7e37df4d7c0ebe9d003e5b5b97811d41eff22
2018-08-15 16:58:50 +01:00
Antony Messerli
aa26271ee5 Allow for Swift Leap Upgrade to be skipped
An operator might want to ensure Swift is available during
an upgrade and manually upgrade Swift on completion of the
maintenance.

The operator would need to set these vars before operation:

   export SKIP_SWIFT_UPGRADE=yes
   export CONTAINERS_TO_DESTROY=add_!swift_all_exclusion

This would prevent the swift containers from being torn
down during the upgrade and would skip all Swift upgrade
operations.

Change-Id: Ibf40499750751dd9f41e447b7b90bb77f592cc14
2018-08-15 10:58:48 -05:00
Jesse Pretorius
6af52b6b05 Use the Ansible runtime venv for pw-token-gen.py
Rather than installing pip packages on to the host system,
we can just execute the script and it will use the ansible
runtime venv. This works for Ocata onwards. Any earlier
releases can either pre-install the right packages, or
implement the change to the script shebang in a fork.

Change-Id: I88eb4c1bc9fe3a38803c5f0f5d1725dbed74dac7
2018-08-15 14:51:07 +01:00
Zuul
8b508a9d90 Merge "Optimise vm_disk_mode conditionals" 2018-08-15 09:18:36 +00:00
Jesse Pretorius
4a48a6874d Optimise vm_disk_mode conditionals
There is already a default in group_vars/all, so we do not need
to provide a default in every conditional.

Also, we move several LVM data volume tasks into a block given
they have a common set of conditions.

Change-Id: Iff0fafefda2bc5dc1596b7198b779f5da763086c
2018-08-15 08:49:23 +00:00
Kevin Carter
6da0fca375 Update curator to better metric storage
Now that the roll-up has been implemented the original shrink method is
no longer required or useful. This change cleans up things up.

Change-Id: I24fd5b4daafc2f48ee5a3421f6b58b157a7aff6c
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-14 22:37:28 +00:00
Zuul
5f2fb9b022 Merge "Add Redhat to the ELK deployment capabilities" 2018-08-14 17:06:03 +00:00
Kevin Carter
e4c84aa28d
Add Redhat to the ELK deployment capabilities
Change-Id: Id34e046a546f8d0878843596f53e400165e37c6e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-13 18:59:57 -05:00
Jesse Pretorius
241837fc9f MNAIO: Use single vars file for Ubuntu trusty/xenial/bionic
Given there is almost no difference between the releases, we can
use the same vars file and simple conditionals. The package
'software-properties-common' is available for Trusty & Xenial so
we just use that and remove the unnecessary extra package.

We also now add the correct UCA repositories for Trusty and Bionic
so that we get the latest version of libvirt.

Finally, we simplify the conditional for the iptables binary to
make it far easier to read.

Change-Id: Id4b3711a4d7a0ccc13db956d41017ac01c97825f
2018-08-13 17:22:14 +01:00
Zuul
62039aa3cf Merge "Add Prometheus node_exporter" 2018-08-13 14:48:30 +00:00