Skip to content

Harden verification OpenStack CLI calls to use JSON output - #32

Open
tusharjadhav3302 wants to merge 2 commits into
mainfrom
fix-verification-openstack-cli-json
Open

Harden verification OpenStack CLI calls to use JSON output#32
tusharjadhav3302 wants to merge 2 commits into
mainfrom
fix-verification-openstack-cli-json

Conversation

@tusharjadhav3302

Copy link
Copy Markdown
Contributor

Summary

  • Replace fragile openstack … -f value / -c / csv+grep usage in verification with -f json and structured Ansible (or jq) parsing.
  • Fixes the 4.23-class failure on floating ip show … -c fixed_ip_address -f valueInvalid formatter provided in check_lb_svc.yml.
  • Covers Priority A verification path only: LB FIP checks, cinder CSI AZ lookup, Swift registry object scan, prometheus PVC volume check, and manila catalog presence.

Test plan

  • ansible-lint / dry-read touched YAML
  • Confirm OSC -f json keys locally if possible (fixed_ip_address, vip_address, provider, availability_zone)
  • Watch next shiftstack-rhel9-rhoso18.0-ocp423 (and other version nightlies): LB FIP task must not fail with Invalid formatter provided; cinder/registry/prometheus/manila checks still pass when enabled

Made with Cursor

Replace fragile -f value/-c/csv+grep parsing in Priority A verification
tasks with -f json and structured parsing so OSC formatter drift (e.g.
Invalid formatter provided on floating ip show) no longer fails nightlies.

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

openshift-ci Bot commented Aug 6, 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

On shiftstackclient OSC, `openstack floating ip show … -f *` always
returns Invalid formatter provided. Look up Fixed IP Address via
`floating ip list --floating-ip-address … -f json` instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tusharjadhav3302

Copy link
Copy Markdown
Contributor Author

Manual validation on shiftstackclient (serval71 / MR !2584 env)

openstack floating ip show <ip> -f {json,yaml,shell,table,value} all fail with Invalid formatter provided (despite help listing those formatters).

Working approach:

openstack floating ip list --floating-ip-address <fip> -f json
# keys: "Floating IP Address", "Fixed IP Address", "ID", ...

openstack loadbalancer list -f json works (keys: vip_address, provider, …).

Pushed a follow-up commit switching FIP lookup/removal checks to floating ip list.

@tusharjadhav3302 tusharjadhav3302 added the ready-for-review PR is ready for code review label Aug 7, 2026
@tusharjadhav3302 tusharjadhav3302 mentioned this pull request Aug 9, 2026
2 tasks
@tusharjadhav3302

Copy link
Copy Markdown
Contributor Author

Validation update (via throwaway #34)

OSC JSON / FIP verification path was exercised in testproject !2584 when pinned to combine PR #34 (refs/pull/34/head):

  • Job fetched the combine (includes this PR)
  • Install + verification (incl. check_lb_svc) completed — no real Invalid formatter provided on floating ip show … -f value
  • day2ops SUCCESS
  • Job then failed later in openstack_test for an unrelated OTE reporting issue (addressed in Adapt openstack_test stage to OTE (drop legacy make openstack-tests) #33), not in verification

Follow-up manual work on serval71 focused on #33/openstack_test; this PR’s verification fix remains in good shape for merge once reviewers are happy. TP recheck with refreshed #34 is still pending for an end-to-end green/unstable path.

1 similar comment
@tusharjadhav3302

Copy link
Copy Markdown
Contributor Author

Validation update (via throwaway #34)

OSC JSON / FIP verification path was exercised in testproject !2584 when pinned to combine PR #34 (refs/pull/34/head):

  • Job fetched the combine (includes this PR)
  • Install + verification (incl. check_lb_svc) completed — no real Invalid formatter provided on floating ip show … -f value
  • day2ops SUCCESS
  • Job then failed later in openstack_test for an unrelated OTE reporting issue (addressed in Adapt openstack_test stage to OTE (drop legacy make openstack-tests) #33), not in verification

Follow-up manual work on serval71 focused on #33/openstack_test; this PR’s verification fix remains in good shape for merge once reviewers are happy. TP recheck with refreshed #34 is still pending for an end-to-end green/unstable path.

@tusharjadhav3302

Copy link
Copy Markdown
Contributor Author

Manual validation complete (serval71) — still targeting Zuul green

Full post-install path exercised on a live RHOSO + guest OCP 4.23 cluster using throwaway combine #34 (includes this PR).

Stage Result
verification (this PR — OSC JSON / FIP) Pass (earlier TP !2584 with #34; no Invalid formatter on LB FIP)
day2ops Pass (same TP)
openstack_test / lb_tests / egressip See #33 — automation OK; not blocked by this PR

We will still drive Zuul green on testproject !2584 (pin refs/pull/34/head) for an official check run before merge.

@imatza-rh

Copy link
Copy Markdown
Contributor

/lgtm

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

Labels

lgtm ready-for-review PR is ready for code review

Development

Successfully merging this pull request may close these issues.

2 participants