Skip to content

Commit

Permalink
Merge pull request #642 from stackhpc/upstream/2024.1-2024-12-02
Browse files Browse the repository at this point in the history
Synchronise 2024.1 with upstream
  • Loading branch information
priteau authored Dec 2, 2024
2 parents cd3e67b + f661f6f commit 4518709
Show file tree
Hide file tree
Showing 19 changed files with 81 additions and 41 deletions.
1 change: 1 addition & 0 deletions ansible/roles/common/tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@
- { name: "prometheus", enabled: "{{ enable_prometheus | bool }}" }
- { name: "proxysql", enabled: "{{ enable_proxysql | bool }}" }
- { name: "rabbitmq", enabled: "{{ enable_rabbitmq | bool }}" }
- { name: "redis", enabled: "{{ enable_redis | bool }}" }
- { name: "skyline", enabled: "{{ enable_skyline | bool }}" }
- { name: "swift", enabled: "{{ enable_swift | bool }}" }
- { name: "tacker", enabled: "{{ enable_tacker | bool }}" }
Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/common/templates/cron-logrotate-redis.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"/var/log/kolla/redis/*.log"
{
}
1 change: 1 addition & 0 deletions ansible/roles/destroy/tasks/cleanup_host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
kolla_dev_repos_directory: "{{ kolla_dev_repos_directory }}"
opensearch_datadir_volume: "{{ opensearch_datadir_volume }}"
destroy_include_dev: "{{ destroy_include_dev }}"
kolla_ansible_inventories: "{{ inventories_comma_separated.replace(',',' ') }}"

- block:
- name: Disable octavia-interface service
Expand Down
5 changes: 2 additions & 3 deletions ansible/roles/ironic/templates/ironic-dnsmasq.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ bind-interfaces
{% set tag = item.tag | default('range_' ~ loop.index) %}
{% set lease_time = item.lease_time | default(ironic_dnsmasq_dhcp_default_lease_time) %}
dhcp-range=set:{{ tag }},{{ item.range }},{{ lease_time }}
{% if item.routers is defined %}
dhcp-option=tag:{{ tag }},option:router,{{ item.routers }}
{% endif %}
{% if item.routers is defined %}dhcp-option=tag:{{ tag }},option:router,{{ item.routers }}{% endif %}
{% if item.ntp_server is defined %}dhcp-option=tag:{{ tag }},option:ntp-server,{{ item.ntp_server }}{% endif %}
{% endfor %}

{% if api_address_family == 'ipv6' %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ errorlog: "/var/log/kolla/proxysql/proxysql.log"

admin_variables:
admin_credentials: "{{ proxysql_admin_user }}:{{ proxysql_admin_password }}"
mysql_ifaces: "{{ api_interface_address }}:{{ proxysql_admin_port }};{{ kolla_internal_vip_address }}:{{ proxysql_admin_port }};/var/lib/kolla/proxysql/admin.sock"
mysql_ifaces: "{{ api_interface_address | put_address_in_context('url') }}:{{ proxysql_admin_port }};{{ kolla_internal_vip_address | put_address_in_context('url') }}:{{ proxysql_admin_port }};/var/lib/kolla/proxysql/admin.sock"
stats_credentials: "{{ proxysql_stats_user }}:{{ proxysql_stats_password }}"

mysql_variables:
threads: {{ proxysql_workers }}
max_connections: {{ proxysql_max_connections }}
interfaces: "{{ kolla_internal_vip_address }}:{{ database_port }}"
interfaces: "{{ kolla_internal_vip_address | put_address_in_context('url') }}:{{ database_port }}"
monitor_username: "{{ mariadb_monitor_user }}"
monitor_password: "{{ mariadb_monitor_password }}"

Expand All @@ -30,7 +30,7 @@ mysql_servers:
{% set WEIGHT = 10 %}
{% endif %}
- address: "{{ 'api' | kolla_address(host) }}"
port : {{ database_port }}
port : {{ mariadb_port }}
hostgroup : {{ WRITER_GROUP }}
max_connections: {{ proxysql_backend_max_connections }}
max_replication_lag: {{ proxysql_backend_max_replication_lag }}
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/mariadb/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ mariadb_wsrep_extra_provider_options: []
# Backups
####################
mariadb_backup_host: "{{ groups[mariadb_shard_group][0] }}"
mariadb_backup_database_schema: "PERCONA_SCHEMA"
mariadb_backup_database_schema: "mysql"
mariadb_backup_database_user: "{% if mariadb_loadbalancer == 'haproxy' %}backup{% else %}{{ mariadb_shard_backup_user_prefix }}{{ mariadb_shard_id | string }}{% endif %}"
mariadb_backup_type: "full"
mariadb_backup_possible: "{{ mariadb_loadbalancer != 'haproxy' or inventory_hostname in mariadb_default_database_shard_hosts }}"
Expand Down
15 changes: 0 additions & 15 deletions ansible/roles/mariadb/tasks/register.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,6 @@
when:
- inventory_hostname == groups[mariadb_shard_group][0]

- name: Creating the Mariabackup database
become: true
kolla_toolbox:
container_engine: "{{ kolla_container_engine }}"
module_name: mysql_db
module_args:
login_host: "{{ api_interface_address }}"
login_port: "{{ mariadb_port }}"
login_user: "{{ mariadb_shard_database_user }}"
login_password: "{{ database_password }}"
name: "{{ mariadb_backup_database_schema }}"
when:
- enable_mariabackup | bool
- inventory_hostname == mariadb_backup_host

- name: Creating database backup user and setting permissions
become: true
kolla_toolbox:
Expand Down
10 changes: 10 additions & 0 deletions doc/source/reference/bare-metal/ironic-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ are possible by separating addresses with commas):
- range: "192.168.5.100,192.168.5.110"
routers: "192.168.5.1"
Together with an router there can be provided the NTP (time source) server.
For example it can be the same address as default router for the range:

.. code-block:: yaml
ironic_dnsmasq_dhcp_ranges:
- range: "192.168.5.100,192.168.5.110"
routers: "192.168.5.1"
ntp_server: "192.168.5.1"
To support DHCP relay, it is also possible to define a netmask in the range.
It is advisable to also provide a router to allow the traffic to reach the
Ironic server.
Expand Down
7 changes: 7 additions & 0 deletions releasenotes/notes/bug-2052706-dfbbc75fc72c74d1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
Fixes kolla-ansible removing inventory file placed in
``/etc/kolla/<inventory>``.
See `LP#2052706 <https://launchpad.net/bugs/2052706>`__
for more details.
6 changes: 6 additions & 0 deletions releasenotes/notes/bug-2081106-ef0df790780c612d.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fix ProxySQL unable to bind due to incorrect format
of IPv6 addresses in the `mysql_ifaces` configuration.
`LP#2081106 <https://launchpad.net/bugs/2081106>`__
5 changes: 5 additions & 0 deletions releasenotes/notes/bug-2084523-a02f38eecf6c957a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
Add missing logrotate config for redis.
`LP#2084523 <https://bugs.launchpad.net/kolla-ansible/+bug/2084523>`__
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
features:
- |
Adds the ability to provide the NTP (time source) server for multiple DHCP
ranges in the Ironic Inspector DHCP server.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
Updates ``proxysql.yaml.j2`` to use mariadb_port for backends.
This fixes setups where ``database_port`` and ``mariadb_port`` differ.
10 changes: 9 additions & 1 deletion tests/setup_gate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,23 @@ function prepare_images {
sudo tee -a /etc/kolla/kolla-build.conf <<EOF
[DEFAULT]
engine = ${CONTAINER_ENGINE}
EOF

if [[ $BASE_DISTRO == "debian" || $BASE_DISTRO == "ubuntu" ]]; then
sudo tee -a /etc/kolla/kolla-build.conf <<EOF
base_image = quay.io/openstack.kolla/${BASE_DISTRO}
EOF
fi

sudo tee -a /etc/kolla/kolla-build.conf <<EOF
[profiles]
gate = ${GATE_IMAGES}
EOF

sudo mkdir -p /tmp/logs/build
sudo mkdir -p /opt/kolla_registry

sudo $CONTAINER_ENGINE run -d --net=host -e REGISTRY_HTTP_ADDR=0.0.0.0:4000 --restart=always -v /opt/kolla_registry/:/var/lib/registry --name registry registry:2
sudo $CONTAINER_ENGINE run -d --net=host -e REGISTRY_HTTP_ADDR=0.0.0.0:4000 --restart=always -v /opt/kolla_registry/:/var/lib/registry --name registry quay.io/libpod/registry:2.8.2


python3 -m venv ~/kolla-venv
Expand Down
17 changes: 15 additions & 2 deletions tools/cleanup-host
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,27 @@ fi

echo "Getting folders name..."
for dir in $FOLDER_PATH/*; do
skip="false"

for inventory in $kolla_ansible_inventories; do
if [ "$dir" == "$inventory" ]; then
skip="true"
break
fi
done

if [ "$dir" == "$FOLDER_PATH/passwords.yml" ] || \
[ "$dir" == "$FOLDER_PATH/globals.yml" ] || \
[ "$dir" == "$FOLDER_PATH/globals.d" ] || \
[ "$dir" == "$FOLDER_PATH/kolla-build.conf" ] || \
[ "$dir" == "$FOLDER_PATH/config" ] || \
[ "$dir" == "$FOLDER_PATH/certificates" ]; then
echo "Skipping:" $dir
else
echo "Skipping: $dir"
skip="true"
fi

# If it's not to be skipped, remove it
if [ "$skip" == "false" ]; then
rm -rfv $dir
fi
done
Expand Down
8 changes: 8 additions & 0 deletions tools/kolla-ansible
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,20 @@ case "$1" in
(destroy)
ACTION="Destroy Kolla containers, volumes and host configuration"
PLAYBOOK="${BASEDIR}/ansible/destroy.yml"

INVENTORIES_COMMA_SEPARATED=""
for INVENTORY in ${INVENTORIES[@]}; do
INVENTORIES_COMMA_SEPARATED="${INVENTORIES_COMMA_SEPARATED},${INVENTORY}"
done
INVENTORIES_COMMA_SEPARATED=$(echo "${INVENTORIES_COMMA_SEPARATED}" | sed -e 's/^,//g')

if [[ "${INCLUDE_IMAGES}" == "--include-images" ]]; then
EXTRA_OPTS="$EXTRA_OPTS -e destroy_include_images=yes"
fi
if [[ "${INCLUDE_DEV}" == "--include-dev" ]]; then
EXTRA_OPTS="$EXTRA_OPTS -e destroy_include_dev=yes"
fi
EXTRA_OPTS="$EXTRA_OPTS -e inventories_comma_separated=${INVENTORIES_COMMA_SEPARATED}"
if [[ "${DANGER_CONFIRM}" != "--yes-i-really-really-mean-it" ]]; then
cat << EOF
WARNING:
Expand Down
9 changes: 0 additions & 9 deletions zuul.d/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@
tls_enabled: true
container_engine: podman

- job:
name: kolla-ansible-openeuler
parent: kolla-ansible-base
nodeset: kolla-ansible-openeuler-22.03-lts
voting: false
vars:
base_distro: ubuntu
tls_enabled: true

- job:
name: kolla-ansible-rocky9
parent: kolla-ansible-base
Expand Down
6 changes: 0 additions & 6 deletions zuul.d/nodesets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@
- name: secondary2
label: debian-bookworm

- nodeset:
name: kolla-ansible-openeuler-22.03-lts
nodes:
- name: primary
label: openEuler-22-03-LTS

- nodeset:
name: kolla-ansible-rocky9
nodes:
Expand Down
1 change: 0 additions & 1 deletion zuul.d/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
- kolla-ansible-centos9s
- kolla-ansible-debian
- kolla-ansible-debian-podman
- kolla-ansible-openeuler
- kolla-ansible-rocky9
- kolla-ansible-rocky9-podman
- kolla-ansible-ubuntu
Expand Down

0 comments on commit 4518709

Please sign in to comment.