Skip to content

Run nested ansible command and call run_logs tasks to drop 99-logs play#3208

Merged
danpawlik merged 1 commit intoopenstack-k8s-operators:mainfrom
danpawlik:improve-e2e-collect-logs-after-dropping-ansible-cmd
Sep 1, 2025
Merged

Run nested ansible command and call run_logs tasks to drop 99-logs play#3208
danpawlik merged 1 commit intoopenstack-k8s-operators:mainfrom
danpawlik:improve-e2e-collect-logs-after-dropping-ansible-cmd

Conversation

@danpawlik
Copy link
Copy Markdown
Contributor

@danpawlik danpawlik commented Aug 21, 2025

Earlier the 99-logs.yml playbook was executed as nested Ansible.
After we migrate that playbook to role, it can not be called directly,
because it contains: cimfw collection to be installed on Zuul executor
and include_vars can not read files, that are located on the controller,
so they needs to be synchronized with Zuul executor job dir.

@danpawlik danpawlik requested a review from a team as a code owner August 21, 2025 06:54
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Aug 21, 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.

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

evallesp
evallesp previously approved these changes Aug 25, 2025
Copy link
Copy Markdown
Contributor

@evallesp evallesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cescgina
Copy link
Copy Markdown
Contributor

this version is still missing the must-gather logs: https://logserver.rdoproject.org/dce/rdoproject.org/dce68e40e56e4814aae7623b7c2447ca/controller/ci-framework-data/logs/. Looking at the job output: https://softwarefactory-project.io/zuul/t/rdoproject.org/build/dce68e40e56e4814aae7623b7c2447ca/log/job-output.txt#7411 it looks like all the tasks from the run_logs.yaml (https://github.com/openstack-k8s-operators/ci-framework/blob/main/roles/cifmw_setup/tasks/run_logs.yml) are being skipped, I guess because of this conditional

when: not zuul_log_collection | default('false') | bool

danpawlik added a commit to danpawlik/watcher-operator that referenced this pull request Aug 25, 2025
@danpawlik
Copy link
Copy Markdown
Contributor Author

recheck

@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/4b3a4519358049b0900811bd04194d10

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 47m 08s
podified-multinode-edpm-deployment-crc POST_FAILURE in 1h 11m 33s
cifmw-crc-podified-edpm-baremetal POST_FAILURE in 1h 32m 52s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 31s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 7m 50s
✔️ cifmw-pod-pre-commit SUCCESS in 7m 54s
cifmw-multinode-kuttl POST_FAILURE in 16m 21s
✔️ build-push-container-cifmw-client SUCCESS in 18m 48s

@danpawlik danpawlik force-pushed the improve-e2e-collect-logs-after-dropping-ansible-cmd branch 2 times, most recently from e5f4682 to 052eacc Compare August 29, 2025 06:18
@danpawlik
Copy link
Copy Markdown
Contributor Author

Some part of the code, where was partially done migration from nested ansible to call role directly was splited into few pieces, first part related to helpers: #3235

@danpawlik
Copy link
Copy Markdown
Contributor Author

confirmed with @cescgina that openstack-k8s-operators/watcher-operator#251 provides missing logs. Checking, if the 251 requires additional changes in "empty" watcher operator change openstack-k8s-operators/watcher-operator#258

@danpawlik danpawlik force-pushed the improve-e2e-collect-logs-after-dropping-ansible-cmd branch from 052eacc to f99c72f Compare August 29, 2025 11:07
Earlier the 99-logs.yml playbook was executed as nested Ansible.
After we migrate that playbook to role, it can not be called directly,
because it contains: cimfw collection to be installed on Zuul executor
and include_vars can not read files, that are located on the controller,
so they needs to be synchronized with Zuul executor job dir.
Also fix condition that was changed when moving 99-logs.yml play into
the role.

Signed-off-by: Daniel Pawlik <dpawlik@redhat.com>
@danpawlik danpawlik force-pushed the improve-e2e-collect-logs-after-dropping-ansible-cmd branch from f99c72f to 30f082f Compare August 29, 2025 12:29
danpawlik added a commit to danpawlik/watcher-operator that referenced this pull request Sep 1, 2025
…ck-k8s-operators#251

Before moving to role, when the 99-logs.yml playbook was executed, the
variables was not set to, so it pick default value which is false, so
the playbook was executed. Now when it is in `cifmw_setup` role in
`run_logs.yml` task file, the condition is possitive, so it is skipped.

Add 'zuul_log_collection' var to overwrite other existing vars and
trigger gather facts.

Depends-On: openstack-k8s-operators/ci-framework#3208
Depends-On: openstack-k8s-operators/ci-framework#3231
@danpawlik danpawlik merged commit 1bcabd2 into openstack-k8s-operators:main Sep 1, 2025
4 checks passed
@danpawlik danpawlik deleted the improve-e2e-collect-logs-after-dropping-ansible-cmd branch September 1, 2025 09:20
danpawlik added a commit to danpawlik/watcher-operator that referenced this pull request Sep 1, 2025
…ck-k8s-operators#251

Before moving to role, when the 99-logs.yml playbook was executed, the
variables was not set to, so it pick default value which is false, so
the playbook was executed. Now when it is in `cifmw_setup` role in
`run_logs.yml` task file, the condition is possitive, so it is skipped.

Add 'zuul_log_collection' var to overwrite other existing vars and
trigger gather facts.

Depends-On: openstack-k8s-operators/ci-framework#3208
Depends-On: openstack-k8s-operators/ci-framework#3231
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.

6 participants