Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1971288

Summary: [4.8.0] Missing logs in case cluster installation failed
Product: OpenShift Container Platform Reporter: Michael Filanov <mfilanov>
Component: assisted-installerAssignee: Fred Rolland <frolland>
assisted-installer sub component: Deployment Operator QA Contact: bjacot
Status: CLOSED NOTABUG Docs Contact:
Severity: urgent    
Priority: urgent CC: alazar, aos-bugs, ercohen, frolland, itsoiref
Version: 4.8Keywords: Triaged
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: KNI-EDGE-JUKE-4.8 AI-Team-Hive
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1970015 Environment:
Last Closed: 2021-06-29 12:22:03 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: 1970015    
Bug Blocks:    

Description Michael Filanov 2021-06-13 11:55:15 UTC
+++ This bug was initially created as a clone of Bug #1970015 +++

Description of problem:
I tried to get the logs of failed installation and got this from the link:
{"code":"500","href":"","id":500,"kind":"Error","reason":"No log files were found"}

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


How reproducible:

1/1
Steps to Reproduce:
1. Create the following:
BMH
pull-secret
manifest that will fail the cluster installation (see content below, though it doesn't really matter how you fail the installation)
infra-env
agent-cluster-install (with the manifestsConfigMapRef)
cluster-deployment

2. describe the Agentclusterinstall once the installation fails
3. curl the logs link to get the logs


manifest content:

kind: ConfigMap
apiVersion: v1
metadata:
  name: single-node-manifests
  namespace: assisted-installer
data:
  99_master_kernel_arg.yaml: |
    apiVersion: machineconfiguration.openshift.io/v1
    kind: MachineConfig
    metadata:
      labels:
        machineconfiguration.openshift.io/role: master
      name: 02-master-workload-partitioning
    spec:
      config:
        ignition:
          version: 3.2.0
        storage:
          files:
          - contents:
              source: data:text/plain;charset=utf-8;base64,W2NyaW8ucnVudGltZS53b3JrbG9hZHMubWFuYWdlbWVudF0KYWN0aXZhdGlvbl9hbm5vdGF0aW9uID0gInRhcmdldC53b3JrbG9hZC5vcGVuc2hpZnQuaW8vbWFuYWdlbWVudCIKYW5ub3RhdGlvbl9wcmVmaXggPSAicmVzb3VyY2VzLndvcmtsb2FkLm9wZW5zaGlmdC5pbyIKcmVzb3VyY2VzID0geyAiY3B1c2hhcmVzIiA9IDAsICJjcHVzZXQiID0gIjAtMSw1Mi01MyIgfQ==
            mode: 420
            overwrite: true
            path: /etc/crio/crio.conf.d/01-workload-partitioning
            user:
              name: root
          - contents:
              source: data:text/plain;charset=utf-8;base64,ewogICJtYW5hZ2VtZW50IjogewogICAgImNwdXNldCI6ICIwLTEsNTItNTMiCiAgfQp9
            mode: 420
            overwrite: true
            path: /etc/kubernetes/openshift-workload-pinning
            user:
              name: root



Actual results:

{"code":"500","href":"","id":500,"kind":"Error","reason":"No log files were found"}

Expected results:
Get the cluster logs

Additional info:

I can log into the host, the assisted-installer-controller did upload the logs:
time="2021-06-08T16:09:49Z" level=info msg="Cluster installation failed."
time="2021-06-08T16:09:49Z" level=info msg="Waiting for all go routines to finish"
time="2021-06-08T16:09:49Z" level=info msg="Finished PostInstallConfigs"
time="2021-06-08T16:09:49Z" level=info msg="Finished UpdateBMHs"
time="2021-06-08T16:09:49Z" level=info msg="Finished UploadLogs"
time="2021-06-08T16:09:49Z" level=info msg="Finished all"

--- Additional comment from itsoiref on 20210610T07:34:17

In this specific case we shouldn't get controller  logs cause controller was started after cluster was in timeout already. Though we still miss assisted-installer logs that should be sent before reboot.