Commit Graph

8 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 3cdcb1115f Fix linters issue and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Change-Id: I6a9986cd948dbeaf2847ea4dd04deed974f80d20
2023-07-11 21:43:23 +02:00
Dmitriy Rabotyagov d2a3a22a58 Properly render sysctl-container
Inside jinja block variables should not be inside start/end block.
This used to work due to the workaround placed in config_template
that was removed within [1]. So we fix our usage of jinja to make
variable resolved properly.

[1] https://review.opendev.org/c/openstack/ansible-config_template/+/881887

Change-Id: I1c3178e5694b08ace9364f6da397837049ca2d49
2023-05-19 11:38:28 +02:00
Dmitriy Rabotyagov 5af3d0c200 Replace systemd_service templates with role
For consistency reasons we try to leverage our systemd_service role as
much as we can. Instead of maintaining separate systemd unit templates
the role can be leveraged for same purposes and reduce complexity in
this role.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/865952
Change-Id: I59e6504240eafdb5f0d010ff8a051078e25b1281
2022-11-29 08:28:17 +00:00
Dmitriy Rabotyagov 517b75ac61 Replace usage of networkd template with role
For consistency reasons instead of placing a template for
systemd-networkd we better use systemd_networkd role that is present
for a while.

Change-Id: I1e9deaa2892a8fa7eb171acaf75441d7efeac297
2022-10-14 16:17:19 +00:00
Jonathan Rosser 91b7997b34 Unify variables for all operating systems.
Refactoring of the lxc_hosts role means that there is no need for
differences in variables between operating systems.

This patch makes the ubuntu focal CI jobs non voting as it must
merge at the same time as a corresponding patch to lxc_hosts.

Change-Id: I29e91320baebb9a3a649533a0e1d3a433dd04ad9
2022-04-27 15:58:29 +00:00
Matthew Thode c84d4924ef
Add gentoo support
Required to support Gentoo is the ability to bind mount a new shared
directory.  In order to support this, _lxc_container_bind_mounts has
been created for use in per-distro variables.  For Gentoo the new bind
mounts allows the sharing of package data, shrinking both the container
size and the time needed to install packages.

Also needed was the creation of the `sysctl_path` variable as Gentoo
installs sysctl to an alternate location.

Change-Id: I8c20631aff9ee30289ef2f7f862ba0d4e1bb4569
2019-02-26 09:00:13 -06:00
Jonathan Rosser 2f14860628 Allow special purpose container interfaces
Some use cases such as public facing dns servers for Designate
are difficult to deploy with the dynamic inventory as they have
a hard requirement for fixed IP on certain interfaces. An additional
variable allows the deployer to create these special interfaces.

Change-Id: I4f0ac58f2d5c19fea1606fe1fbb011bb1a36f7b4
2018-05-31 18:36:57 +01:00
Kevin Carter 815ece7454 Unify container network interfaces with networkd
Unify container network interfaces using Systemd Networkd for ubuntu,
centos, and openSUSE. This change allows the role to use a single way to
configure container networks.

Care has been taken to ensure we're able to cleanly upgrade to the new
capabilities within existing environments without breaking any feature
compatibility or causing any container restarts.

It's also worth noting that all of the pre/post networking up/down
script options have been converted to systemd "oneshot" services. This
retains the ability to run adhoc scripts post network availability
while also opening up this capability, which used to be ubuntu only,
to all of our supported operating systems.

> Our usage of `lxc-attach` was removed in favor of `nsenter` to fix a
  issue where multiple `lxc-attach` commands issued to a single physical
  host could result in a hang.

> Scripts that were being generated inline have been placed into
  template files. This solves a long standing memory consumption issue
  when creating lots of containers. The old shell tasks will now be 
  executed from a generated script. While this should also help with 
  debugging, the main driver is to ensure better system stability.

> A lot of cleanup has been done throughout the task files and
  templates. In the process of updating the role to use unified
  networking a lot of duplicate tasks, scripts, and processes have
  consolidated.

> Handlers have been added for network connection wait conditions and
  to various service restarts.

> The OSA plugins have been added to this role as a dependency. We
  rely on the connection plugins throughout the stack however we were
  doing a lot of workarounds to cater to the possibility of a deployer
  running this role without them. This change simply adds the plugins
  as a known dependency which allows for a more streamlined setup.

Change-Id: I5d3ddcfa11d575648a69a04f2fb30236c2c89da3
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-01 10:55:14 +00:00