Improve error messages and remove check

* Improve error messages
  * remove a check for the existance of unmount target. We probably
    should not mask that the target was missing.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira
2023-04-04 12:07:34 -07:00
parent ba74cdf150
commit 8538e7a2ac
4 changed files with 3 additions and 11 deletions

View File

@@ -356,7 +356,7 @@ func (s *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, k
// Create the new snapshot dir
snDir := s.getSnapshotDir(newSnapshot.ID)
if err = os.MkdirAll(snDir, 0700); err != nil {
return fmt.Errorf("creating snapshot dir: %w", err)
return fmt.Errorf("failed to create snapshot dir %s: %w", snDir, err)
}
if strings.Contains(key, snapshots.UnpackKeyPrefix) {