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

Cannot properly catch pod events on OpenShift 4.10/4.11/4.12 #987

Closed
AObuchow opened this issue Nov 30, 2022 · 0 comments
Closed

Cannot properly catch pod events on OpenShift 4.10/4.11/4.12 #987

AObuchow opened this issue Nov 30, 2022 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@AObuchow
Copy link
Collaborator

AObuchow commented Nov 30, 2022

Description

This is a followup to Workspace pod FailedScheduling event not being properly caught, which was addressed by catching the unschedulable condition. However, other failure events that DWO tries to catch may still not be properly detected if their event.count is set to 0 and never incremented (which seems to occur on OpenShift 4.10/4.11/4.12).

In order to address this, we should either:

  • change the event occurrence thresholds that are 1 to 0
  • or, create a function for determining the event count using both the new event.series.count API and old event.count API:
if event.series != nil {
	return event.series.count
} else if event.count > 0 {
	return event.count
} 
return 1

Either fix unfortunately won't help for the FailedMount event, which has a threshold of 3, but it's better than nothing.

Additional context

The upstream OpenShift bug regarding event.count and event.series.count not being set: https://issues.redhat.com/browse/OCPBUGS-3796

@AObuchow AObuchow added the bug Something isn't working label Nov 30, 2022
@AObuchow AObuchow self-assigned this Nov 30, 2022
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue Dec 1, 2022
Fix devfile#987

When checking workspace deployment pod events, first check event.series.count (as event.count is deprecated).
If event.series.count isin't set, fallback to event.count if it is set.
Otherwise, assume the event count is 1.

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue Dec 5, 2022
Fix devfile#987

When checking workspace deployment pod events, first check event.series.count (as event.count is deprecated).
If event.series.count isin't set, fallback to event.count if it is set.
Otherwise, assume the event count is 1.

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
@ibuziuk ibuziuk closed this as completed in 255d699 Dec 8, 2022
@amisevsk amisevsk added this to the v0.18.x milestone Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants