diff --git a/ansible-collections-requirements.yml b/ansible-collections-requirements.yml index fca3e6d56..9cd55a61b 100644 --- a/ansible-collections-requirements.yml +++ b/ansible-collections-requirements.yml @@ -1,6 +1,4 @@ collections: - name: openstack.cloud - # NOTE(dtantsur): replace with >=2.0.0 when ready. The next version after - # 1.8.0 will be incompatible with openstacksdk in Zed constraints. - version: '>=1.3.0,<=1.8.0' + version: '>=1.3.0,<2.0.0' source: https://galaxy.ansible.com diff --git a/playbooks/ci/upgrade.yaml b/playbooks/ci/upgrade.yaml index 03db1d0a0..4fd2b27f0 100644 --- a/playbooks/ci/upgrade.yaml +++ b/playbooks/ci/upgrade.yaml @@ -18,7 +18,7 @@ UPPER_CONSTRAINTS_FILE: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt" WORKSPACE: "{{ ansible_user_dir }}/src/opendev.org" ZUUL_BRANCH: "{{ upgrade_from }}" - - command: git checkout - + - command: git checkout --force - args: chdir: "{{ ansible_user_dir }}/{{ item.src_dir }}" loop: "{{ zuul.projects.values() | list }}" diff --git a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml index 685a3d6ee..cf3d75dc1 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml @@ -92,6 +92,14 @@ group: "{{ ansible_user_gid }}" when: copy_from_local_path | bool +# FIXME(dtantsur): downgrade openstacksdk since ansible-collections-openstack +# before 2.0.0 cannot work with 0.99.0. Remove when we use >=2.0.0. +- name: downgrade openstacksdk in upper constraints + lineinfile: + path: "{{ upper_constraints_file }}" + regexp: "^openstacksdk=" + line: "openstacksdk===0.61.0" + - include: prepare_libvirt.yml - name: truncate explicit list of vm names diff --git a/playbooks/roles/bifrost-prep-for-install/defaults/main.yml b/playbooks/roles/bifrost-prep-for-install/defaults/main.yml index 795215a15..35c1192ba 100644 --- a/playbooks/roles/bifrost-prep-for-install/defaults/main.yml +++ b/playbooks/roles/bifrost-prep-for-install/defaults/main.yml @@ -133,3 +133,7 @@ bifrost_install_sources: # Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}" ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}" +upper_constraints_file: >- + {{ lookup('env', 'UPPER_CONSTRAINTS_FILE') + | default(lookup('env', 'TOX_CONSTRAINTS_FILE'), True) + | default(reqs_git_folder + '/upper-constraints.txt', True) }} diff --git a/playbooks/roles/bifrost-prep-for-install/tasks/main.yml b/playbooks/roles/bifrost-prep-for-install/tasks/main.yml index 6b9be14e0..ab8ef320a 100644 --- a/playbooks/roles/bifrost-prep-for-install/tasks/main.yml +++ b/playbooks/roles/bifrost-prep-for-install/tasks/main.yml @@ -71,3 +71,11 @@ - copy_from_local_path | bool - item.source_install | default(true) | bool - item.enabled | default(true) | bool + +# FIXME(dtantsur): downgrade openstacksdk since ansible-collections-openstack +# before 2.0.0 cannot work with 0.99.0. Remove when we use >=2.0.0. +- name: downgrade openstacksdk in upper constraints + lineinfile: + path: "{{ upper_constraints_file }}" + regexp: "^openstacksdk=" + line: "openstacksdk===0.61.0" diff --git a/releasenotes/notes/upgrade-98610cf055282398.yaml b/releasenotes/notes/upgrade-98610cf055282398.yaml new file mode 100644 index 000000000..17af44c91 --- /dev/null +++ b/releasenotes/notes/upgrade-98610cf055282398.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes upgrade from Yoga with Keystone enabled by keeping the Yoga version + of openstacksdk until ansible-collections-openstack releases version + 2.0.0. diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index c41e5e98a..a40a8dfaa 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -15,9 +15,7 @@ - bifrost-integration-redfish-vmedia-uefi-ubuntu-focal - bifrost-integration-redfish-vmedia-uefi-centos-9 - bifrost-upgrade-ubuntu-focal - # FIXME(dtantsur): make this voting when Yoga is fixed - - bifrost-upgrade-keystone-centos9: - voting: false + - bifrost-upgrade-keystone-centos9 # Non-voting jobs - bifrost-integration-tinyipa-fedora-latest: voting: false @@ -62,7 +60,7 @@ - bifrost-integration-redfish-vmedia-uefi-ubuntu-focal - bifrost-integration-redfish-vmedia-uefi-centos-9 - bifrost-upgrade-ubuntu-focal - # - bifrost-upgrade-keystone-centos9 + - bifrost-upgrade-keystone-centos9 experimental: jobs: - bifrost-benchmark-ironic