Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sushy_emulator integration in reproducer #1753

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ci/config/molecule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
timeout: 5400
files:
- ^roles/libvirt_manager/(?!meta|README).*
- ^roles/podman/(?!meta|README).*
- ^roles/sushy_emulator/(?!meta|README).*
- job:
name: cifmw-molecule-cert_manager
nodeset: centos-9-crc-2-30-0-xxl
Expand Down
1 change: 1 addition & 0 deletions roles/podman/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Requested to install packages.

* `cifmw_podman_packages`: (List) list of packages to install for Podman. Defaults to `[podman]`.
* `cifmw_podman_enable_linger`: (Bool) toggle session linger. Defaults to `true`.
* `cifmw_podman_user_linger`: (String) target user for session lingering. Defaults to `ansible_user_id`.

## Examples

Expand Down
1 change: 1 addition & 0 deletions roles/podman/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
cifmw_podman_packages:
- podman
cifmw_podman_enable_linger: true
cifmw_podman_user_linger: "{{ ansible_user_id }}"
2 changes: 1 addition & 1 deletion roles/podman/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
when:
- cifmw_podman_enable_linger | bool
ansible.builtin.command:
cmd: "loginctl enable-linger {{ ansible_user_id }}"
cmd: "loginctl enable-linger {{ cifmw_podman_user_linger }}"
8 changes: 8 additions & 0 deletions roles/reproducer/tasks/configure_controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
_cifmw_libvirt_manager_layout.vms.controller.target is undefined
delegate_to: controller-0
delegate_facts: false
vars:
cifmw_sushy_emulator_basedir: "{{ _ctl_reproducer_basedir }}"
cifmw_sushy_emulator_sshkey_path: >-
{{
[_ctl_reproducer_basedir, '../.ssh/sushy_emulator-key'] |
path_join | realpath
}}
cifmw_podman_user_linger: "zuul"
block:
- name: Ensure directories exist
ansible.builtin.file:
Expand Down
2 changes: 1 addition & 1 deletion roles/sushy_emulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Required to installed required packages.

## Parameters

* `cifmw_sushy_emulator_basedir`: (String) Base directory. Defaults to `{{ ansible_user_dir ~ '/ci-framework-data' }}`
* `cifmw_sushy_emulator_basedir`: (String) Base directory. Defaults to `cifmw_basedir`, which defaults to `{{ ansible_user_dir ~ '/ci-framework-data' }}`
* `cifmw_sushy_emulator_container_name`: (String) Name of Podman container created. Defaults to `cifmw-sushy_emulator`
* `cifmw_sushy_emulator_driver`: (String) Select between `openstack` and `libvirt` sushy emulator driver. Defaults to `libvirt`
* `cifmw_sushy_emulator_driver_openstack_client_config_file`: (String) Path to OpenStack config file, used by OpenStack Sushi Emulator driver. Defaults to `/etc/openstack/clouds.yaml`
Expand Down
3 changes: 2 additions & 1 deletion roles/sushy_emulator/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "cifmw_sushy_emulator"

cifmw_sushy_emulator_basedir: "{{ ansible_user_dir ~ '/ci-framework-data' }}"
cifmw_sushy_emulator_basedir: >-
{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}
cifmw_sushy_emulator_container_name: "cifmw-sushy_emulator"
cifmw_sushy_emulator_driver: libvirt
cifmw_sushy_emulator_driver_openstack_client_config_file: /etc/openstack/clouds.yaml
Expand Down
2 changes: 2 additions & 0 deletions zuul.d/molecule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@
- ^ci/playbooks/molecule.*
- ^.config/molecule/.*
- ^roles/libvirt_manager/(?!meta|README).*
- ^roles/podman/(?!meta|README).*
- ^roles/sushy_emulator/(?!meta|README).*
name: cifmw-molecule-reproducer
nodeset: centos-9-crc-2-30-0-xxl
parent: cifmw-molecule-base
Expand Down