diff --git a/Makefile b/Makefile index 0322ae6..18e6da4 100644 --- a/Makefile +++ b/Makefile @@ -136,7 +136,7 @@ image: spdkcsi @if [ -n $(HTTP_PROXY) ]; then \ proxy_opt="--build-arg http_proxy=$(HTTP_PROXY) --build-arg https_proxy=$(HTTP_PROXY)"; \ fi; \ - docker login -u hamdykhader -p hamdy123456 \ + docker login -u hamdykhader -p hamdy123456 ; \ docker build -t $(CSI_IMAGE) $$proxy_opt \ -f deploy/image/Dockerfile $(OUT_DIR) diff --git a/pkg/util/iscsi.go b/pkg/util/iscsi.go index bf02abb..42182e9 100644 --- a/pkg/util/iscsi.go +++ b/pkg/util/iscsi.go @@ -130,6 +130,15 @@ func (node *nodeISCSI) DeleteVolume(lvolID string) error { return nil } +func (node *nodeISCSI) DeleteSnapshot(snapshotID string) error { + err := node.client.deleteVolume(snapshotID) + if err != nil { + return err + } + klog.V(5).Infof("snapshot deleted: %s", snapshotID) + return nil +} + // PublishVolume exports a volume through ISCSI target func (node *nodeISCSI) PublishVolume(lvolID string) error { exists, err := node.isVolumeCreated(lvolID)