diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-14 21:56:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 21:56:37 -0500 |
commit | 8ce9995951b14a0a4d7252cdd97597411fd5f980 (patch) | |
tree | b59fcfdfc29ff3979186116e23373c8d72f31169 /pkg/domain/infra/abi/system.go | |
parent | 2b7793b6121d336a285fb7b9a7612c221cbf63d2 (diff) | |
parent | f781efd2dca4c1db54762c6edec2b915e48dd5d8 (diff) | |
download | podman-8ce9995951b14a0a4d7252cdd97597411fd5f980.tar.gz podman-8ce9995951b14a0a4d7252cdd97597411fd5f980.tar.bz2 podman-8ce9995951b14a0a4d7252cdd97597411fd5f980.zip |
Merge pull request #8604 from mheon/volume_plugin_impl
Initial implementation of volume plugins
Diffstat (limited to 'pkg/domain/infra/abi/system.go')
-rw-r--r-- | pkg/domain/infra/abi/system.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go index 97fa9d374..f29b98696 100644 --- a/pkg/domain/infra/abi/system.go +++ b/pkg/domain/infra/abi/system.go @@ -312,7 +312,17 @@ func (ic *ContainerEngine) SystemDf(ctx context.Context, options entities.System var reclaimableSize int64 for _, v := range vols { var consInUse int - volSize, err := sizeOfPath(v.MountPoint()) + mountPoint, err := v.MountPoint() + if err != nil { + return nil, err + } + if mountPoint == "" { + // We can't get any info on this volume, as it's not + // mounted. + // TODO: fix this. + continue + } + volSize, err := sizeOfPath(mountPoint) if err != nil { return nil, err } |