Skip to content

Skip Manila checks when catalog show returns empty JSON - #39

Draft
imatza-rh wants to merge 2 commits into
mainfrom
fix-manila-empty-catalog-json
Draft

Skip Manila checks when catalog show returns empty JSON#39
imatza-rh wants to merge 2 commits into
mainfrom
fix-manila-empty-catalog-json

Conversation

@imatza-rh

Copy link
Copy Markdown
Contributor

Why

openstack catalog show manila -f json exits 0 with stdout {} when the service is missing (stderr: service manila not found). After PR #32 switched this check from -c name to -f json, when: manila_enabled.rc == 0 still includes check_manila.yml.

That failed shiftstack adoption on a 17.1 cloud with no share service: tp !2579 build fcec78ca / OSPRH-34580.

Live titan35 (2026-09-05): catalog list has no manila/share; catalog show nova -f json is a 4-key object; missing manila is {}.

Change

Require non-empty parsed JSON as well as rc == 0. default('{}', true) so empty stdout cannot crash the when (Ansible does not short-circuit the list).

This branch also carries the rebased Swift matcher from #37 (ns.imagens/image) plus current main (PR #36). Pin pull/N/head of this PR for adoption CI — one cifmw_shiftstack_qa_change_ref cannot pin two PRs.

Do not merge until the adoption skip-ahead chain is green.

Made with Cursor

imatza-rh and others added 2 commits September 5, 2026 19:22
The JSON-output migration in commit 1540a56 changed the Swift object
search from grep (where '.' matches any character including '/') to
jq contains() (where '.' is a literal dot). This caused the search
target 'swift-check-NNNN.fooapp' to never match the actual Swift
object paths which use '/' as separator:
  files/docker/registry/v2/repositories/swift-check-NNNN/fooapp/...

Change the target separator from '.' to '/' to match the actual
object name structure in Swift.

Verified on live environment: old pattern matched 0 objects, new
pattern correctly matches 7 objects.

Fixes regression from 1540a56 (Harden verification OpenStack CLI
calls to use JSON output).

Assisted-By: Claude Code
Signed-off-by: Itay Matza <imatza@redhat.com>
OSPRH-34580
openstack catalog show manila -f json exits 0 with "{}" when the
service is absent, so checking rc alone still runs check_manila.yml
on 17.1 clouds without share.

Co-authored-by: Cursor <cursoragent@cursor.com>
Change-Id: I7c013aa3ac8eca9045468d792d24ac2feed878a6
@openshift-ci

openshift-ci Bot commented Sep 5, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tusharjadhav3302 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant