Bug 1915279
| Summary: | Pod health warning contains incorrect field name in the MigPlan CR status | ||
|---|---|---|---|
| Product: | Migration Toolkit for Containers | Reporter: | Sergio <sregidor> |
| Component: | General | Assignee: | John Matthews <jmatthew> |
| Status: | CLOSED ERRATA | QA Contact: | Xin jiang <xjiang> |
| Severity: | low | Docs Contact: | Avital Pinnick <apinnick> |
| Priority: | low | ||
| Version: | 1.4.0 | CC: | ernelson, ibolton, rjohnson, rpattath, whu, xjiang |
| Target Milestone: | --- | ||
| Target Release: | 1.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: | 2021-07-28 04:08:00 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: | |||
I made a mistake in the description of the problem. The warning is only displayed when the pods are unhealthy. Description of problem: When there are UNHEALTHY pods in a namespace that is going to be migrated, MTC shows a warning in the migplan. This warning tells the user to look for further information in "unhealthyNamespaces", but this field does not exist in the migplan. The right field name is "namespaces" Did we decide that this is not a UI bug? @Sergio mentioned that this deals with the message given on the condition from the controller side. @ibolton I'm almost certain this is a backend issue. Verified using MTC 1.5.0
SOURCE CLUSTER: AWS OCP 3.11 (CONTROLLER + UI)
TARGET CLUSETR: AWS OCP 4.7
Operator:
registry.redhat.io/rhmtc/openshift-migration-rhel7-operator@sha256:c0375fa6ecff4d50c181fc3f31d66b6c13023fecb8bcef6899197ccd96c50a30
- name: MIG_CONTROLLER_REPO
value: openshift-migration-controller-rhel8@sha256
- name: MIG_CONTROLLER_TAG
value: 83f26020b731f78dc9e817186d3247ab46d7daedec62c808be3259ed571656aa
- name: MIG_UI_REPO
value: openshift-migration-ui-rhel8@sha256
- name: MIG_UI_TAG
value: 4e177e58e311ff2d9c37935308591df5680838255e35b138a696b065c03044f8
- name: VELERO_REPO
value: openshift-migration-velero-rhel8@sha256
- name: VELERO_TAG
value: e776a798ce8c1b1e6fcc10edaded1e70514a5c6cc2c177dead2d82ef562becde
Now the warning says like this:
- category: Warn
lastTransitionTime: "2021-06-16T11:15:15Z"
message: 'Source namespace(s) contain unhealthy pods. See: `Status.namespaces` for details.'
reason: NotHealthy
status: "True"
type: SourcePodsNotHealthy
And we actually can find the information in 'Status.namespaces' field in the migplan:
$ oc get migplan unhealthy -ojsonpath='{.status.namespaces}'
[{"name":"bz-test","workloads":[{"name":"Pods","resources":["pod-test"]}]}]
We move the status to VERIFIED.
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) image release advisory 1.5.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/RHEA-2021:2929 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days |
Description of problem: When there are pods in a namespace that is going to be migrated, MTC shows a warning in the migplan. This warning tells the user to look for further information in "unhealthyNamespaces", but this field does not exist in the migplan. The right field name is "namespaces" Version-Release number of selected component (if applicable): MTC 1.4.0 How reproducible: Always Steps to Reproduce: 1. Create a namespace in source cluster oc new-project bz-test 2. Create an unhealthy pod in this namespace cat << EOF | oc create -f - apiVersion: v1 kind: Pod metadata: name: pod-test namespace: bz-test spec: containers: - name: podtest image: alpine command: [ "/bin/sh", "-c", "--" ] args: [ "wrongcommand" ] EOF 3. Create a migration plan for this namespace Actual results: A warning like this one is shown in the migplan resource - category: Warn lastTransitionTime: "2021-01-12T09:49:16Z" message: 'Source namespace(s) contain unhealthy pods. See: `unhealthyNamespaces` for details.' reason: NotHealthy status: "True" type: SourcePodsNotHealthy But there is no field with name "unhealthyNamespaces", the field where we need to look for the information regarding the unhealthy resources is actually "namespaces": namespaces: - name: bz-test workloads: - name: Pods resources: - pod-test Expected results: The warning should point to the right field name. Additional info: Full migplan status data: status: conditions: - category: Warn lastTransitionTime: "2021-01-12T09:49:16Z" message: 'Source namespace(s) contain unhealthy pods. See: `unhealthyNamespaces` for details.' reason: NotHealthy status: "True" type: SourcePodsNotHealthy - category: Required lastTransitionTime: "2021-01-12T09:49:18Z" message: The `persistentVolumes` list has been updated with discovered PVs. reason: Done status: "True" type: PvsDiscovered - category: Required lastTransitionTime: "2021-01-12T09:49:19Z" message: The storage resources have been created. reason: Done status: "True" type: StorageEnsured - category: Required lastTransitionTime: "2021-01-12T09:49:19Z" message: The migration plan is ready. status: "True" type: Ready destStorageClasses: - accessModes: - ReadWriteOnce default: true name: gp2 provisioner: kubernetes.io/aws-ebs excludedResources: - imagetags - templateinstances - clusterserviceversions - packagemanifests - subscriptions - servicebrokers - servicebindings - serviceclasses - serviceinstances - serviceplans - operatorgroups - events namespaces: - name: bz-test workloads: - name: Pods resources: - pod-test observedDigest: 58303621a9f3161ab9c1d095a605fcb4ef619d1da5a1633b1bedfec166f8fc06 srcStorageClasses: - accessModes: - ReadWriteOnce default: true name: gp2 provisioner: kubernetes.io/aws-ebs