mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-25 18:53:44 +00:00
Merge pull request #1235 from nitkon/debug
virtcontainers: Improve debug messages when deleting files
This commit is contained in:
@@ -152,11 +152,13 @@ func (f *filesystem) initialize() error {
|
|||||||
// The root directory, a lock file and a raw files directory.
|
// The root directory, a lock file and a raw files directory.
|
||||||
|
|
||||||
// Root directory
|
// Root directory
|
||||||
|
f.logger().WithField("path", f.path).Debugf("Creating root directory")
|
||||||
if err := os.MkdirAll(f.path, DirMode); err != nil {
|
if err := os.MkdirAll(f.path, DirMode); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Raw directory
|
// Raw directory
|
||||||
|
f.logger().WithField("path", f.rawPath).Debugf("Creating raw directory")
|
||||||
if err := os.MkdirAll(f.rawPath, DirMode); err != nil {
|
if err := os.MkdirAll(f.rawPath, DirMode); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -186,6 +188,7 @@ func (f *filesystem) new(ctx context.Context, path string, host string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *filesystem) delete() error {
|
func (f *filesystem) delete() error {
|
||||||
|
f.logger().WithField("path", f.path).Debugf("Deleting files")
|
||||||
return os.RemoveAll(f.path)
|
return os.RemoveAll(f.path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user