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

Do not try to get logs from non existent pods #73

Merged

Conversation

fmount
Copy link
Contributor

@fmount fmount commented Aug 2, 2024

This patch fixes the current issue related to the fact that we try to get logs from pods that are not present in the namespace. This is caused by the fact that the crash_status variable is sometimes not predictable and an output made by many strings is produced. We only need to know if the Pod was terminated, and get the -previous log, but we don't care about the reason of the crash. In addition, given the complexity generated by go-template, we moved the data processing to json and jq, as it results easy to read and maintain.

Jira: OSPRH-8197

This patch fixes the current issue related to the fact that we try to
get logs from pods that are not present in the namespace. This is caused
by the fact that the crash_status variable is sometimes not predictable
and an output made by many strings is produced. We only need to know if
the Pod was terminated, and get the -previous log.
In addition, given the complexity generated by go-template, we moved the
data processing to json and jq, as it results easy to read and maintain.

Jira: https://issues.redhat.com/browse/OSPRH-8197

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
@openshift-ci openshift-ci bot requested review from gibizer and olliewalsh August 2, 2024 17:00
@fmount fmount requested review from stuggi and abays and removed request for olliewalsh August 2, 2024 17:00
Copy link
Contributor

@abays abays left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

openshift-ci bot commented Aug 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described 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

@openshift-merge-bot openshift-merge-bot bot merged commit b916e9b into openstack-k8s-operators:main Aug 3, 2024
4 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.

2 participants