Bug 2061653 - [MTC UI] Migration Resources section showing pods from other namespaces
Summary: [MTC UI] Migration Resources section showing pods from other namespaces
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: UI
Version: 1.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 1.7.1
Assignee: Ian
QA Contact: mohamed
Richard Hoch
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-08 07:17 UTC by ssingla
Modified: 2022-05-05 13:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-05 13:50:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot (75.07 KB, image/png)
2022-03-08 07:17 UTC, ssingla
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-controller pull 1283 0 None Merged Bug 2061653: Only show pods relating to the current DVMP. (#1278) 2022-04-20 18:07:29 UTC
Red Hat Product Errata RHSA-2022:1734 0 None None None 2022-05-05 13:51:01 UTC

Description ssingla 2022-03-08 07:17:58 UTC
Created attachment 1864520 [details]
Screenshot

Description of the problem: On navigating to the migration resources page after the migration is successfully completed, Under the DVM resource, it shows the pods from other namespaces which are not a part of this migplan.

Severity: Low

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

Steps to reproduce:
1. Create a namespace named django1 in the source cluster
2. Deploy any application in the namespace having PVCs
3. Add a wrong cluster subdomain to the migration controller so that DVM fails
   Cluster_subdomain: “abc.com”
4. Now, wait for controller restart
5.  Go the MTC console, Created migplan for django1 namespace and execute full migration
6. It should fail. 
7. Now remove the cluster_subdomain field from migcontroller and again wait for the controller pod restart.
8. Now create another namespace django2 in the source cluster and deploy an application with PVC
9. Login to the MTC console and create migplan for django2 namespace and execute full migration.
10. After the migration is successful, go to the Migration details page.

Actual Result: In the Migration resources section, under the DVM progress section, the failed rsync pods from the django1 namespace are visible in the django2 migration.

Expected Result: Migration resources should only show the pods related to the namespaces involved in current migration, in this case, django2.

Additional Info: 

Whenever any rsync pods are running in different namespace, those are visible in other migplan. Reproducible in multiple ways. Above is one such example to reproduce.

Comment 2 Ian 2022-04-08 22:56:18 UTC
Response from the discovery service api for fetching the tree resource:

(_aggregatorName: "plan22"
_aggregatorSpecifier: "migration-6e6f6"
_aggregatorType: "plans")- 

{
    "data": {
        "kind": "Plan",
        "namespace": "openshift-migration",
        "name": "plan22",
        "clusterType": "host",
        "children": [
            {
                "kind": "Migration",
                "namespace": "openshift-migration",
                "name": "migration-6e6f6",
                "clusterType": "host",
                "children": [
                    {
                        "kind": "Backup",
                        "namespace": "openshift-migration",
                        "name": "migration-6e6f6-initial-pkkzq",
                        "clusterType": "source",
                        "objectLink": "/namespaces/openshift-migration/clusters/src/namespaces/openshift-migration/backups/migration-6e6f6-initial-pkkzq"
                    },
                    {
                        "kind": "Restore",
                        "namespace": "openshift-migration",
                        "name": "migration-6e6f6-final-jz9rd",
                        "clusterType": "target",
                        "objectLink": "/namespaces/openshift-migration/clusters/host/namespaces/openshift-migration/restores/migration-6e6f6-final-jz9rd"
                    },
                    {
                        "kind": "DirectVolumeMigration",
                        "namespace": "openshift-migration",
                        "name": "migration-6e6f6-xdq4g",
                        "clusterType": "host",
                        "children": [
                            {
                                "kind": "DirectVolumeMigrationProgress",
                                "namespace": "openshift-migration",
                                "name": "f3b4aaca4bb5f239099aa76d5f0977b4",
                                "clusterType": "host",
                                "children": [
                                    {
                                        "kind": "Pod",
                                        "namespace": "mediawiki",
                                        "name": "rsync-x6lx9",
                                        "clusterType": "source",
                                        "objectLink": "/namespaces/openshift-migration/clusters/src/namespaces/mediawiki/pods/rsync-x6lx9"
                                    }
                                ],
                                "objectLink": "/namespaces/openshift-migration/directvolumemigrationprogresses/f3b4aaca4bb5f239099aa76d5f0977b4"
                            }
                        ],
                        "objectLink": "/namespaces/openshift-migration/directvolumemigrations/migration-6e6f6-xdq4g"
                    }
                ],
                "objectLink": "/namespaces/openshift-migration/migrations/migration-6e6f6"
            }
        ],
        "objectLink": "/namespaces/openshift-migration/plans/plan22"
    },
    "status": 200,
    "statusText": "OK",
    "headers": {
        "connection": "close",
        "content-encoding": "gzip",
        "content-security-policy": "sandbox",
        "content-type": "application/json; charset=utf-8",
        "date": "Fri, 08 Apr 2022 22:44:41 GMT",
        "transfer-encoding": "chunked",
        "vary": "Accept-Encoding",
        "x-content-security-policy": "sandbox",
        "x-powered-by": "Express"
    },
    "config": {
        "url": "namespaces/openshift-migration/plans/plan22/tree/migration-6e6f6",
        "method": "get",
        "headers": {
            "Accept": "application/json, text/plain, */*",
            "Authorization": "Bearer sha256~gGN-n1tAo0nm7j7Hmy4R_jK5R6-1w2q-TMtdclwRtJI"
        },
        "baseURL": "/discovery-api",
        "transformRequest": [
            null
        ],
        "transformResponse": [
            null
        ],
        "timeout": 0,
        "responseType": "json",
        "xsrfCookieName": "XSRF-TOKEN",
        "xsrfHeaderName": "X-XSRF-TOKEN",
        "maxContentLength": -1,
        "maxBodyLength": -1,
        "transitional": {
            "silentJSONParsing": true,
            "forcedJSONParsing": true,
            "clarifyTimeoutError": false
        }
    },
    "request": {}
}


I am seeing an unrelated pod attached to the DirectVolumeMigrationProgress ref item. I can filter this out on the UI as a workaround if that is what we want to do. 

{
                                "kind": "DirectVolumeMigrationProgress",
                                "namespace": "openshift-migration",
                                "name": "f3b4aaca4bb5f239099aa76d5f0977b4",
                                "clusterType": "host",
                                "children": [
                                    {
                                        "kind": "Pod",
                                        "namespace": "mediawiki",
                                        "name": "rsync-x6lx9",
                                        "clusterType": "source",
                                        "objectLink": "/namespaces/openshift-migration/clusters/src/namespaces/mediawiki/pods/rsync-x6lx9"
                                    }
                                ],
                                "objectLink": "/namespaces/openshift-migration/directvolumemigrationprogresses/f3b4aaca4bb5f239099aa76d5f0977b4"
                            }

the namespace list on the migration plan does not include 'mediawiki'. It includes 'mediawiki2'.

Comment 3 Ian 2022-04-09 02:32:29 UTC
Controller PR posted: https://github.com/konveyor/mig-controller/pull/1278

Comment 10 errata-xmlrpc 2022-05-05 13:50:01 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: Migration Toolkit for Containers (MTC) 1.7.1 security and bug fix 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-2022:1734


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