From 16535cdecb0667838927504691535bd29fdebf81 Mon Sep 17 00:00:00 2001 From: prayag0one4 Date: Sun, 26 Jul 2026 22:40:32 +0530 Subject: [PATCH] volumes: propagate MountCount error upwards When volume.MountCount() fails, we shouldn't silence the error and return that the volume is unmounted. This can hide potential volume state corruption. Propagate the error upwards so that the client/CLI can handle it correctly. Signed-off-by: prayag0one4 --- pkg/domain/infra/abi/volumes.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/domain/infra/abi/volumes.go b/pkg/domain/infra/abi/volumes.go index 52006044c6..1e0c453736 100644 --- a/pkg/domain/infra/abi/volumes.go +++ b/pkg/domain/infra/abi/volumes.go @@ -209,8 +209,7 @@ func (ic *ContainerEngine) VolumeMounted(_ context.Context, nameOrID string) (*e } mountCount, err := vol.MountCount() if err != nil { - // FIXME: this error should probably be returned - return &entities.BoolReport{Value: false}, nil //nolint: nilerr + return nil, err } if mountCount > 0 { return &entities.BoolReport{Value: true}, nil