qa/tasks: avoid podman TTY flake, verify gateway/host creation#67241
qa/tasks: avoid podman TTY flake, verify gateway/host creation#67241
Conversation
This PR applies minimal changes to test_iscsi_setup.sh to reduce intermittent gwcli failures. Changes: - Introduce ISCSI_INITIATOR_IQN variable (replace repeated literal IQN) - Use podman exec -i (drop -t) for more reliable non-interactive runs - Add small waits to confirm gateway and host appear in gwcli before configuring CHAP / adding disks - Add a best-effort gwcli state dump on failure via trap ERR Signed-off-by: Redouane Kachach <rkachach@ibm.com>
|
I removed the |
Signed-off-by: Redouane Kachach <rkachach@ibm.com>
| container_gwcli /iscsi-targets/iqn.2003-01.com.redhat.iscsi-gw:iscsi-igw ls | ||
| container_gwcli /iscsi-targets/iqn.2003-01.com.redhat.iscsi-gw:iscsi-igw/gateways ls | ||
| container_gwcli /iscsi-targets/iqn.2003-01.com.redhat.iscsi-gw:iscsi-igw/hosts ls |
There was a problem hiding this comment.
iqn.2003-01.com.redhat.iscsi-gw:iscsi-igw is repeated in a lot of place.
Can we introduce something similar to ISCSI_INITIATOR_IQN for the target as well?
May be something like:
ISCSI_TARGET_IQN="iqn.2003-01.com.redhat.iscsi-gw:iscsi-igw:
GWCLI_TARGET="/iscsi-targets/${ISCSI_TARGET_IQN}"
| wait_for_ls_contains() { | ||
| # Usage: wait_for_ls_contains <path> <needle> [retries] [sleep_s] | ||
| local path="$1" | ||
| local needle="$2" | ||
| local retries="${3:-30}" | ||
| local sleep_s="${4:-1}" | ||
|
|
||
| for ((i=1; i<=retries; i++)); do | ||
| if container_gwcli "${path}" ls 2>/dev/null | grep -qF "${needle}"; then | ||
| return 0 | ||
| fi | ||
| sleep "${sleep_s}" | ||
| done | ||
| return 1 |
There was a problem hiding this comment.
Is there a possibility to optionally log the last seen output. It can help confirm whether the list was empty or the command failing.
ashjosh1git
left a comment
There was a problem hiding this comment.
Apart from Kushal's comments, the rest looks good to me.
This PR applies minimal changes to test_iscsi_setup.sh to reduce intermittent gwcli failures.
Changes:
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.