Uploaded image for project: 'Migration Toolkit for Red Hat Openshift Project Lead'
  1. Migration Toolkit for Red Hat Openshift Project Lead
  2. MTRHO-47

[MTRHO] PVC references are not getting updated

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • MTRHO 1.0
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      Description:  Tried migrating an application with pvc mapping, Migration completed successfully, but it didn’t update the pvc reference in deployment object.

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

      Target GCP 4.10 

      What actually happened?
      Deployment object is still pointing to the old PVC reference 

      What did you expect to happen?
      Deployment object should point to the New PVC reference

      apiVersion: tekton.dev/v1beta1
      kind: Pipeline
      metadata:
        creationTimestamp: '2022-06-07T09:54:30Z'
        generation: 1
        managedFields:
          - apiVersion: tekton.dev/v1beta1
            fieldsType: FieldsV1
            fieldsV1:
              'f:spec':
                .: {}
                'f:params': {}
                'f:tasks': {}
                'f:workspaces': {}
            manager: Mozilla
            operation: Update
            time: '2022-06-07T09:54:30Z'
        name: testing
        namespace: test-mig
        resourceVersion: '185687'
        uid: a462c3cb-a207-4aa8-ab04-7d0fe361d374
      spec:
        params:
          - name: source-cluster-secret
            type: string
          - name: source-namespace
            type: string
          - name: destination-cluster-secret
            type: string
        tasks:
          - name: generate-source-kubeconfig
            params:
              - name: cluster-secret
                value: $(params.source-cluster-secret)
              - name: context-name
                value: source
            taskRef:
              kind: ClusterTask
              name: crane-kubeconfig-generator
            workspaces:
              - name: kubeconfig
                workspace: kubeconfig
          - name: generate-destination-kubeconfig
            params:
              - name: cluster-secret
                value: $(params.destination-cluster-secret)
              - name: context-name
                value: destination
            runAfter:
              - generate-source-kubeconfig
            taskRef:
              kind: ClusterTask
              name: crane-kubeconfig-generator
            workspaces:
              - name: kubeconfig
                workspace: kubeconfig
          - name: export
            params:
              - name: context
                value: source
              - name: namespace
                value: $(params.source-namespace)
            runAfter:
              - generate-destination-kubeconfig
            taskRef:
              kind: ClusterTask
              name: crane-export
            workspaces:
              - name: export
                subPath: export
                workspace: shared-data
              - name: kubeconfig
                workspace: kubeconfig
          - name: quiesce-deployments
            params:
              - name: context
                value: source
              - name: namespace
                value: $(params.source-namespace)
              - name: resource-type
                value: deployment
            runAfter:
              - export
            taskRef:
              kind: ClusterTask
              name: kubectl-scale-down
            workspaces:
              - name: kubeconfig
                workspace: kubeconfig
          - name: quiesce-deploymentconfigs
            params:
              - name: context
                value: source
              - name: namespace
                value: $(params.source-namespace)
              - name: resource-type
                value: deploymentconfig
            runAfter:
              - export
            taskRef:
              kind: ClusterTask
              name: kubectl-scale-down
            workspaces:
              - name: kubeconfig
                workspace: kubeconfig
          - name: quiesce-statefulsets
            params:
              - name: context
                value: source
              - name: namespace
                value: $(params.source-namespace)
              - name: resource-type
                value: statefulset
            runAfter:
              - export
            taskRef:
              kind: ClusterTask
              name: kubectl-scale-down
            workspaces:
              - name: kubeconfig
                workspace: kubeconfig
          - name: quiesce-jobs
            params:
              - name: context
                value: source
              - name: namespace
                value: $(params.source-namespace)
              - name: resource-type
                value: job
            runAfter:
              - export
            taskRef:
              kind: ClusterTask
              name: kubectl-scale-down
            workspaces:
              - name: kubeconfig
                workspace: kubeconfig
          - name: transfer-pvc-test-data
            params:
              - name: source-context
                value: source
              - name: source-namespace
                value: ocp-attached-pvc
              - name: source-pvc-name
                value: test-data
              - name: dest-context
                value: destination
              - name: dest-pvc-name
                value: test-data-mig     <<--------------------------------------
              - name: dest-namespace
                value: test-mig
              - name: dest-storage-class-name
                value: standard
              - name: dest-storage-requests
                value: 5Gi
              - name: endpoint-type
                value: route
            runAfter:
              - quiesce-deployments
              - quiesce-deploymentconfigs
              - quiesce-statefulsets
              - quiesce-jobs
            taskRef:
              kind: ClusterTask
              name: crane-transfer-pvc
            workspaces:
              - name: kubeconfig
                workspace: kubeconfig
          - name: transform
            runAfter:
              - export
            taskRef:
              kind: ClusterTask
              name: crane-transform
            workspaces:
              - name: export
                subPath: export
                workspace: shared-data
              - name: transform
                subPath: transform
                workspace: shared-data
          - name: apply
            runAfter:
              - transform
            taskRef:
              kind: ClusterTask
              name: crane-apply
            workspaces:
              - name: export
                subPath: export
                workspace: shared-data
              - name: transform
                subPath: transform
                workspace: shared-data
              - name: apply
                subPath: apply
                workspace: shared-data
          - name: kustomize-init
            params:
              - name: source-namespace
                value: $(params.source-namespace)
              - name: namespace
                value: $(context.taskRun.namespace)
            runAfter:
              - apply
            taskRef:
              kind: ClusterTask
              name: crane-kustomize-init
            workspaces:
              - name: apply
                subPath: apply
                workspace: shared-data
              - name: kustomize
                workspace: shared-data
          - name: kubectl-apply-kustomize
            params:
              - name: context
                value: destination
            runAfter:
              - kustomize-init
            taskRef:
              kind: ClusterTask
              name: kubectl-apply-kustomize
            workspaces:
              - name: kustomize
                workspace: shared-data
              - name: kubeconfig
                workspace: kubeconfig
        workspaces:
          - name: shared-data
          - name: kubeconfig
      
      $ oc get pods -n test-mig attached-pvc-75bd788997-6f7pt -o yaml
        volumes:
        - name: testvolume
          persistentVolumeClaim:
            claimName: test-data
      
      $ oc get pvc -n test-mig
      NAME             STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
      pvc-217c2fabe9   Bound    pvc-60da39a2-05c3-49de-b529-f738e7898ed5   1Gi        RWO            standard       64m
      pvc-5779c4bae0   Bound    pvc-e0164069-fc4b-462b-9811-751c739aa3eb   1Gi        RWO            standard       64m
      test-data-mig    Bound    pvc-402b9ccd-bd15-4db6-ae4e-beca43c0a067   5Gi        RWO            standard       62m
      

       

              rhn-engineering-jmontleo Jason Montleon
              rhn-support-prajoshi Prasad Joshi
              Archiver:
              ranumula@redhat.com Raju Anumula

                Created:
                Updated:
                Archived: