Skip to content

Fix IPSet hostname lookup regression#3977

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
rebtoor:fix/nfs-import-role-regression
Jun 4, 2026
Merged

Fix IPSet hostname lookup regression#3977
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
rebtoor:fix/nfs-import-role-regression

Conversation

@rebtoor

@rebtoor rebtoor commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

PR #3930 added an explicit ansible.builtin.setup task before the cifmw_nfs role invocation and changed import_role to include_role. Both changes cause ansible_domain to resolve incorrectly in the _nfs_host variable:

  • The explicit setup gathers fresh facts after EDPM deployment has configured the compute's hostname with a domain suffix (ctlplane.example.com), causing the IPSet lookup to use compute-0.ctlplane.example.com instead of compute-0.
  • include_role alters variable scoping so ansible_domain no longer resolves from the play target host's facts.

Fix:

  • Remove the explicit setup task. With gather_facts: false and no manual fact gathering, ansible_domain remains undefined. The select() filter in _nfs_host drops it, producing the correct short hostname matching the IPSet name.
  • Revert include_role back to import_role to restore play-level variable scoping.

Fixes: component-watcher and other NFS-based jobs broken after PR #3930 merged.

Related-Issue: ANVIL-109

Closes: OSPCIX-1394

PR openstack-k8s-operators#3930 added an explicit `ansible.builtin.setup` task before the
`cifmw_nfs` role invocation and changed `import_role` to
`include_role`. Both changes cause `ansible_domain` to resolve
incorrectly in the `_nfs_host` variable:

- The explicit `setup` gathers fresh facts **after** EDPM deployment
  has configured the compute's hostname with a domain suffix
  (`ctlplane.example.com`), causing the IPSet lookup to use
  `compute-0.ctlplane.example.com` instead of `compute-0`.
- `include_role` alters variable scoping so `ansible_domain` no
  longer resolves from the play target host's facts.

**Fix:**

- Remove the explicit `setup` task. With `gather_facts: false` and
  no manual fact gathering, `ansible_domain` remains undefined. The
  `select()` filter in `_nfs_host` drops it, producing the correct
  short hostname matching the IPSet name.
- Revert `include_role` back to `import_role` to restore play-level
  variable scoping.

Fixes: `component-watcher` and other NFS-based jobs broken after
PR openstack-k8s-operators#3930 merged.

Related-Issue: ANVIL-109
Co-authored-by: Cursor <cursoragent@cursor.com>

Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
cescgina added a commit to cescgina/watcher-operator that referenced this pull request Jun 3, 2026
@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/4b27ca07feab4f15a05bc666ed3c360d

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 50m 10s
podified-multinode-edpm-deployment-crc NODE_FAILURE Node(set) request 099-0000110682 failed in 0s
cifmw-crc-podified-edpm-baremetal POST_FAILURE in 1h 36m 08s
cifmw-crc-podified-edpm-baremetal-minor-update NODE_FAILURE Node(set) request 099-0000110684 failed in 0s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 12s
✔️ cifmw-pod-pre-commit SUCCESS in 9m 20s

@rebtoor

rebtoor commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

recheck

@rebtoor

rebtoor commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

tested here

results here

@rebtoor rebtoor requested a review from a team June 4, 2026 05:45
@rebtoor

rebtoor commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

recheck

@Valkyrie00

Copy link
Copy Markdown
Contributor

/lgtm

@nemarjan

nemarjan commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci

openshift-ci Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nemarjan

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

The pull request process is described 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 openshift-ci Bot added the approved label Jun 4, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit ff0fae9 into openstack-k8s-operators:main Jun 4, 2026
18 checks passed
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.

4 participants