Commit Graph

12 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 337ddf8780 Replace systemd-mount template with role
To reduce role complexity we replace separatelly maintained template
with systemd_mount role that is widely used across OSA.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/836945
Change-Id: I23632f9c145be334b1d19067352f8b82114a1209
2022-04-07 11:40:09 +00:00
Jonathan Rosser da4f62b006 Remove machinectl from LXC cache prep
machinectl is only used to store the image during
initial cache preparation and is unrelated to the
backing store used by LXC.

This patch removes the use of machinectl and btrfs
which makes the lxc_hosts role portable to centos-8
which does not have btrfs

Change-Id: Ib03ea09fa5b4d4b6b3d5ca38a0a6c5cf67eb1df4
2020-06-17 14:15:58 +00:00
Kevin Carter 89dc180ca4 Update the option uts name in the machinectl template
The machinectl template was running with the legacy uts name option.
This change updates that option so that it uses the hash and major
version to update the config variable.

Change-Id: I85b5c92422116b139e447330214b2d6b5afbf948
Signed-off-by: Kevin Carter <kevin@cloudnull.com>
2018-10-10 00:59:34 +00:00
Guilherme Steinmüller a6dba10bb1 Drop SELinux support for CentOS 7
We do not have a maintainer at the moment for SELinux and hopefully
we will adopt the upstream openstack-selinux package, but for now
in order to let deploys in environments where SELinux is set to
permissive work, we'll have to remove these bits.

This change can be reverted whenever we have a maintainer that's
available to do the work required.

Change-Id: I61141da3a391a99cb111733eae22cc7c54ce48c6
2018-09-20 18:52:41 +00:00
Kevin Carter bf9a79d05e Add mount options for better machinectl performance
The machinectl default options, while functional, could be tuned for
better overall performance. This change adds several options which will
ensure container workloads are using the lest amount of storage with the
best possible performance.

For more information on the options being used see
 * https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs(5)#MOUNT_OPTIONS

All of the "machines" mount procedures have been moved into a unified
volume task file. This was done to ensure a consistent experience across
our supported distros. To ensure any new options are non-disruptive, the
mount handler has been changed to use "reload-or-restart" which will first
try to reload a mount instead of restarting it mounts.

Change-Id: Ia962fd4c5bb2a73ddd884d3bb3837c47b43d6903
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-05-05 17:43:40 +00:00
Kevin Carter 555c8a1bf1
Create an LXC create template for machinectl
This change creates a simple LXC create template for machinectl. This
will allow out container create process to use less storage and more
efficently build containers which will speed up operations and
deployments. This also begins to leverage common tools already on the
systems we support there by simplifing how cache is stored, containers
are built and the general management of images within a host.

The new lxc container create template, and the features it provides,
will only impact new containers created allowing deployers to safely
adopt this change in any existing environment.

Change-Id: I70d53cabd0888954f31def924e9f4436398cdebf
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-10-05 00:01:40 -05:00
Markos Chandras cd67263120 tasks: Set systemd installation prefix
The systemd installation prefix is distro specific so add a new
systemd_utils_prefix variable in the distro files instead of using
a hardcoded value.

Change-Id: Idccb404696e1cf3b8d56f62782dc8afa86996517
2017-04-25 14:56:33 +01:00
Kevin Carter 42545f1c3c Use machinectl to manage image caches
This change modifies the LXC image cache system to use machine control,
which is part of systemd, to manage images for us. This will give us
insight into the cached images which we had not had before all through
the `machinectl` cli utility. This change also modifies the image fetch
process allowing it to be faster and more transparent to the enduser.
Part of the slowness in image fetching and caching is that it happens on
every run even if it's not needed. This change will now check the cache
expiry and state of the image within `machinectl` and only run the cache
update when needed or instructed to do so.

Documentation on what can be done with the `machinectl` CLI utility can
be found here:
* https://www.freedesktop.org/software/systemd/man/machinectl.html

Change-Id: Ic7f8bf400ec5781b4be67539bc6c1523069d0ab2
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-04-15 05:33:10 +00:00
Marc Gariepy 76f9f724d7 New path for selinux policy
Add licencing bits.

Change-Id: I3ad599ce4dc381807793ee8d205b91b2f0b346a3
2017-01-24 10:43:42 -05:00
Marc Gariepy 6fd1f9e0c4 Add selinux rules to allow lxc-attach after reboot
Lxc-attach does not work after a reboot on CentOS
it needs a selinux module to allow it.

Change-Id: I4226a86b852193a4c3c2812ea4879b37cca348e6
2016-12-02 14:48:26 +00:00
Paulo Matias dcf4ba7de8 Check for word boundaries around net interface name
Closes-Bug: #1617131
Change-Id: I9b962e2018173564eb0c35f88f16150944a08882
2016-08-26 00:03:32 -03:00
Kevin Carter f5542103b3
Changed for lxc-host setup/build for multi-distro
This change updates the lxc-host setup role to build the lxc cache using the
download template based on default images found here:[0]. These images are
upsteam builds from the greater LXC/D community.

This update adds support for Ubuntu 14.04, 16.04 and RHEL/CentOS 7 container
types and the cache will be generated from the host Operating system.

[0] - https://images.linuxcontainers.org/

Change-Id: Ie13be2322d28178760481c59805101d6aeef4f36
Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-05-03 08:49:54 -05:00