Bug 1879276

Summary: [UI] Debug Logs - Controller selection looks broken, no pods available and no logs
Product: OpenShift Container Platform Reporter: John Matthews <jmatthew>
Component: Migration ToolingAssignee: Jeff Ortel <jortel>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.5CC: chezhang, ernelson, jortel, mberube, rjohnson, sregidor, tsanders, whu, xjiang
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-30 18:43:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
UI screenshot none

Description John Matthews 2020-09-15 20:26:14 UTC
Created attachment 1714989 [details]
UI screenshot

Description of problem:

Unable to find the controller logs from the UI's 'log' view


Version-Release number of selected component (if applicable):
Seen in CAM 1.2.5 and with MTC 1.3.0 preview


How reproducible:
Always


Steps to Reproduce:

From UI
1. View a created Migration Plan
2. Click the kebab and select 'Logs'
3. View the 'Select Cluster' drop down and select 'Controller'


Actual results:
Select Pod Source shows 'No options'

I also didn't see the controller logs when downloading the logs

$ ls
host-restic-6w7gk-velero.log             host-velero-6bb4cffbd4-rmsqz-velero.log  src-restic-ttfzs-velero.log
host-restic-twfgq-velero.log             src-restic-8fxhm-velero.log              src-restic-x9qcs-velero.log
host-restic-xllw8-velero.log             src-restic-sj9rz-velero.log              src-velero-844644969c-sccgm-velero.log



Expected results:

Should see logs for the migration controller process


Additional info:
May be related to 
https://github.com/konveyor/mig-ui/issues/675

Comment 1 Ian 2020-09-15 21:16:40 UTC
Looked into this on the UI side- When we are making the get call to the discovery service, the response object looks like this:
Note the empty controller value array. My best guess is that something has changed on the controller side with how the discovery service is returning data.


{
  "data": {
    "namespace": "openshift-migration",
    "name": "test",
    "controller": [],
    "source": [
      {
        "namespace": "openshift-migration",
        "name": "velero-6bb4cffbd4-rmsqz",
        "containers": [
          {
            "name": "velero",
            "log": "/namespaces/openshift-migration/clusters/host/namespaces/openshift-migration/pods/velero-6bb4cffbd4-rmsqz/log?container=velero"
          }
        ]
      },
      {
        "namespace": "openshift-migration",
        "name": "restic-6w7gk",
        "containers": [
          {
            "name": "velero",
            "log": "/namespaces/openshift-migration/clusters/host/namespaces/openshift-migration/pods/restic-6w7gk/log?container=velero"
          }
        ]
      },
      {
        "namespace": "openshift-migration",
        "name": "restic-twfgq",
        "containers": [
          {
            "name": "velero",
            "log": "/namespaces/openshift-migration/clusters/host/namespaces/openshift-migration/pods/restic-twfgq/log?container=velero"
          }
        ]
      },
      {
        "namespace": "openshift-migration",
        "name": "restic-xllw8",
        "containers": [
          {
            "name": "velero",
            "log": "/namespaces/openshift-migration/clusters/host/namespaces/openshift-migration/pods/restic-xllw8/log?container=velero"
          }
        ]
      }
    ],
    "destination": [
      {
        "namespace": "openshift-migration",
        "name": "velero-844644969c-sccgm",
        "containers": [
          {
            "name": "velero",
            "log": "/namespaces/openshift-migration/clusters/src/namespaces/openshift-migration/pods/velero-844644969c-sccgm/log?container=velero"
          }
        ]
      },
      {
        "namespace": "openshift-migration",
        "name": "restic-8fxhm",
        "containers": [
          {
            "name": "velero",
            "log": "/namespaces/openshift-migration/clusters/src/namespaces/openshift-migration/pods/restic-8fxhm/log?container=velero"
          }
        ]
      },
      {
        "namespace": "openshift-migration",
        "name": "restic-sj9rz",
        "containers": [
          {
            "name": "velero",
            "log": "/namespaces/openshift-migration/clusters/src/namespaces/openshift-migration/pods/restic-sj9rz/log?container=velero"
          }
        ]
      },
      {
        "namespace": "openshift-migration",
        "name": "restic-ttfzs",
        "containers": [
          {
            "name": "velero",
            "log": "/namespaces/openshift-migration/clusters/src/namespaces/openshift-migration/pods/restic-ttfzs/log?container=velero"
          }
        ]
      },
      {
        "namespace": "openshift-migration",
        "name": "restic-x9qcs",
        "containers": [
          {
            "name": "velero",
            "log": "/namespaces/openshift-migration/clusters/src/namespaces/openshift-migration/pods/restic-x9qcs/log?container=velero"
          }
        ]
      }
    ]
  },
  "status": 200,
  "statusText": "OK",
  "headers": {
    "cache-control": "private",
    "content-type": "application/json; charset=utf-8"
  },
  "config": {
    "url": "namespaces/openshift-migration/plans/test/pods",
    "method": "get",
    "headers": {
      "Accept": "application/json, text/plain, */*",
      "Authorization": "Bearer g4jRH6S7uIp3Ink8Ee47IX-WggY0rnjFRaQRyseWGrw"
    },
    "baseURL": "https://discovery-openshift-migration.apps.cluster-ibb6038ocp4b.ibb6038ocp4b.mg.dog8code.com",
    "transformRequest": [
      null
    ],
    "transformResponse": [
      null
    ],
    "timeout": 0,
    "responseType": "json",
    "xsrfCookieName": "XSRF-TOKEN",
    "xsrfHeaderName": "X-XSRF-TOKEN",
    "maxContentLength": -1
  },
  "request": {}
}

Comment 2 Jeff Ortel 2020-09-16 16:54:56 UTC
Fixed in discovery controller.
Commit: 837de2361ac5f7de87c864b1bfc30309880ba45c cherry-picked to release-1.3.0.

Comment 6 Sergio 2020-09-18 09:48:40 UTC
Verified in MTC 1.3

openshift-migration-ui-rhel8@sha256:f306de1051cd2029944b2aa9511626b1dce365317fd04168478f14a43ad95e44


In migration plan's logs screen we can see the controller and the controller logs are displayed properly.

Moved to VERIFIED status.

Comment 10 errata-xmlrpc 2020-09-30 18:43:07 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 (Migration Toolkit for Containers (MTC) Tool image release advisory 1.3.0), 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/RHBA-2020:4148

Comment 11 John Matthews 2020-10-01 22:23:31 UTC
*** Bug 1843027 has been marked as a duplicate of this bug. ***