-
Radosław Piliszek authored
Depending on the way the testing script is called, it may sense stdin being available and not being a tty [1]. The logic in the Glance part of the client is then broken [2] as it detects both volume and stdin as sources of the image and fails. The proposed approach uses the script module for these tests. This fixes the cephadm upgrade jobs where this script was called using the shell module which causes this behaviour. The script module is not affected. FWIW, the command module is affected the same as shell because shell extends the command module. [1] https://opendev.org/openstack/python-openstackclient/src/commit/6810414e45a32dd44263dff47fec161989508ef0/openstackclient/image/v2/image.py#L114-L120 [2] https://opendev.org/openstack/python-openstackclient/src/commit/6810414e45a32dd44263dff47fec161989508ef0/openstackclient/image/v2/image.py#L414 Change-Id: I3ce4059063e3a51eb1c5b42bda79893b56bd85f0 Story: 2006294
Radosław Piliszek authoredDepending on the way the testing script is called, it may sense stdin being available and not being a tty [1]. The logic in the Glance part of the client is then broken [2] as it detects both volume and stdin as sources of the image and fails. The proposed approach uses the script module for these tests. This fixes the cephadm upgrade jobs where this script was called using the shell module which causes this behaviour. The script module is not affected. FWIW, the command module is affected the same as shell because shell extends the command module. [1] https://opendev.org/openstack/python-openstackclient/src/commit/6810414e45a32dd44263dff47fec161989508ef0/openstackclient/image/v2/image.py#L114-L120 [2] https://opendev.org/openstack/python-openstackclient/src/commit/6810414e45a32dd44263dff47fec161989508ef0/openstackclient/image/v2/image.py#L414 Change-Id: I3ce4059063e3a51eb1c5b42bda79893b56bd85f0 Story: 2006294
run.yml 28.69 KiB
---
- hosts: all
any_errors_fatal: true
tasks:
# NOTE(yoctozepto): ensure we pick up fact changes from pre
- name: Refresh facts
setup:
# NOTE(yoctozepto): setting vars as facts for all to have them around in all the plays
- name: set facts for commonly used variables
vars:
# NOTE(yoctozepto): needed here to use in other facts too
openstack_core_enabled: "{{ scenario not in ['bifrost', 'mariadb', 'prometheus-efk', 'monasca', 'venus'] }}"
set_fact:
kolla_inventory_path: "/etc/kolla/inventory"
logs_dir: "/tmp/logs"
ansible_collection_kolla_src_dir: "{{ ansible_env.PWD }}/src/{{ zuul.project.canonical_hostname }}/openstack/ansible-collection-kolla"
kolla_ansible_src_dir: "{{ ansible_env.PWD }}/src/{{ zuul.project.canonical_hostname }}/openstack/kolla-ansible"
kolla_ansible_local_src_dir: "{{ zuul.executor.work_root }}/src/{{ zuul.project.canonical_hostname }}/openstack/kolla-ansible"
infra_dockerhub_mirror: "http://{{ zuul_site_mirror_fqdn }}:8082/"
need_build_image: false
build_image_tag: "change_{{ zuul.change | default('none') }}"
openstack_core_enabled: "{{ openstack_core_enabled }}"
openstack_core_tested: "{{ scenario in ['core', 'cephadm', 'zun', 'cells', 'swift', 'linuxbridge', 'ovn'] }}"
dashboard_enabled: "{{ openstack_core_enabled or scenario in ['monasca'] }}"
upper_constraints_file: "{{ ansible_env.HOME }}/src/opendev.org/openstack/requirements/upper-constraints.txt"
docker_image_tag_suffix: "{{ '-aarch64' if ansible_architecture == 'aarch64' else '' }}"
pip_user_path_env:
PATH: "{{ ansible_env.HOME + '/.local/bin:' + ansible_env.PATH }}"
- name: Install dig for Designate testing
become: true
package:
name: "{{ 'bind-utils' if ansible_os_family == 'RedHat' else 'dnsutils' }}"
when: scenario == 'magnum'
- name: Install xfsprogs package for Swift filesystems
become: true
package:
name: xfsprogs
when: scenario == 'swift'
- name: Prepare disks for a storage service
script: "setup_disks.sh {{ disk_type }}"
when: scenario in ['cephadm', 'zun', 'swift']
become: true
vars:
disk_type: "{{ 'ceph-lvm' if scenario in ['cephadm'] else scenario }}"
- hosts: primary
any_errors_fatal: true
vars:
kolla_build_config:
DEFAULT:
profile: gate
logs_dir: /tmp/logs/build
quiet: true
# NOTE(yoctozepto): we cannot build and push at the same time on debian
# buster see https://github.com/docker/for-linux/issues/711.
push: "{{ base_distro != 'debian' }}"
base: "{{ base_distro }}"
registry: "127.0.0.1:4000"
namespace: lokolla
tag: "{{ build_image_tag }}"
template_override: /etc/kolla/template_overrides.j2
# NOTE(yoctozepto): to avoid issues with IPv6 not enabled in the docker daemon
# and since we don't need isolated networks here, use host networking
network_mode: host
environment: "{{ pip_user_path_env }}"
tasks: