Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing plan and changing PV from Copy to Move method breaks migrations #539

Closed
jmontleon opened this issue May 19, 2020 · 2 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. release-1.3.0
Milestone

Comments

@jmontleon
Copy link
Contributor

jmontleon commented May 19, 2020

I created a plan initially set to copy two PV's. Realizing I had failed to change it to Move I went back and edited the plan.

I ended up with a plan that looked like below.

In particular this looks like the UI is not removing the copyMethod when the action is changed, so there's probably a UI issue here. It seems like a user could do this too so there should probably be a validation to prevent the plan from proceeding if the conflicting options are set.

    selection:
      action: move
      copyMethod: filesystem

At this point the plan got stuck at StageRestoreCreated.

# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: migration.openshift.io/v1alpha1
kind: MigPlan
metadata:
  annotations:
    openshift.io/touch: 6c54ee61-99e4-11ea-920a-0a580a83001d
  creationTimestamp: "2020-05-19T14:37:47Z"
  generation: 17
  name: mediawiki
  namespace: openshift-migration
  resourceVersion: "1172282"
  selfLink: /apis/migration.openshift.io/v1alpha1/namespaces/openshift-migration/migplans/mediawiki
  uid: d24062eb-8b07-44bc-997c-f885aa6913f1
spec:
  destMigClusterRef:
    name: host
    namespace: openshift-migration
  hooks:
  - executionNamespace: openshift-migration
    phase: PostRestore
    reference:
      name: mediawiki-repair-vglcg
      namespace: openshift-migration
    serviceAccount: migration-controller
  migStorageRef:
    name: default
    namespace: openshift-migration
  namespaces:
  - mediawiki
  persistentVolumes:
  - capacity: 1000Gi
    name: pv2
    pvc:
      accessModes:
      - ReadWriteOnce
      name: mariadb
      namespace: mediawiki
    selection:
      action: move
      copyMethod: filesystem
    supported:
      actions:
      - copy
      - move
      copyMethods:
      - filesystem
      - snapshot
  - capacity: 1000Gi
    name: pv6
    pvc:
      accessModes:
      - ReadWriteOnce
      name: mediawiki
      namespace: mediawiki
    selection:
      action: move
      copyMethod: filesystem
    supported:
      actions:
      - copy
      - move
      copyMethods:
      - filesystem
      - snapshot
  srcMigClusterRef:
    name: ocp311
    namespace: openshift-migration
status:
  conditions:
  - category: Required
    lastTransitionTime: "2020-05-19T14:37:55Z"
    message: The `persistentVolumes` list has been updated with discovered PVs.
    reason: Done
    status: "True"
    type: PvsDiscovered
  - category: Required
    lastTransitionTime: "2020-05-19T14:37:58Z"
    message: The storage resources have been created.
    status: "True"
    type: StorageEnsured
  - category: Required
    lastTransitionTime: "2020-05-19T14:38:02Z"
    message: The migration registry resources have been created.
    status: "True"
    type: RegistriesEnsured
  - category: Required
    lastTransitionTime: "2020-05-19T14:38:02Z"
    message: The migration plan is ready.
    status: "True"
    type: Ready
  - category: Advisory
    lastTransitionTime: "2020-05-19T15:13:06Z"
    message: Limited validation; PV discovery and resource reconciliation suspended.
    status: "True"
    type: Suspended
  observedDigest: ccc6a4830c8ace4d92af7facc1af952b36a10109992aa6d56fcf7cac428dde1e
@sseago
Copy link
Contributor

sseago commented May 19, 2020

CopyMethod should be ignored for Move, so if leaving it there breaks things, that's a bug.

@djwhatle
Copy link
Contributor

Sounds like a UI bug, closing in favor of mig-ui issue migtools/mig-ui#1045

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. release-1.3.0
Projects
None yet
Development

No branches or pull requests

3 participants