Skip to content

Commit

Permalink
Bump up Ansible supported versions to 7.x/8.x
Browse files Browse the repository at this point in the history
This change bumps up the maximum supported version of Ansible to 8.x
(ansible-core 2.15.x) and minimum to 7.x (ansible-core 2.14.x).

Depends on:
stackhpc/ansible-role-systemd-networkd#10

stackhpc/dell-powerconnect-switch#13

stackhpc/mellanox-switch#8

gateway_ip was being set to empty string. This was triggering neutron
""Invalid input for gateway_ip. Reason: '' is not a valid IP address."
Omitting by default.

Installing openstack.cloud collection.
Upgrade failed as Ansible in kayobe-venv was not upgraded.

Change-Id: Ia3550644e5fc3e83f792e46d42b4c35d5eec4705
  • Loading branch information
grzegorzkoper committed Nov 7, 2023
1 parent ed75bf8 commit 80f6db3
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion ansible/inventory/group_vars/all/pip
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
pip_upper_constraints_file: "https://releases.openstack.org/constraints/upper/{{ openstack_release }}"

# Upper constraints file for installation of openstacksdk.
openstacksdk_upper_constraints_file: "https://releases.openstack.org/constraints/upper/yoga"
openstacksdk_upper_constraints_file: "https://releases.openstack.org/constraints/upper/{{ openstack_release }}"
4 changes: 2 additions & 2 deletions ansible/provision-net.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
subnets:
- name: "{{ kolla_ironic_provisioning_network }}"
cidr: "{{ provision_wl_net_name | net_cidr }}"
gateway_ip: "{{ provision_wl_net_name | net_neutron_gateway or provision_wl_net_name | net_gateway }}"
gateway_ip: "{{ provision_wl_net_name | net_neutron_gateway or provision_wl_net_name | net_gateway | default(omit, True) }}"
allocation_pool_start: "{{ provision_wl_net_name | net_neutron_allocation_pool_start }}"
allocation_pool_end: "{{ provision_wl_net_name | net_neutron_allocation_pool_end }}"
cleaning_net:
Expand All @@ -41,7 +41,7 @@
subnets:
- name: "{{ kolla_ironic_cleaning_network }}"
cidr: "{{ cleaning_net_name | net_cidr }}"
gateway_ip: "{{ cleaning_net_name | net_neutron_gateway or cleaning_net_name | net_gateway }}"
gateway_ip: "{{ cleaning_net_name | net_neutron_gateway or cleaning_net_name | net_gateway | default(omit, True) }}"
allocation_pool_start: "{{ cleaning_net_name | net_neutron_allocation_pool_start }}"
allocation_pool_end: "{{ cleaning_net_name | net_neutron_allocation_pool_end }}"
network_registrations: "{{ [provision_net] + ([] if cleaning_net_name == provision_wl_net_name else [cleaning_net]) }}"
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/ipa-images/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

- block:
- name: Gather facts about Ironic Python Agent (IPA) kernel image
os_image_info:
openstack.cloud.image_info:
auth_type: "{{ ipa_images_openstack_auth_type }}"
auth: "{{ ipa_images_openstack_auth }}"
cacert: "{{ ipa_images_openstack_cacert | default(omit, true) }}"
Expand All @@ -71,7 +71,7 @@
register: ipa_images_kernel

- name: Gather facts about Ironic Python Agent (IPA) ramdisk image
os_image_info:
openstack.cloud.image_info:
auth_type: "{{ ipa_images_openstack_auth_type }}"
auth: "{{ ipa_images_openstack_auth }}"
cacert: "{{ ipa_images_openstack_cacert | default(omit, true) }}"
Expand Down Expand Up @@ -101,7 +101,7 @@
environment: "{{ ipa_images_openstack_auth_env }}"

- name: Ensure Ironic Python Agent (IPA) images are registered with Glance
os_image:
openstack.cloud.image:
auth_type: "{{ ipa_images_openstack_auth_type }}"
auth: "{{ ipa_images_openstack_auth }}"
cacert: "{{ ipa_images_openstack_cacert | default(omit, true) }}"
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/ipa-images/tasks/set-driver-info.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

- name: Retrieve deployment image uuids
os_image_info:
openstack.cloud.image_info:
auth_type: "{{ ipa_images_openstack_auth_type }}"
auth: "{{ ipa_images_openstack_auth }}"
cacert: "{{ ipa_images_openstack_cacert | default(omit, true) }}"
Expand All @@ -14,11 +14,11 @@

- name: Set fact containing kernel uuid
set_fact:
ipa_images_kernel_uuid: "{{ ipa_images_glance.results[0].openstack_images[0].id }}"
ipa_images_kernel_uuid: "{{ ipa_images_glance.results[0].images[0].id }}"

- name: Set fact containing ramdisk uuid
set_fact:
ipa_images_ramdisk_uuid: "{{ ipa_images_glance.results[1].openstack_images[0].id }}"
ipa_images_ramdisk_uuid: "{{ ipa_images_glance.results[1].images[0].id }}"

- name: Get a list of ironic nodes
command: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import copy

from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
from ansible_collections.openstack.cloud.plugins.module_utils.openstack import *

# Store a list of import errors to report to the user.
IMPORT_ERRORS = []
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/kolla-ansible/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ kolla_ansible_venv_extra_requirements: []
# Pip requirement specifier for the ansible package. NOTE: This limits the
# version of ansible used by kolla-ansible to avoid new releases from breaking
# tested code. Changes to this limit should be tested.
kolla_ansible_venv_ansible: 'ansible>=6,<8.0'
kolla_ansible_venv_ansible_core: 'ansible-core>=2.13,<=2.14.2'
kolla_ansible_venv_ansible: 'ansible>=7,<9.0'
kolla_ansible_venv_ansible_core: 'ansible-core>=2.14,<2.16'

# Path to a requirements.yml file for Ansible collections.
kolla_ansible_requirements_yml: "{{ kolla_ansible_venv }}/share/kolla-ansible/requirements.yml"
Expand Down
6 changes: 3 additions & 3 deletions molecule-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# process, which may cause wedges in the gate later.

ansible-lint>=3.0.0,<6.0.0,!=4.3.0 # MIT
ansible-compat<4 # MIT
ansible-compat # MIT
docker # Apache-2.0
molecule<4.1.0 # MIT
molecule-docker # MIT
molecule # MIT
molecule-plugins[docker] # MIT
pytest-metadata # MPL
pytest-molecule # MIT
pytest-testinfra
Expand Down
6 changes: 6 additions & 0 deletions releasenotes/notes/ansible-bump-7-8-b8245f34bf436736.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
upgrade:
- |
Updates the maximum supported version of Ansible from 7.x (ansible-core
2.14) to 8.x (ansible-core 2.15). The minimum supported version is updated
from 6.x to 7.x. This is true for both Kayobe and Kolla Ansible.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pbr>=2.0 # Apache-2.0
Jinja2>3 # BSD
ansible>=6,<8.0 # GPLv3
ansible>=7,<9.0 # GPLv3
cliff>=3.1.0 # Apache
netaddr!=0.7.16,>=0.7.13 # BSD
PyYAML>=3.10.0 # MIT
Expand Down
8 changes: 5 additions & 3 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ collections:
version: master
- name: dellemc.os10
version: 1.1.1
- name: openstack.cloud
version: '<3'

roles:
- src: ahuffman.resolv
version: 1.3.1
- src: stackhpc.systemd_networkd
version: v1.0.1
version: v1.0.5
- src: giovtorres.tuned
version: 1.1.0
- src: jriguera.configdrive
Expand All @@ -27,7 +29,7 @@ roles:
- src: singleplatform-eng.users
version: v1.2.5
- src: stackhpc.dell-powerconnect-switch
version: v1.1.0
version: v1.2.1
- src: stackhpc.drac
version: 1.1.6
- src: stackhpc.drac-facts
Expand All @@ -41,7 +43,7 @@ roles:
- src: stackhpc.luks
version: 0.4.2
- src: stackhpc.mellanox-switch
version: v1.0.0
version: v1.0.1
- src: stackhpc.os-images
version: v1.16.0
- src: stackhpc.os-ironic-state
Expand Down

0 comments on commit 80f6db3

Please sign in to comment.