Bug 1972530

Summary: [4.8.0] no indication for missing debugInfo in AgentClusterInstall
Product: OpenShift Container Platform Reporter: Michael Filanov <mfilanov>
Component: assisted-installerAssignee: Daniel Erez <derez>
assisted-installer sub component: assisted-service QA Contact: Yuri Obshansky <yobshans>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: low CC: aos-bugs, derez, frolland, nshidlin
Version: 4.8Keywords: Triaged
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AI-Team-Hive KNI-EDGE-JUKE-4.8
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1969494 Environment:
Last Closed: 2021-07-27 23:12:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1969494    
Bug Blocks:    
Attachments:
Description Flags
agentclusterinstall with missing cluster deployment none

Description Michael Filanov 2021-06-16 06:54:35 UTC
+++ This bug was initially created as a clone of Bug #1969494 +++

Description of problem:
When creating an AgentClusterInstall CRD (without a corresponding ClusterDeployment), there is no debugInfo available which is expected as not status is available yet. However, there's no indication in the log for that.

Version-Release number of selected component (if applicable):

How reproducible:
100%

Steps to Reproduce:
1. Create an AgentClusterInstall CRD
2.
3.

Actual results:
No indication that status and debugInfo should not be available yet.

Expected results:
E.g. a warning/info log that the debugInfo (eventsURL/logsURL) would be available once a ClusterDeployment CRD is created.

Additional info:

--- Additional comment from frolland on 20210610T09:43:32

Maybe we should add to the SpecSync condition that we miss an object, and set all the others conditions to Unknown

--- Additional comment from mfilanov on 20210610T09:49:31

+1 to SpecSync

--- Additional comment from mfilanov on 20210610T09:51:47

Actually do we even reconcile on this agent cluster install? We are looking at cluster deployment as the main resource.

--- Additional comment from mfilanov on 20210614T06:03:35

When reconcile we are searching for cluster deployment and we don't know the reference to agent cluster install, so it's impossible to set anything on agent cluster install unless we manage to get cluster deployment.

--- Additional comment from mfilanov on 20210616T06:54:16

After few conversations we decided that for this case we can add another controller that will watch only AgentClusterInstall, it will set the sync condition value to failure with a message explaining that the link to cluster deployment is invalid.
It will probably need to set all the other conditions to unknown.

The two cases that it will cover are
1. Cluster deployment is not created yet.
2. User set invalid reference to cluster deployment.

Comment 3 nshidlin 2021-07-05 11:19:47 UTC
Created attachment 1798102 [details]
agentclusterinstall with missing cluster deployment

Verified with 2.3.0-DOWNSTREAM-2021-07-02-22-02-33

agentclusterinstall condition clearly indicates missing clusterdeployment:

 oc get agentclusterinstalls.extensions.hive.openshift.io sno-0 -n sno-0 -o json | jq '.status.conditions[0]'                       
{
  "lastProbeTime": "2021-07-05T11:03:37Z",
  "lastTransitionTime": "2021-07-05T11:03:37Z",
  "message": "The Spec could not be synced due to an input error: ClusterDeployment with name 'sno-0' in namespace 'sno-0' not found. Ensure that the CRD is already applied.",
  "reason": "InputError",
  "status": "False",
  "type": "SpecSynced"
}

Comment 5 errata-xmlrpc 2021-07-27 23:12:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438