Uploaded image for project: 'MicroShift'
  1. MicroShift
  2. USHIFT-1318

When restore failed (during cp), should "half-restored data dir" be deleted or kept (in different location)?

XMLWordPrintable

    • Strategic Product Work
    • False
    • Hide

      None

      Show
      None
    • False
    • OCPSTRAT-310 - MicroShift updateability for GA

      https://github.com/openshift/microshift/pull/1881#issuecomment-1579262622:

      If the cp fails, then recovery is ... rm -rf /var/lib/microshift

      Removing the files as an automated response to an error could potentially remove some of the information needed to figure out what the error happened in the first place - another move operation might be safer (assuming that running out of disk space isn't the error which caused the problem)

      Current implementation:

      • Rename /var/lib/microshift to /var/lib/microshift.saved
      • Copy /var/lib/microshift-backups/backup-name to /var/lib/microshift
      • If fails: remove /var/lib/microshift and rename /var/lib/microshift.saved back, exit with error
      • Remove /var/lib/microshift.saved

      Questions:

      • Should we change how copy fail is handled?
      • What's better from supportability/debuggability point of view? Maybe output of cp --verbose is enough?
      • What's better from "make it as automated as possible" (aka require a little manual intervention as possible) perspective?

              Unassigned Unassigned
              pmatusza@redhat.com Patryk Matuszak
              Doug Hellmann, Jeremy Peterson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: