diff --git a/go.mod b/go.mod index da1162b3d..7189426e0 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/longhorn/go-common-libs v0.0.0-20250419062810-2bdafe8e7f4e github.com/longhorn/go-spdk-helper v0.0.0-20250418061607-6992821f5686 github.com/longhorn/longhorn-engine v1.9.0-dev-20250223.0.20250225091521-921f63f3a87d - github.com/longhorn/longhorn-spdk-engine v0.0.0-20250417025732-c02213b70a28 + github.com/longhorn/longhorn-spdk-engine v0.0.0-20250420232921-68e08b0a127a github.com/longhorn/types v0.0.0-20250416235128-0c407ad2b792 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 diff --git a/go.sum b/go.sum index f5b79ed59..50c702927 100644 --- a/go.sum +++ b/go.sum @@ -118,8 +118,8 @@ github.com/longhorn/go-spdk-helper v0.0.0-20250418061607-6992821f5686 h1:MDji0xs github.com/longhorn/go-spdk-helper v0.0.0-20250418061607-6992821f5686/go.mod h1:k1MUTmyAIXuabuyviT3shOnN618449WqmamtCJlsh4c= github.com/longhorn/longhorn-engine v1.9.0-dev-20250223.0.20250225091521-921f63f3a87d h1:JdkTIIaKT0uUU80Ncl26JeAqT727PgPJMaqjf0OUfAE= github.com/longhorn/longhorn-engine v1.9.0-dev-20250223.0.20250225091521-921f63f3a87d/go.mod h1:qTsHK0nU6Myh4XGnuqfsPG4FpeLh7Vki2hLl/1P0iuc= -github.com/longhorn/longhorn-spdk-engine v0.0.0-20250417025732-c02213b70a28 h1:AkQ+E59NgyCqkh8PqPs17mpjL6my5hqH5ijBKUhJyEs= -github.com/longhorn/longhorn-spdk-engine v0.0.0-20250417025732-c02213b70a28/go.mod h1:kZMwCV534EKpYDWXU3oixEbuX6icabTZ6GVw4OQwgv4= +github.com/longhorn/longhorn-spdk-engine v0.0.0-20250420232921-68e08b0a127a h1:EzjGbk2E24f7bCbDD/sEBmDIcPXxPu992CSXfhV7Ldo= +github.com/longhorn/longhorn-spdk-engine v0.0.0-20250420232921-68e08b0a127a/go.mod h1:nPCGGwihcFThXMXtqlVw2pCKHVshRbLzXatza9m/BNw= github.com/longhorn/sparse-tools v0.0.0-20241216160947-2b328f0fa59c h1:OFz3haCSPdgiiJvXLBeId/4dPu0dxIEqkQkfNMufLwc= github.com/longhorn/sparse-tools v0.0.0-20241216160947-2b328f0fa59c/go.mod h1:dfbJqfI8+T9ZCp5zhTYcBi/64hPBNt5/vFF3gTlfMmc= github.com/longhorn/types v0.0.0-20250416235128-0c407ad2b792 h1:+KWYQQKGCBnoy7Our2ryJ9HtUksKf3OPaLVMfsxPzMk= diff --git a/vendor/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/replica.go b/vendor/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/replica.go index f403cc5ed..18f49fa9a 100644 --- a/vendor/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/replica.go +++ b/vendor/github.com/longhorn/longhorn-spdk-engine/pkg/spdk/replica.go @@ -1864,7 +1864,10 @@ func (r *Replica) RebuildingDstStart(spdkClient *spdkclient.Client, srcReplicaNa return "", err } for lvolName, lvol := range bdevLvolMap { - if lvolName == r.Name || (r.ActiveChain[0] != nil && lvolName == r.ActiveChain[0].Name) { + if IsBackingImageSnapLvolName(lvolName) { + continue + } + if lvolName == r.Name { continue } if IsReplicaExpiredLvol(r.Name, lvolName) { @@ -1900,7 +1903,7 @@ func (r *Replica) RebuildingDstStart(spdkClient *spdkclient.Client, srcReplicaNa if _, err := spdkClient.BdevLvolDelete(lvol.UUID); err != nil && !jsonrpc.IsJSONRPCRespErrorNoSuchDevice(err) { return "", err } - r.log.Debugf("Replica found and deleted the redundant lvol %s(%s) for dst replica %v rebuilding start", lvol.Aliases[0], lvol.UUID, r.Name) + r.log.Infof("Replica found and deleted the redundant lvol %s(%s) for dst replica %v rebuilding start", lvol.Aliases[0], lvol.UUID, r.Name) } r.rebuildingDstCache.rebuildingError = "" @@ -2059,6 +2062,9 @@ func (r *Replica) doCleanupForRebuildingDst(spdkClient *spdkclient.Client) error chainLvolMap[inChainLvol.Name] = inChainLvol } for lvolName, lvol := range bdevLvolMap { + if IsBackingImageSnapLvolName(lvolName) { + continue + } if lvolName == r.Name || IsRebuildingLvol(lvolName) || IsReplicaExpiredLvol(r.Name, lvolName) { continue } @@ -2081,7 +2087,7 @@ func (r *Replica) doCleanupForRebuildingDst(spdkClient *spdkclient.Client) error if _, err := spdkClient.BdevLvolDelete(lvol.Aliases[0]); err != nil && !jsonrpc.IsJSONRPCRespErrorNoSuchDevice(err) { return err } - r.log.Debugf("Replica found and deleted the redundant lvol %s(%s) for dst replica %v rebuilding cleanup", lvol.Aliases[0], lvol.UUID, r.Name) + r.log.Infof("Replica found and deleted the redundant lvol %s(%s) for dst replica %v rebuilding cleanup", lvol.Aliases[0], lvol.UUID, r.Name) } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 2f77759b8..824ba5300 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -264,7 +264,7 @@ github.com/longhorn/longhorn-engine/pkg/sync github.com/longhorn/longhorn-engine/pkg/types github.com/longhorn/longhorn-engine/pkg/util github.com/longhorn/longhorn-engine/pkg/util/disk -# github.com/longhorn/longhorn-spdk-engine v0.0.0-20250417025732-c02213b70a28 +# github.com/longhorn/longhorn-spdk-engine v0.0.0-20250420232921-68e08b0a127a ## explicit; go 1.23.0 github.com/longhorn/longhorn-spdk-engine/pkg/api github.com/longhorn/longhorn-spdk-engine/pkg/client