Bug 2010168 - Flaky test point to a nil pointer conditions list
Summary: Flaky test point to a nil pointer conditions list
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Advanced Cluster Management for Kubernetes
Classification: Red Hat
Component: Infrastructure Operator
Version: rhacm-2.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: rhacm-2.5
Assignee: Michael Filanov
QA Contact:
Christopher Dawson
URL:
Whiteboard: AI-Team-Core
Depends On:
Blocks: 2010175
TreeView+ depends on / blocked
 
Reported: 2021-10-04 05:31 UTC by Fred Rolland
Modified: 2022-10-03 20:18 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-10-03 20:18:56 UTC
Target Upstream Version:
Embargoed:
ming: rhacm-2.4+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github open-cluster-management backlog issues 16795 0 None None None 2021-10-04 13:17:51 UTC
Github openshift assisted-service pull 2698 0 None open Bug 2010168: Fix flaky test point to a nil pointer conditions 2021-10-04 06:14:06 UTC
Red Hat Issue Tracker MGMTBUGSM-31 0 None None None 2022-04-11 07:04:17 UTC

Internal Links: 2010175

Description Fred Rolland 2021-10-04 05:31:29 UTC
BMAC controller search for a condition but do not check if the result is nil.

This could cause a panic.
It happened on subsystem test, where a similar code is used.

https://github.com/openshift/assisted-service/blob/f2d1db6f3a410a995def24d45842e00110c5311d/subsystem/kubeapi_test.go#L383
https://github.com/openshift/assisted-service/blob/f2d1db6f3a410a995def24d45842e00[…]0c5311d/internal/controller/controllers/bmh_agent_controller.go

Comment 1 Michael Filanov 2021-10-04 06:05:25 UTC
Looking at the code again i saw that bnh check if conditions are nil https://github.com/openshift/assisted-service/blob/badfb5d77b0642688c06743cb5e304e6a29c62be/internal/controller/controllers/bmh_agent_controller.go#L365-L367 
Fixing the test

Comment 2 Michael Filanov 2021-10-04 06:30:36 UTC
in another look if we have a bug in the condition bmh controller will panic, fixed that.


Note You need to log in before you can comment on or make changes to this bug.