Skip to content

Commit

Permalink
consider missing lvm-volume as already deleted (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwennrich authored Feb 26, 2021
1 parent 271bcb3 commit f864404
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ dockerbuildpush:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t metalstack/csi-lvmplugin-provisioner:${DOCKER_TAG} . -f cmd/provisioner/Dockerfile
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t metalstack/lvmplugin:${DOCKER_TAG} .

.PHONY: cidockerbuildpush
cidockerbuildpush:
docker build -t metalstack/csi-lvmplugin-provisioner:${DOCKER_TAG} . -f cmd/provisioner/Dockerfile
docker build -t metalstack/lvmplugin:${DOCKER_TAG} .
docker push metalstack/lvmplugin:${DOCKER_TAG}
docker push metalstack/csi-lvmplugin-provisioner:${DOCKER_TAG}

.PHONY: tests
tests: | start-test build-provisioner build-plugin build-test do-test clean-test

Expand Down Expand Up @@ -54,7 +61,7 @@ clean-test:
@minikube delete

.PHONY: metalci
metalci: dockerbuildpush
metalci: cidockerbuildpush
@cp -R helm tests/files
docker build --build-arg docker_tag=${TEST_TAG} --build-arg devicepattern='/dev/nvme[0-9]n[0-9]' --build-arg pullpolicy=Always -t csi-lvm-tests:${TEST_TAG} tests > /dev/null
docker run --rm csi-lvm-tests:${TEST_TAG} bats /bats
Expand Down
2 changes: 1 addition & 1 deletion pkg/lvm/lvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ func extendLVS(ctx context.Context, vg string, name string, size uint64, isBlock
func RemoveLVS(ctx context.Context, vg string, name string) (string, error) {

if !lvExists(vg, name) {
return "", fmt.Errorf("logical volume %s does not exist", name)
return fmt.Sprintf("logical volume %s does not exist. Assuming it has already been deleted.", name), nil
}
args := []string{"-q", "-y"}
args = append(args, fmt.Sprintf("%s/%s", vg, name))
Expand Down

0 comments on commit f864404

Please sign in to comment.