Skip to content

Commit

Permalink
tbs: added advisory msgs when creating upper/work subdirs fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Omer Preminger committed Jun 7, 2023
1 parent 18b045b commit e519a85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/pkg/util/fs/overlay/overlay_item_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,12 @@ func (i *Item) prepareWritableOverlay() error {
}
sylog.Debugf("Ensuring %q exists", i.Upper())
if err := EnsureOverlayDir(i.Upper(), true, 0o755); err != nil {
sylog.Errorf("Could not create overlay upper dir. If using an overlay image ensure it contains 'upper' and 'work' directories")
return fmt.Errorf("err encountered while preparing upper subdir of overlay dir %q: %w", i.Upper(), err)
}
sylog.Debugf("Ensuring %q exists", i.Work())
if err := EnsureOverlayDir(i.Work(), true, 0o700); err != nil {
sylog.Errorf("Could not create overlay work dir. If using an overlay image ensure it contains 'upper' and 'work' directories")
return fmt.Errorf("err encountered while preparing work subdir of overlay dir %q: %w", i.Work(), err)
}
default:
Expand Down

0 comments on commit e519a85

Please sign in to comment.