-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
Description
When a catalog cache's digest is not readable (file does not exist, or permissions prevent reading) or when the digest does not match the locally-calculated digest, opm will try to regenerate the cache. In typical published catalog images with a pre-generated cache, the cache directory is deliberately lacking delete permissions.
This produces messaging like:
2023-01-03T08:42:27.514784820Z Error: compute digest: compute hash: write tar: open /tmp/cache/cache: permission denied
2023-01-03T08:42:27.515439730Z Usage:
2023-01-03T08:42:27.515439730Z opm serve <source_path> [flags]The message could be improved by distinguishing between:
- failure to create cache directory
- failure to read digest, and here
- other failure modes in the
loadmethod related to digest mismatch, recompute errors
In addition, it would be extremely useful to provide a new flag to opm serve which would enforce process exit on cache load error, instead of attempts to regenerate the cache. This would allow us to align flags explicitly with the specific "no updates allowed" use-case.
Metadata
Metadata
Assignees
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.