[CI] Use the script module for running core tests

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] 6810414e45/openstackclient/image/v2/image.py (L114-L120)
[2] 6810414e45/openstackclient/image/v2/image.py (L414)

Change-Id: I3ce4059063e3a51eb1c5b42bda79893b56bd85f0
Story: 2006294
This commit is contained in:
Radosław Piliszek 2022-05-28 14:11:57 +02:00
parent 3cef2671ce
commit c906ab2a91
1 changed files with 8 additions and 2 deletions

View File

@ -678,9 +678,15 @@
TLS_ENABLED: "{{ tls_enabled }}"
when: dashboard_enabled
# NOTE(yoctozepto): We need the script module here to avoid
# a bug in Glance OSC [1][2] which results in a failure when a volume
# is given as a source. The stdin works differently in shell/command
# than script.
# [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
- name: Run test-core-openstack.sh script
shell:
cmd: tests/test-core-openstack.sh
script:
cmd: test-core-openstack.sh
executable: /bin/bash
chdir: "{{ kolla_ansible_src_dir }}"
environment: