Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(disk): no need to check disk UUID while deleting a disk #3036

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions controller/node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1699,10 +1699,7 @@ func (nc *NodeController) alignDiskSpecAndStatus(node *longhorn.Node) {
}

func (nc *NodeController) deleteDisk(diskType longhorn.DiskType, diskName, diskUUID, diskPath, diskDriver string) error {
if diskUUID == "" {
log.Infof("Disk %v has no diskUUID, skip deleting", diskName)
return nil
}
log.Infof("Deleting disk %v with diskUUID %v", diskName, diskUUID)

dataEngine := util.GetDataEngineForDiskType(diskType)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ require (
github.com/longhorn/go-iscsi-helper v0.0.0-20240727052644-d2442a50e906
github.com/longhorn/go-spdk-helper v0.0.0-20240727080828-a55a2982815a
github.com/longhorn/longhorn-engine v1.7.0-rc1
github.com/longhorn/longhorn-instance-manager v1.7.0-dev.0.20240727125733-d96adf75e2eb
github.com/longhorn/longhorn-instance-manager v1.7.0-dev.0.20240731053924-6cc08179c5cb
github.com/longhorn/longhorn-share-manager v1.7.0-rc1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.18.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1232,8 +1232,8 @@ github.com/longhorn/go-spdk-helper v0.0.0-20240727080828-a55a2982815a h1:x54NTKw
github.com/longhorn/go-spdk-helper v0.0.0-20240727080828-a55a2982815a/go.mod h1:sD6aVynQSbPnYyJ77NLiYbWNI5zyzxcVzIEnXFcKCww=
github.com/longhorn/longhorn-engine v1.7.0-rc1 h1:kQ4BwCvBemWsQvVnLdRsbiCXR3zmQBMA1J9Ezysh2q0=
github.com/longhorn/longhorn-engine v1.7.0-rc1/go.mod h1:u0TZ1221YusDYA+ExdVLjLid1Ps6JuJXgh9185l5D9Y=
github.com/longhorn/longhorn-instance-manager v1.7.0-dev.0.20240727125733-d96adf75e2eb h1:JyVpFX7jlSOIrGvEoNulPhFtItVipMgC0sIaYUq/4rA=
github.com/longhorn/longhorn-instance-manager v1.7.0-dev.0.20240727125733-d96adf75e2eb/go.mod h1:+QzxQdUohZCaIXLdzlr/wQXmp1RO2wnLBC+F4cCtbG0=
github.com/longhorn/longhorn-instance-manager v1.7.0-dev.0.20240731053924-6cc08179c5cb h1:A98gAFy2sR5Nf2KZ4+sVsNRvFUBidK8TpyJ+mDUi5AQ=
github.com/longhorn/longhorn-instance-manager v1.7.0-dev.0.20240731053924-6cc08179c5cb/go.mod h1:g0R2rLXvf0Mi6rHq8eNA/ESE7Ykm9+EUNSbPxoz9GmA=
github.com/longhorn/longhorn-share-manager v1.7.0-rc1 h1:LsSkSajhG8tCfORKKfwK+8XHVrT/8rI9DRWb7fuoVls=
github.com/longhorn/longhorn-share-manager v1.7.0-rc1/go.mod h1:R6+NscPU4lAV5ueO7//lBCAO3en0aDbZi5KkkOSUJvk=
github.com/longhorn/types v0.0.0-20240725040629-473d671316c4 h1:L2g0sIJ2fXt4BSFRYNnF6ObtKryCUFm9qLcCXHWssCk=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ github.com/longhorn/longhorn-engine/pkg/meta
github.com/longhorn/longhorn-engine/pkg/replica/client
github.com/longhorn/longhorn-engine/pkg/types
github.com/longhorn/longhorn-engine/pkg/util
# github.com/longhorn/longhorn-instance-manager v1.7.0-dev.0.20240727125733-d96adf75e2eb
# github.com/longhorn/longhorn-instance-manager v1.7.0-dev.0.20240731053924-6cc08179c5cb
## explicit; go 1.22.2
github.com/longhorn/longhorn-instance-manager/pkg/api
github.com/longhorn/longhorn-instance-manager/pkg/client
Expand Down