Skip to content

Commit

Permalink
Fix sushy_emulator integration in reproducer
Browse files Browse the repository at this point in the history
It's a followup of openstack-k8s-operators#1753.
We get rid of realpath filter which resolves the path using the
controller's filesystem [1]. When the filesystems don't match between
the controller and the remote machine, we might hit somme issues.
For instance, when running controller on a Fedora CoreOS system,
the '/home' gets resolved as '/var/home' by realpath, leading to
incorrect path in remote machine.
Without 'realpath', we end up with the '..' in the patch which is
a bit uggly but we keep the consistency.

Also, we set the hypervisor ansible user used as the emulator libvirt
user in order to have a more dynamic configuration, otherwise it fails
by default if hypervisor ansible user is not 'zuul' (i.e default user).

[1] https://docs.ansible.com/ansible/latest/collections/ansible/builtin/realpath_filter.html#synopsis
  • Loading branch information
jcapiitao committed Jun 5, 2024
1 parent 6a7e9fb commit 4b28cf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roles/reproducer/tasks/configure_controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
cifmw_sushy_emulator_sshkey_path: >-
{{
[_ctl_reproducer_basedir, '../.ssh/sushy_emulator-key'] |
path_join | realpath
path_join
}}
cifmw_podman_user_linger: "zuul"
cifmw_sushy_emulator_libvirt_user: "{{ hostvars[cifmw_sushy_emulator_hypervisor_target].ansible_user }}"
block:
- name: Ensure directories exist
ansible.builtin.file:
Expand Down

0 comments on commit 4b28cf6

Please sign in to comment.