-
Spike
-
Resolution: Done
-
Undefined
-
None
-
None
-
Strategic Product Work
-
False
-
-
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)
- 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?