Skip to content

feat: validate bastion_lab_interface exists on bastion during setup-bastion#835

Open
mmahut wants to merge 1 commit into
redhat-performance:mainfrom
mmahut:mmahut/bastion_lab_interface
Open

feat: validate bastion_lab_interface exists on bastion during setup-bastion#835
mmahut wants to merge 1 commit into
redhat-performance:mainfrom
mmahut:mmahut/bastion_lab_interface

Conversation

@mmahut
Copy link
Copy Markdown
Contributor

@mmahut mmahut commented May 29, 2026

Fails early in the validate-vars role when bastion_lab_interface is set to an interface that doesn't exist on the bastion, instead of failing later in bastion-network with a cryptic error.

fixes #666

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 29, 2026

[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 josecastillolema 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

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 29, 2026

Hi @mmahut. Thanks for your PR.

I'm waiting for a redhat-performance member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4d9ea2eb-a598-4402-9c16-6491f91730e1

📥 Commits

Reviewing files that changed from the base of the PR and between bee575f and 827c2fb.

📒 Files selected for processing (1)
  • ansible/roles/validate-vars/tasks/main.yml

📝 Walkthrough

Walkthrough

This PR adds a validation task to the bastion setup workflow that ensures the configured lab interface (bastion_lab_interface) actually exists on the bastion host. The task fails early with diagnostic output listing available network interfaces if the configuration is invalid.

Changes

Bastion interface validation

Layer / File(s) Summary
Bastion interface validation task
ansible/roles/validate-vars/tasks/main.yml
Adds a conditional fail task that validates bastion_lab_interface is present in the target host's ansible_interfaces. Fails with available interfaces list and configuration guidance when the interface is missing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A rabbit hops through network lanes,
Checking interfaces, checking names—
If the path don't match, we fail with grace,
And show what NICs exist in place. 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: validate bastion_lab_interface exists on bastion during setup-bastion' accurately and specifically describes the main change - adding validation for the bastion_lab_interface configuration.
Linked Issues check ✅ Passed The PR successfully implements the requirement from issue #666 by adding validation that checks if bastion_lab_interface exists on the bastion and fails early with available interfaces listed.
Out of Scope Changes check ✅ Passed All changes are directly related to the stated objective of validating bastion_lab_interface existence; no out-of-scope modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If bastion_lab_interface does not exist on bastion during bastion-setup.yml throw an error

1 participant