Commit Graph

76 Commits

Author SHA1 Message Date
Zuul 3d6a3d812d Merge "Stop installing openssh and rsync to containers" 2023-10-13 09:51:09 +00:00
Dmitriy Rabotyagov d4d8114a11 Stop installing openssh and rsync to containers
With fixing keystone role there should be no need in explicitly
installing rsync and openssh everywhere.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_keystone/+/889934
Change-Id: I25729462fa6be7953e8ef0687ec4580509c21aaf
2023-10-12 08:01:57 +00:00
Jonathan Rosser d57f9a8f47 Remove lxc_cache_map variable
This has not had any practical use for several releases and mostly
carries copies of ansible facts. Remove the variable and use the
facts directly.

Change-Id: I1d2be9d07b38eaf2b737819c451a0d2339f723d0
2023-10-11 15:56:08 +00:00
Dmitriy Rabotyagov a51291f87d Refactor LXC image expiration
Right now we write output of `date -d @{{ timestamp }} to
the expiry file, and then attempt to comapre with timestamp.
However, output of  `date -d` is datetime and not timestamp,
so these 2 things can not be properly compared. So image cache
was valid forever.

Change-Id: I42f5b43f09d3c530813dd7fd334eafce7a5eaf39
2023-07-20 07:25:46 +00:00
OpenStack Release Bot 8975a4df06 Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: I80855ac314edcb193375976c86ac6001fac83ff3
2022-12-13 13:09:09 +00:00
Dmitriy Rabotyagov 9385ec8011 Add option to disable lxc interface management
This change adds a new role default option which will allow operators
to omit the deployment of specific lxc bridge network config. This
change is being implemented because, as an operator, I have a host
setup specifically built for OpenStack which includes an interface
config covering the lxc deployment. Currently when running a deployment
the role will attempt to deploy a new interface file which at best
conflicts with the host setup and at worst fails to run due to the
interface being in a state unknown to OSA.

The new config option `lxc_net_managed` is default **true** keeping
the existing expectations, but when set to **false** the role will
no longer deploy an interface file or attempt to bring up the interface
using the distro tools.

Signed-off-by: Kevin Carter <kevin@cloudnull.com>
Change-Id: Icdf4a1f5ff98dc1b86c6a87ea4e606b7c74e1aac
2022-11-29 17:27:05 +01:00
Jonathan Rosser 786c4fcf18 Switch all base images to be built locally rather than downloaded
This patch switches the debian/ubuntu OS to build their lxc base
images locally using debootstrap rather than download a pre-built
lxc image. This unifies the approach with Centos-8 which is already
building a local image using dnf.

The LXC cache prestage tasks are removed, and all variables
associated with the download of the lxc image are removed from
defaults/main.yml.

A new variable lxc_apt_mirror is introduced, which is passed to
debootstrap to provide the apt source that the container rootfs
should be built from.

Depends-On: https://review.opendev.org/786396
Change-Id: Ia5a62cee7ab493857df16f7ae906796d22ba616c
2021-04-22 12:55:26 +03:00
Dmitriy Rabotyagov 46e10d21f1 Determine latest base image available
Closes-Bug: #1900884
Closes-Bug: #1900975
Change-Id: I362a15397fee891d967ce7150819b02312200d2e
2020-10-22 15:53:01 +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
Andreas Jaeger 70187517c2 Use newer openstackdocstheme and reno versions
The sync from https://review.opendev.org/733244 updated to
openstackdocstheme 2.2.1 and reno 3.1.0 versions.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: Iabe397da6771d8d5272371b777b3a7a733aaedef
2020-06-03 19:02:14 +02:00
OpenStack Release Bot 363ae1da97 Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: I409a9511dd7398ead3912cb434249da91e83998e
Sem-Ver: feature
2020-06-01 13:10:05 +00:00
Andreas Jaeger 4b34598e35 Update docstheme for style
New version of openstackdocstheme (Victoria+) respects pygments_style.
Since this repo is using now Victoria (master) requirements but has
not branched for Ussuri yet, it uses the new version.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Change-Id: I54a62915be530ad645625e7775c9e0e9f1514090
2020-05-20 18:45:18 +02:00
Andreas Jaeger 57672cbdf5 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove setup.* files, these are not needed for this repo
- Cleanup */source/conf.py to remove now obsolete content.
- Remove install_command from tox.ini, the default is fine,
  move constraints into deps, cleanup a bit
- Enable warnings for docs building
- Correct ansible search/match tests for ansible 2.9

Depends-On: https://review.opendev.org/726645
Change-Id: Ia5aaa8f41172fe200d1d7ce0c7b6f26f7834e38a
2020-05-10 17:38:52 +00:00
Dmitriy Rabotyagov 3c46f24907 Replace git.openstack.org with opendev.org
This patch replaces git.openstack.org with opendev.org as redirection
from old path was enabled.

Change-Id: Iec59cd328b4a76b966f9c25fad4a1dc7012b4154
2019-11-14 20:35:09 +02:00
OpenStack Release Bot 6b3593dc93 Update master for stable/train
Add file to the reno documentation build to show release notes for
stable/train.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.

Change-Id: I1bee281af3b6d54135fc164483fad0847d988fda
Sem-Ver: feature
2019-10-22 18:54:36 +00:00
Kourosh Vivan 921c98f67b Centos EPEL options default to global variable
Repository variables lxc_centos_epel_mirror and lxc_centos_epel_key will
default to centos_epel_mirror and centos_epel_key

Change-Id: Icf84a0a55654fa890947bae5b608870eddad7324
2019-10-17 15:26:12 +00:00
Kourosh Vivan 62c3a2cbe1 Add Centos GPG key custom url
When using a custom repo with centos_epel_mirror, you maybe need to
change the gpg key url because offline env

You can use this variable: lxc_centos_epel_gpg_key

Change-Id: Ia30f20df6971a9a44a69e5cc22020831a95a1489
2019-10-15 11:01:10 +02:00
OpenStack Release Bot 7c767a6e78 Update master for stable/stein
Add file to the reno documentation build to show release notes for
stable/stein.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/stein.

Change-Id: I614ebd816e393f3a8f8a2fd4655adc58edfcbe33
Sem-Ver: feature
2019-04-08 09:15:21 +00:00
Zuul 0766e893ec Merge "Correct spelling mistakes" 2018-12-22 18:18:37 +00:00
Mohammed Naser f2ac427403 prep: remove old machinectl workarounds
There are a few manual workarounds that we're placing in order
to workaround old versions of machinectl however we don't actually
leverage those and they seem to be causing a dbus restart which
causes extra problems.

This patch removes those workarounds in order to prevent restarting
dbus which causes the system to start timing out on systemd-logind.

Change-Id: I86483225754a5b1c6030ef21e2c0cdf2cd908c3b
Closes-Bug: #1807405
2018-12-07 10:37:21 -05:00
chengebj5238 4b85a07840 Correct spelling mistakes
Change-Id: I6c807c13005b8d7848322b977add3953c349b1da
2018-11-22 19:57:10 +08:00
OpenStack Release Bot 78a4291ace Update reno for stable/rocky
Change-Id: I17146681710ec770a5bf12d19cc3ccc176331044
2018-08-10 16:45:04 +00:00
Kevin Carter 2971b787ac Enable quota system and set qgroups
This change implements the machinectl quota system and qgroups when
they're enabled and available. This change is being implemented to
resolve an issue where machinectl based containers using a loopback file
system spam DMESG with the following:

* BTRFS error (device loop0): could not find root $INT

While various upstream sources say this error is benign[0], it raises
an inconsistency flag within the host system and is speculatively the
cause of our inconsistent read-only/Full-FS issues we've seen in the
integrated gate. Once the qgroups are properly setup the system will
remove the inconsistency flag and the message spam will stop.

* BTRFS info (device loop0): qgroup scan completed (inconsistency flag cleared)

To resolve this issue the quota system is being enabled by default
and unlimited qgroups are being setup to ensure we're not running
into file system limitations. This change essentially acknowledges
the built-in quota system and provides for the ability to set /
define specific quota (qgroup) options as necessary. While many
deployers may never use these options or this tooling, the role will
now properly set everything up should it ever be needed.

[0] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1651435
Closes-Bug: #1753790
Change-Id: I34a41ac8a9fe4419254284c83f4600efee274c04
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-05-15 14:19:11 +00:00
Mohammed Naser 030c348117 Setup /dev/random and /dev/urandom device in cache prep
In the cache preparation stage, there are certain libraries that
depend on the existance of /dev/random and /dev/urandom in order
to be able to function correctly, such as NSS in the latest CentOS
release (7.5)

This patch adds those nodes so that the libraries are able to use
them with no problems, allowing yum and rpm specifically to work
properly again.

Change-Id: Iaf6b9cb1435591f28289493f480a7fe46789c551
2018-05-10 18:02:28 +00:00
Jean-Philippe Evrard bbde19186d Avoid release note conflict
There is a same release note id (1daed001ee6b88ae)
in the lxc_container_create role, so we need to update the
filename so that there is no overlap, and won't cause issues
like [1].

[1]: http://logs.openstack.org/27/565027/1/check/build-openstack-releasenotes/9c6c33d/job-output.txt.gz#_2018-04-28_15_33_21_528262

Change-Id: Id2557f3675a5909849f4f4dbc56283f80ad594d2
2018-04-28 20:52:33 +02:00
Kevin Carter e44df830ef Split the container and host variable files
The host and container image variable files have been split. This split
now gives deployers the ability to change or customize the container
image used on a given host.

Change-Id: I839bbcfff3f33dde144e9fb8d078fa1d97f8c410
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-21 23:53:12 +00:00
Kevin Carter 7e98da3d0f Convert lxc_hosts role to use simple download URL
For a very long time we've been parsing and using the lxc images as
provided by upstream lxc. While these images are functional there are by
no means optimal. In general they're quite a bit larger than they need
to be and contian a lot of little sharp edges that have cut us over
the years. This change removes all of the lxc image cache parsing and
meta-data linking and simply downloads the rootfs a given url. To
maintain compatibility with the legacy images a script has been created
to parse the image index and return the legacy image url.

The result of this change:

* Access to smaller more optimal base image which is well known by the
  corresponding communities.

* Deployers now have the ability to set and forget the download url for an
  internal image instead of having to create a cache infrastructure
  compatible with the lxc download template.

* Any rootfs tarball will work as an image.

* Fewer tasks are executed and less memory is consumed resulting in faster
  deployment times.

* The base cache has a uniform meta-data setup giving all container
  types the same access to config, devices, and templating.

Change-Id: I1775e775bbb7fe86bdffdd8296c2cff5ebc5bac8
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-21 23:52:53 +00:00
Kevin Carter 0d8fa41d32 Move the image prep script into a template file
This change moves the image prep scripts out of a ser of variables and
into an actual template. This change will reduce our overall memory
footprint by simply rendering a template instead of injecting content
into a file using the copy module. The result will be faster time to
execution and more understandable output, especially when running in
debug.

Change-Id: Ic90fa7c8fdec8ffd844070ee78d30bd63a33a2a9
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-21 14:52:47 +00:00
OpenStack Release Bot af8cc87b86 Update reno for stable/queens
Change-Id: I82fa97c393b592efa755fc94be01518678283f23
2018-02-14 15:45:55 +00:00
Zuul 588f1ba9d1 Merge "Clean-up old systemd prep and allow machinctl to grow" 2018-02-12 20:01:24 +00:00
Kevin Carter f179f21a66 Clean-up old systemd prep and allow machinctl to grow
The machinectl cache is currently set image to 16G by default. If
multiple container images are imported into the cache this may be too
small by default. This change sets the cache to "64G" by default allowing
the cache more room to grow by.

This change also disables the quota system once the limit has been set
The option `lxc_host_machine_quota_disabled` has been added to disable or
enable the quota system as needed. This is done after the default limit has
been set so an adequately sized sparce file can be created should it not
already exist.

> More documentation can be seen here [0] with regard to the set-limit
  option.

Because we support both modern and older systemd, the cache prep tasks
for old systemd have been updated so that deployers using earlier
versions of systemd can benefit from the ability to grow an existing
cache via playbook run.

[0] https://www.freedesktop.org/software/systemd/man/machinectl.html#set-limit%20%5BNAME%5D%20BYTES

Closes-Bug: #1745361
Change-Id: I85fefc6ce186bb6808ac37a9ea79a50e29671115
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-02-12 15:30:14 +00:00
Marc Gariepy 3f2f82a5b1 Change default for sshd to only all keybased auth
Set PermitRootLogin to prohibit-password instead of yes.

Change-Id: Ifde08c43c29a6c437d622399ea48be96c0ac3432
2018-02-01 15:55:30 +00:00
Major Hayden a468089727
Allow NetworkManager to work (if present)
This patch adds tasks that check to see if NetworkManager is
installed and running. If it is, the tasks allow NetworkManager
to handle the `lxcbr0` interface.

In addition, the `NetworkManager-wait-online.service` will be
enabled to ensure that all services that depend on networking will
wait for network configuration to be completed.

Partial-Bug: 1738467
Change-Id: I415241daccf22f03826062eea18b3b36b2d9e53e
2018-01-08 09:22:51 -06:00
Major Hayden 499eb6fe21 Create and use a local LXC RPM repo
CentOS deployments require a special COPR repository for modern LXC
packages. The COPR repository isn't mirrored at this time and this
causes failed gate tests and production deployments.

The role now syncs the LXC packages down from COPR to each host and
builds a local LXC package repository in `/opt/thm-lxc2.0`. This
greatly reduces the amount of times that packages must be downloaded
from the COPR server during deployments, which will reduce failures
until the packages can be hosted with a more reliable source.

In addition, this should speed up playbook runs since ``yum`` can
check a locally-hosted repository instead of a remote repository
with availability and performance challenges.

Partial-Bug: 1730380
Change-Id: I8726b46f4058bb67709246785c7a61278eb64fab
2017-12-13 13:31:30 +00:00
Jesse Pretorius b634afe204 Use role defaults for lxc_cache_prep_timeout
In https://review.openstack.org/523525 the default value was
changed for SuSE and CentOS to be higher, but the value was
also overridden using role vars which have a high precedence.

This patch ensures that the value uses the role defaults to
ensure it has the lowest precedence. It also changes the reno
to ensure that the change in default is communicated.

The increased timeout will have no real effect on gating, but
will benefit installations where the mirror is a bit slow.

Change-Id: I41a68313d1841d14001acca591db5c5638e53ffc
2017-12-01 09:18:10 +00:00
Jesse Pretorius 670b47bbfb Make the cache prep timeout configurable
In some environments it may be desirable to adjust the
cache timeout. This makes that possible.

Change-Id: I733887f16d844f07457c80c3c6936f668e12ce86
2017-11-20 12:01:15 +00:00
Andreas Jaeger 24b6960a12 Remove setting of version/release from releasenotes
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.

Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.

This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.

Change-Id: Ided93af14301892493657dad7d0aa340173027b5
2017-11-17 07:45:33 +01:00
Jesse Pretorius 28a62e408e Initial OSA zuul v3 role jobs
This patch implements an initial set of jobs intended to match
the current job execution method. It does not intend to improve
how the jobs are executed - only to replicate what is currently
in openstack-infra/openstack-zuul-jobs and provide the platform
to iterate on.

Change-Id: I53dfb4f5c24c523d77f9f293d47b7b882aa77bf1
2017-10-17 17:59:49 +01:00
Jenkins 3f3c91cbb6 Merge "Create an LXC create template for machinectl" 2017-10-05 19:07:45 +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
Logan V 697ddb8fb4 Move lxc_cache_distro_packages to defaults
Move the package list from vars/ to defaults/ to allow for overriding
in inventory group/host vars.

Change-Id: Idb186a061a396713a0e449d47ec262b30d5006ca
2017-09-13 20:52:39 +00:00
Markos Chandras 1074bba56f SUSE: Add ability to configure external mirror for openSUSE
Allow deployers to choose a specific mirror by setting the
'lxc_hosts_opensuse_mirror_url' variable

Change-Id: If151501923c5308cfeaee6e33d12df3e7f6959d5
2017-09-07 12:01:11 +01:00
OpenStack Release Bot 9c8a6dbbdd Update reno for stable/pike
Change-Id: I42b5f28169136c23ac0ad10b7779ad66711fce1d
2017-08-21 10:30:07 +01:00
Jesse Pretorius d5bef82dfe Ubuntu: Use dnsmasq-base, not dnsmasq
In Ubuntu the 'dnsmasq' package actually includes
init scripts and service configuration which
conflict with LXC and are best not included. The
actual dependent package is 'dnsmasq-base'.

With this change, the cleanup is no longer
required because the files are removed by the
purge or not installed in the first place.

Closes-Bug: #1711140
Change-Id: I0b0a8dec3943651f379479ea1a3b8038736b9219
2017-08-16 15:53:23 +01:00
Major Hayden de1b45553e Download LXC image with async via aria2
This patch adds an async task to download the LXC image using aria2
with retries and read timeouts.

Closes-Bug: 1709329
Change-Id: Ib9ec6195dcb7e0e4b18b8526f030e6738f9953e8
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-08-15 12:34:26 +00:00
ZhongShengping b67cc0879f Fix openstackdocstheme settings
To use openstackdocstheme 1.11.0 properly, this patch fixes
some settings according to follow[0].

[0]https://docs.openstack.org/openstackdocstheme/latest/

Change-Id: I14a13371646eac1928b18fca4d3547cb1550141c
2017-07-03 16:12:23 +08:00
Jenkins 8b16827b79 Merge "Add s390x as supported architecture" 2017-06-26 13:49:20 +00:00
Markus Zoeller 67fc56366e Add s390x as supported architecture
The s390x architecture (aka IBM z Systems) supports OpenStack since
the Kilo release. This change adds the necessary tweaks to let
openstack-ansible do its work on that platform.

Change-Id: Ib682fb19626156b6545e9e62bd8dd0732d2f1ab1
Co-Authored-By: Chris Beukers <chris.beukers@icu-it.nl>
2017-06-26 15:03:44 +02:00
ZhongShengping a454968990 Switch from oslosphinx to openstackdocstheme
As part of the docs migration work[0] for Pike we need to switch to use the
openstackdocstheme.

[0]https://review.openstack.org/#/c/472275/

Change-Id: I7d7c15ce2bd7c8e0710358e19160f2aebd5522d7
2017-06-26 14:32:22 +08:00
Jesse Pretorius (odyssey4me) 873e6a0ebf Revert "Use LXC v2.0.6 on CentOS"
It didn't work, and https://review.openstack.org/473879
should resolve the issue.

This reverts commit 5b171d9800.

Change-Id: Ic8fcc53b5847d7e62d76ec0e4248d3847b861cf9
2017-06-14 13:26:41 +00:00