Skip to content

Conversation

@michburk
Copy link
Contributor

quickly checking that the hostvars are populated as expected and we're not just using the default

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 22, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

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

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

@softwarefactory-project-zuul
Copy link

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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/14a7dfa65fe246f3ae9f38caafe2bc12

✔️ cifmw-pod-zuul-files SUCCESS in 9m 26s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 05s
✔️ cifmw-pod-pre-commit SUCCESS in 7m 48s
✔️ build-push-container-cifmw-client SUCCESS in 16m 10s
cifmw-molecule-reproducer FAILURE in 11m 27s

It was already technically possible to create a controller-0 vm with a
non-zuul user. This commit enables configuring controller-0 with a
non-zuul user by using controller-0's `ansible_ssh_user` from
`hostvars` in place of hardcoded `'zuul'`.

It is worth noting that we can't simply use vars like ansible_user_id
or ansible_user_dir with tasks that are delgated to controller-0.
If the host we are running the reproducer from has a different user
from controller-0, these vars will try to use the user from
the machine that is running the reproducer rather than controller-0's
user.

For example, let's say we are running the reproducer from a machine with
the user 'exampleuser' and we have the user 'zuul' on controller-0.
If we have some task that is delegated to controller-0 and
tries to create some file in the controller-0 user's home directory, we
can't simply do:

```
- name: Create some file
  delegate_to: controller-0
  ansible.builtin.file:
    path: "{{ ansible_user_dir }}/some_file.txt"
    state: touch
```

`ansible_user_dir` resolves to `/home/exampleuser`. This path does not
exist on controller-0, so this task would fail.
Previously, the check for `common-requirements.txt` would check if
common requirements exists on localhost at a given path. This path is
based on the home directory on localhost.
If the file did exist, it would use that same path to try to install the
requirements on controller-0. This causes issues when localhost and
controller-0 do not have the same users and home directories.
just making sure hostvars['controller-0']['ansible_ssh_user'] exists as
expected
@michburk
Copy link
Contributor Author

recheck

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.

1 participant