Commit Graph

131 Commits

Author SHA1 Message Date
Michael Johnson d83999f4ed Add nftables support for SR-IOV VIPs
This patch adds the initial nftables support in the amphora for SR-IOV
VIPs. Followup patches will add rules to the nftables chain. As this
point in the patch chain, SR-IOV VIPs will not pass any traffic.

Change-Id: Ib2a1c3f49a26690d2e0e9c7330e047748c0b5105
2024-02-28 16:00:12 +00:00
Zuul 722814419b Merge "diskimage-create: Fix tox.ini not compatible with tox 4.x" 2023-11-01 19:45:29 +00:00
Takashi Kajinami 753c30f1e0 diskimage-create: Fix tox.ini not compatible with tox 4.x
Change-Id: I24e1a7059c7ed1bdfe0f287c81148db912ce52a9
2023-10-27 12:19:17 +09:00
Takashi Kajinami d92ea0169f diskimage-create: Remove unnecessary requirements
The six library was removed from octavia by [1]. Also PyYAML is
required by diskimage-builder and we don't have to explicitly require
it.

[1] f6b957e8ee

Change-Id: I1c5e7058172b0c6d9b700cf83494fb4f5d244a12
2023-10-27 12:11:37 +09:00
Gregory Thiemonge 4e6e8f0c0e Add support for Rocky Linux
* Added support for Rocky Linux in the amphora-agent
* Amphora images for Rocky can be built when setting
  OCTAVIA_AMP_BASE_OS="rocky"
* Fixed the devstack plugin for Rocky Linux hosts

Change-Id: I41f7e2341332b9cb74b4a59fedb6eed1af3c8062
2023-05-23 09:49:25 +02:00
Zuul cf827f5a8a Merge "Update diskimage-create.sh to set jammy as default Ubuntu version" 2023-02-13 13:02:28 +00:00
Zuul 250b54aa15 Merge "Add cpu-pinning element" 2023-01-12 10:01:49 +00:00
Zuul c47bc0d90c Merge "Remove i386 amphora build support" 2023-01-04 12:00:44 +00:00
Tom Weininger c1ebe18e2a Add cpu-pinning element
The new "cpu-pinning" element optimizes the amphora image for better
vertical scaling. When an amphora flavor with multiple vCPUs is
configured it will configure the kernel to isolate (isolcpus)
all vCPUs except the first one.
Furthermore, it uninstalls irqbalance and sets the IRQ affinity to the
first CPU. That way the other CPUs are free to be used by HAProxy
exclusively. A new customized TuneD profile applies some more tweaks
for improving network latency.

This new feature is disabled by default in diskimage-create.sh.

Story: 2010236
Task: 46042
Change-Id: I1a0591de79be867483a044705e866b2368b2a567
2022-12-08 11:59:32 +01:00
Tom Weininger 37ddc6fba4 Update diskimage-create.sh to set jammy as default Ubuntu version
Change-Id: Ib98d50b7b1c790a180efab1d6626f6db4b3998e1
2022-10-20 16:19:09 +02:00
Zuul b1d83eedcf Merge "Apply openstack-selinux policies in Centos amphorae" 2022-08-18 17:31:57 +00:00
Tom Weininger 6db3640873 Fix stat error in periodic image build job
Currently the publish-openstack-octavia-amphora-image-centos-9-stream
shows this error, even though the job itself seems to succeed: [1]

2022-07-25 02:21:52.929693 | centos-9-stream | Successfully built the
amphora image using amphora-agent from the master branch.
2022-07-25 02:21:52.931356 | centos-9-stream | stat: cannot statx
'/home/zuul/test-images/test-only-amphora-x64-haproxy-centos-9-stream.qcow2.qcow2':
No such file or directory
2022-07-25 02:21:52.931640 | centos-9-stream | Amphora image size:

[1]:
https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_741/periodic/opendev.org/openstack/octavia/master/publish-openstack-octavia-amphora-image-centos-9-stream/7414761/job-output.txt

Story: 2010187
Task: 45876
Change-Id: I4600bade69f27c670e58077ded5b7646d2e3f786
2022-07-25 18:20:07 +02:00
Gregory Thiemonge 3115589f21 Apply openstack-selinux policies in Centos amphorae
When enforcing SELinux, the commit enables the following SELinux
booleans:
- os_haproxy_enable_nsfs: it allows haproxy to run in a network
  namespace.
- os_haproxy_ping: it allows calls to the ping command from haproxy (for
  PING HMs)
- cluster_use_execmem

Change-Id: I4b5199d13d122b56619c4a2d21e86a06bd0dc3bf
2022-07-22 17:14:40 +00:00
Tom Weininger f444fa7c4d Update default image versions for CentOS and RHEL
Update new default version for CentOS images to 9-stream and for RHEL
to 9.

Change-Id: I8072e000fac02166d989e7fdb358c4dc34fa1bfa
2022-06-01 10:33:07 +02:00
Gregory Thiemonge 74a7cbe122 Use centos amphora image in the FIPS jobs
The FIPS jobs use centos-8-stream controllers but the image is still
based on ubuntu, this commit updates the amphora images to
centos-8-stream and enable FIPS inside the amphora.

Change-Id: I8916796ed6727a103907a33d3c14e99e1d3734e6
2022-02-11 17:21:48 +00:00
marian.chelmus f196ca44c7 Fix amphora image size display in diskimage-create.sh script
The size of the amphora image was not shown at the end of the
diskimage-screate.sh script due to missing file extenstion.
The extension is set based on the AMP_IMAGETYPE variable.

story: 2009688
Change-Id: I1cbced187c054391039933d2ba5abeaf93d80754
2021-11-22 07:48:31 +00:00
Carlos Goncalves 4333881cc0 Remove i386 amphora build support
Diskimage-builder has removed support to building i386 images, and major
Linux distributions have already end-of-lifed 32-bit host support.

Depends-On: https://review.opendev.org/c/openstack/diskimage-builder/+/790878
Change-Id: I258b9b49b4a876a2bf9772b19f2100187ea83007
2021-05-12 09:30:49 +02:00
Michael Johnson 40d011ab7f Make focal the Ubuntu default for diskimage-create
The current PTI version for Ubuntu is focal. This patch updates
the diskimage-create.sh default to focal from bionic.

Change-Id: Ia380b712d9d40d702b99bb3b04e1f45dcb60b96c
2021-03-15 21:41:24 +00:00
Carlos Goncalves e99d7b9389 Add aarch64/amd64 support to amphora and devstack
The disk image create tool can now build aarch64/arm64 amphora images.
The devstack plugin will facilitate image builds and upload to Glance
for this CPU architecture.

Change-Id: I1cebd8a3da58dc56ebbfac22f7802ab7f52585e1
2021-03-10 18:54:50 +01:00
Michael Johnson 70079d861d Fix building Ubuntu 20.04 focal amphorae
Ubuntu 20.04 is a "Tested Runtime" for the Victoria release[1].
This patch updated our diskimage-create script and elements to
support building a amphora image that uses Ubuntu 20.04 (focal).

[1] https://governance.openstack.org/tc/reference/runtimes/victoria.html

Change-Id: I6f53ea5d012ab64b985d981ecd1b1967e18e4e81
2020-09-23 14:14:25 -07:00
Zuul 87e55d6350 Merge "Add support for nftables" 2020-09-10 18:29:38 +00:00
Zuul 954cf8afb3 Merge "Add DIB element octavia-lib" 2020-09-08 21:42:20 +00:00
Michael Johnson 1a3b56a0d5 Add support for nftables
This patch adds support for nftables (an iptables replacement) to
the devstack plugin and the amphora agent.

Change-Id: I9e2c4d6e68da67d68c6dfeb3b47edd600d1ba397
2020-09-03 13:15:27 -07:00
Zuul 4a4a2344de Merge "Add a message for the amphora image size" 2020-09-02 10:06:13 +00:00
Zuul d7b568f73d Merge "Set Grub timeout to 0 for fast boot times" 2020-08-26 22:53:42 +00:00
Carlos Goncalves dcda721320 Add DIB element octavia-lib
This new diskimage-builder element installs octavia-lib from Git for
source install type image builds rather than from released versions.

To mention some advantages:

1. allow custom octavia-lib versions (useful for development)
2. test unreleased octavia-lib changes in CI
3. install latest changes from master and stable branches
   (aligns with approach taken with amphora-agent)

Branch checkout to stable/* from master for octavia-lib DIB element will
be automated on branch create. See https://review.opendev.org/#/c/745877

Change-Id: I6d87b6bd25c536b2bed1994427cd933bdcc091d6
2020-08-24 11:24:19 +02:00
Carlos Goncalves 17c856dbcb Set CentOS amphora image size back to default value
DIB reduced the size of CentOS minimal images to the point CentOS-based
amphora images fit back in the default 2 GB disk.

Change-Id: Icd3ff0162def1820940d49e36308fc976bfde364
2020-08-21 15:48:46 +00:00
Michael Johnson f2cda017dc Add a message for the amphora image size
This patch adds an output from the diskimage-create.sh script that
shows the generated image size.
This is handy for seeing the impact of a patch on the generated
amphora image size.

Change-Id: Id18783acefc5ba9acb1789a2fd3d52df603f292a
2020-08-18 18:55:35 +00:00
Carlos Goncalves 611af6008a Set Grub timeout to 0 for fast boot times
The default Grub timeout is 5 set by the bootloader element. Setting
timeout to zero helps reduce boot times.

Change-Id: I82d877a41d7339891a388e26d149fd65cb61c727
2020-08-12 13:00:24 +02:00
Thobias Salazar Trevisan d8d722b54d diskimage-create compatible with ShellCheck.
Update diskimage-create script to pass in
ShellCheck (https://www.shellcheck.net/) tool.

Change-Id: Ia0dddac00155e11098fcbd3e95bcae12f2fc63d4
2020-06-19 10:22:07 -03:00
Michael Johnson a720f76c84 Remove Babel requirement
Babel is no longer a requirement for OpenStack projects.
Let's remove it and save some disk space.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-April/014227.html

Change-Id: Ib4944fb44fea53c8dd1908b7f264d45a84884639
2020-04-17 09:46:14 -07:00
Michael Johnson c8b044af4a Stop "dnf makecache" in the amphora images
On base operating systems that use DNF there can be a systemd timer
that attempts to call out and update the dnf cache every hour.
This patch adds an diskimage-builder element that disables this
timer as most amphora will not be successful in updating this cache
because they do not have network access or DNS services avaialable.

Change-Id: I5dec631d3e66e1dfb6b8741caea89938ee18a7d8
Story: 2007408
Task: 39019
2020-03-16 16:53:27 +00:00
Adam Harwell d973322529 Add diskimage-create arg for Octavia Git branch
Use `-g` to select the current Git branch to use for the amphora
build. This has historically been confusing for people, and this should
make it a little easier.

Change-Id: Iab01faaa17507c7bea399db7ee8f27f88d8de183
2020-02-05 13:14:48 -08:00
Carlos Goncalves dc2dd711e6 Stop supporting CentOS 7 controllers and images
The diskimage-create.sh tool will now default to CentOS 8 when building
CentOS-based amphora images.

This patch also removes leftover references to support for Ubuntu Trusty
and Xenial.

Change-Id: I3aba59c8dd86aeeee28cc6a67af93697912fb55b
2020-01-08 17:59:09 +01:00
Michal Arbet 7f929bab96 Fix diskimage-create.sh for Debian
As Ubuntu is debian-like platform, there is no reason
to not support building image on Debian platform. Currently diskimage-create.sh is
using head -n 1 to read /etc/os-release to fill platform bash variable.
Bash platform variable is filled with NAME="Ubuntu" string as it is first
line of Ubuntu's /etc/os-release. In debian the first line is for example
PRETTY_NAME="Debian GNU/Linux 10 (buster)".

This commit is fixing this behavior and fill platform bash variable
to exact NAME variable from /etc/os-release.

Change-Id: If7b507c30720516dc8dfd181170476f9ef003748
2019-12-25 11:28:43 +01:00
Michael Johnson 7471129c27 Stop supporting xenial amphora images
OpenStack is dropping support for xenial[1].

This patch removes references to support for xenial amphora images
and stops the nightly build of xenial amphora test images.

[1] https://review.opendev.org/#/c/695114/

Change-Id: I1bc0a37f35839a5f9a95650af7c82239f6544c50
2019-12-06 08:43:39 -08:00
Michael Johnson 7ad61bb451 Remove unnecessary interface configurations
The image building process adds some unnecessary network interface
configuration files to /etc/network/interfaces.d. This element cleans those
out as they are not needed because cloud-init will create the required
configuration file.

Change-Id: If5fbfc34ff0e91608f402811aa2b78c9cbcb00ec
2019-11-20 16:02:42 -08:00
Zuul 6b58e66868 Merge "Add Gentoo platform detection in diskimage-create/diskimage-create.sh" 2019-10-22 03:28:58 +00:00
Michael Johnson 9be2e4d4d2 Add the Amphora image building guide to the docs
This patch adds the Amphora image building guide from the
diskimage-create README.rst to the Administration documentation.
It also re-organizes the Adminstration guides to be broken down
by category as the old page was becoming a long list of guides.
(I like that kind of problem)
The diskimage-create README has a few formating corrections to make
it render better for the documentation.

Change-Id: Ice4071e1f872c8c0d0595427cff6f02ffbcf7968
2019-10-09 15:33:41 -07:00
Zuul ca80bc9e03 Merge "Bump diskimage-builder minimum to 2.24.0" 2019-10-09 01:32:49 +00:00
Daniel 'f0o' Preussker d429af5d53 Add Gentoo platform detection in diskimage-create/diskimage-create.sh
Change-Id: Iac685b424d6ab03a23c35c9eef8356f50a2fe952
Task: 36882
Story: 2006646
2019-10-02 10:56:41 +02:00
Michael Johnson fbe328397b Fix the diskimage-create tox "build" environment
The recently added tox "build" environment had a few problems:
1. It was not honoring the DIB_* environment variables which meant
in always built a master branch image.
2. It also failed to run repeatedly due to a cache directory path issue.
3. The built images were stored in a hidden folder ".amp_tox_test".

This patch fixes those issues, resolves a confusing
"dpkg Broken pipe" message, and adds a "Successfully built" message
at the end of the built that highlights which branch the image was
built against (master, stable/stein, etc.).

Change-Id: I826c5f753f159b2d5dee97d4e2922826444ea6da
2019-09-19 04:12:37 +00:00
Michael Johnson 1aeb416a7e Bump diskimage-builder minimum to 2.24.0
There was a bug[1] in diskimage-builder when using pypi mirrors
if the host doesn't have "python" available DIB will fail.
So, I am going to bump the requirements minimum in Octavia for
diskimage-builder to be the minimum version with this fix.

[1] https://bugs.launchpad.net/diskimage-builder/+bug/1577105

Change-Id: If0ff2a855ad5b9d9ef3742ad0596c97a6dbf81ed
2019-09-10 22:20:42 +00:00
Zuul 60bd083ce6 Merge "Force DIB Python version for py2 in diskimage-create" 2019-08-27 23:49:22 +00:00
Michael Johnson f8d4f8aee8 Add the DIB_REPO* variables to the README.rst
This patch adds the DIB_REPOLOCATION_amphora_agent and
DIB_REPOREF_amphora_agent optional environment variables to the
Octavia diskimage-create README.rst to clarify how to override the
amphora agent version in image builds.

Change-Id: Ic9beec74f84176d27fbefcc2fba281444ab02fa2
2019-08-05 14:30:26 -07:00
Gregory Thiemonge 2504c10916 Force DIB Python version for py2 in diskimage-create
DIB automatically picks a Python version based on the distro and
version. For Ubuntu Bionic, that default is Python 3 which means the
amphora-agent does not run on Python 2 when it was expected to on -py2
jobs [1].

[1] http://logs.openstack.org/10/661310/8/check/ \
    octavia-v2-dsvm-py2-scenario/664a91b/controller/logs/dib-build/ \
    amphora-x64-haproxy.qcow2_log.txt.gz#_2019-07-27_15_51_58_393

Change-Id: I6fd12be06bc848b3e29828c091f61229703e3a57
2019-07-31 14:39:10 +02:00
Carlos Goncalves 262ffaa9d7 Build amphora image using centos-minimal element
This patch changes CentOS amphora images to be built using the
centos-minimal DIB element. The generated image size is reduce from
approximately 702 MB to 520 MB. Compatibility with 'centos' AMP_BASEOS
is kept.

Change-Id: Iffc4a9725bff41618edbf246dd5a167b4e0ef6d3
2019-07-27 11:26:52 +02:00
Zuul f4094381fd Merge "Make Ubuntu bionic the default for amphora images" 2019-07-27 03:46:17 +00:00
Michael Johnson 24fc7d615e Make Ubuntu bionic the default for amphora images
This patch updates the diskimage-create script to select Ubuntu
bionic as the default version of Ubuntu for the amphora image.

Change-Id: Ie8bbcbe073644137b8eb04c42d9457f507513007
2019-07-23 14:52:50 -07:00
Carlos Goncalves b12e5bb25e Add cloud-init-datasources DIB element
The cloud-init-datasources DIB element configures cloud-init to only use
an explicit list of data sources. Until the switch from ubuntu element
to ubuntu-minimal, cloud-init was being configured to only use
ConfigDrive datasource because the ubuntu element had
cloud-init-datasources as element dependency. The ubuntu-minimal and
other OS elements (e.g. RHEL-based) do not have it, so the export
DIB_CLOUD_INIT_DATASOURCES was not being used.

Change-Id: I74ecc826596c5f739a49defe6588bcc741b03594
2019-07-16 14:34:26 +02:00