Skip to content

Commit ed4e1cd

Browse files
committed
Check volume existent before deletion in volume controller
Signed-off-by: Bala.FA <bala@minio.io>
1 parent 86a696e commit ed4e1cd

23 files changed

+282
-248
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
build:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v4
21-
- uses: actions/setup-go@v5
20+
- uses: actions/checkout@v6
21+
- uses: actions/setup-go@v6
2222
with:
23-
go-version: 1.24.x
23+
go-version: 1.25.x
2424
check-latest: true
2525
- name: Set environment
2626
run: |

.github/workflows/functests.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020
timeout-minutes: 60
2121
strategy:
2222
matrix:
23-
kube-version: ['v1.20.15', 'v1.21.14', 'v1.22.17', 'v1.23.17', 'v1.24.17', 'v1.25.16', 'v1.26.15', 'v1.27.16', 'v1.28.15', 'v1.29.14', 'v1.30.14', 'v1.31.10', 'v1.32.6', 'v1.33.2']
23+
kube-version: ['v1.28.15', 'v1.29.14', 'v1.30.14', 'v1.31.14', 'v1.32.10', 'v1.33.6', 'v1.34.2']
2424
os: [ubuntu-22.04, ubuntu-24.04]
2525

2626
steps:
27-
- uses: actions/checkout@v4
28-
- uses: actions/setup-go@v5
27+
- uses: actions/checkout@v6
28+
- uses: actions/setup-go@v6
2929
with:
30-
go-version: 1.24.x
30+
go-version: 1.25.x
3131
check-latest: true
3232

3333
- name: Install dependencies
@@ -70,7 +70,7 @@ jobs:
7070
while kubectl get nodes --no-headers | grep -vqw Ready; do echo "Waiting for Minikube node to be ready"; sleep 3; done
7171
7272
- name: Enable kustomize
73-
if: contains(fromJson('["v1.24.17", "v1.25.16", "v1.26.15", "v1.27.16", "v1.28.15", "v1.29.14"]'), matrix.kube-version)
73+
if: contains(fromJson('["v1.28.15", "v1.29.14"]'), matrix.kube-version)
7474
run: |
7575
echo "KUSTOMIZE=true" >> $GITHUB_ENV
7676
@@ -82,9 +82,3 @@ jobs:
8282
run: |
8383
sudo rm -fr /var/lib/directpv
8484
functests/run-migration-tests.sh "v3.2.2"
85-
86-
- name: Run migration tests with DirectCSI v2.0.9
87-
if: contains(fromJson('["v1.20.15", "v1.21.14", "v1.22.17"]'), matrix.kube-version)
88-
run: |
89-
sudo rm -fr /var/lib/directpv /var/lib/direct-csi
90-
functests/run-migration-tests.sh "v2.0.9"

.github/workflows/linters.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
linters:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v4
21-
- uses: actions/setup-go@v5
20+
- uses: actions/checkout@v6
21+
- uses: actions/setup-go@v6
2222
with:
23-
go-version: 1.24.x
23+
go-version: 1.25.x
2424
check-latest: true
2525
- uses: ludeeus/action-shellcheck@master
26-
- uses: golangci/golangci-lint-action@v8
26+
- uses: golangci/golangci-lint-action@v9
2727
with:
28-
version: v2.2.1
28+
version: v2.7.1
2929
args: --config ./.golangci.yml --timeout=60m

.github/workflows/vulncheck.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Check out code
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323
- name: Set up Go
24-
uses: actions/setup-go@v5
24+
uses: actions/setup-go@v6
2525
with:
26-
go-version: 1.24.x
26+
go-version: 1.25.x
2727
check-latest: true
2828
- name: Install govulncheck
2929
run: go install golang.org/x/vuln/cmd/govulncheck@latest

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: "2"
22
run:
3-
go: "1.24"
3+
go: "1.25"
44
linters:
55
default: none
66
enable:

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ release:
1717

1818
before:
1919
hooks:
20-
- go mod tidy -compat=1.24
20+
- go mod tidy -compat=1.25
2121
- go mod download
2222

2323
builds:

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ COPY LICENSE /licenses/LICENSE
88

99
RUN microdnf update --nodocs
1010

11-
COPY AlmaLinux.repo /etc/yum.repos.d/AlmaLinux.repo
11+
COPY AlmaLinux.repo /AlmaLinux.repo
1212

1313
RUN \
1414
curl -L https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/RPM-GPG-KEY-AlmaLinux -o /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux && \
15-
microdnf install xfsprogs --nodocs && \
15+
microdnf install dnf --nodocs && \
16+
mv /AlmaLinux.repo /etc/yum.repos.d/AlmaLinux.repo && \
17+
dnf --quiet --assumeyes --nodocs install xfsprogs && \
18+
dnf --quiet --assumeyes clean all && \
19+
rpm -e --nodeps dnf dnf-data gdbm gdbm-libs ima-evm-utils libcomps libevent libreport-filesystem platform-python platform-python-pip platform-python-setuptools python3-dnf python3-gpg python3-hawkey python3-libcomps python3-libdnf python3-libs python3-pip-wheel python3-rpm python3-setuptools-wheel python3-unbound rpm-build-libs tpm2-tss unbound-libs && \
1620
microdnf clean all && \
1721
rm -f /etc/yum.repos.d/AlmaLinux.repo
1822

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# DirectPV
22

3+
***It is higher recommended to use the latest version of DirectPV from [MinIO registry](https://quay.io/repository/minio/directpv) and the plugin from [Download page](https://dl.min.io/aistor/directpv/release/)***
4+
35
[DirectPV](https://github.com/minio/directpv) is a [CSI](https://kubernetes.io/blog/2019/01/15/container-storage-interface-ga/) driver for [Direct Attached Storage](https://en.wikipedia.org/wiki/Direct-attached_storage). In a simpler sense, it is a distributed persistent volume manager, and not a storage system like SAN or NAS. It is useful to *discover, format, mount, schedule and monitor* drives across servers.
46

57
Distributed data stores such as object storage, databases and message queues are designed for direct attached storage, and they handle high availability and data durability by themselves. Running them on traditional SAN or NAS based CSI drivers (Network PV) adds yet another layer of replication/erasure coding and extra network hops in the data path. This additional layer of disaggregation results in increased-complexity and poor performance.
@@ -45,7 +47,8 @@ DirectPV is a MinIO project. You can contact the authors over the [slack channel
4547

4648
## Unsupported versions
4749
* Versions `v1.x`, `v2.x` and `v3.x` of DirectCSI/DirectPV are marked end-of-life and unsupported.
48-
* DirectPV version `v4.0.x` entered maintenance mode on Jan 01, 2025.
50+
* DirectPV version `v4.0.x` entered into maintenance mode on Jan 01, 2025.
51+
* DirectPV version `v4.1.x` entered into maintenance mode on Jan 01, 2026.
4952

5053
## License
5154
DirectPV is released under GNU AGPLv3 license. Refer the [LICENSE document](https://github.com/minio/directpv/blob/master/LICENSE) for a complete copy of the license.

codegen.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ VERSIONS=(v1beta1)
2727

2828
echo "Installing code generators ..."
2929
go install -v \
30-
k8s.io/code-generator/cmd/deepcopy-gen@v0.33.2 \
31-
k8s.io/code-generator/cmd/client-gen@v0.33.2 \
32-
k8s.io/code-generator/cmd/conversion-gen@v0.33.2
33-
go install -v k8s.io/kube-openapi/cmd/openapi-gen@v0.0.0-20250701173324-9bd5c66d9911
34-
go install -v sigs.k8s.io/controller-tools/cmd/controller-gen@v0.18.0
30+
k8s.io/code-generator/cmd/deepcopy-gen@v0.34.2 \
31+
k8s.io/code-generator/cmd/client-gen@v0.34.2 \
32+
k8s.io/code-generator/cmd/conversion-gen@v0.34.2
33+
go install -v k8s.io/kube-openapi/cmd/openapi-gen@v0.0.0-20251125145642-4e65d59e963e
34+
go install -v sigs.k8s.io/controller-tools/cmd/controller-gen@v0.19.0
3535

3636
cd "$(dirname "$0")"
3737

go.mod

Lines changed: 65 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,113 @@
11
module github.com/minio/directpv
22

3-
go 1.24.0
4-
5-
toolchain go1.24.4
3+
go 1.25.5
64

75
require (
86
github.com/cespare/xxhash/v2 v2.3.0
97
github.com/charmbracelet/bubbles v0.21.0
10-
github.com/charmbracelet/bubbletea v1.3.5
8+
github.com/charmbracelet/bubbletea v1.3.10
119
github.com/charmbracelet/lipgloss v1.1.0
12-
github.com/container-storage-interface/spec v1.11.0
10+
github.com/container-storage-interface/spec v1.12.0
1311
github.com/dustin/go-humanize v1.0.1
1412
github.com/fatih/color v1.18.0
1513
github.com/freddierice/go-losetup/v2 v2.0.1
1614
github.com/google/uuid v1.6.0
17-
github.com/jedib0t/go-pretty/v6 v6.6.7
18-
github.com/kubernetes-csi/csi-lib-utils v0.22.0
15+
github.com/jedib0t/go-pretty/v6 v6.7.5
16+
github.com/kubernetes-csi/csi-lib-utils v0.23.0
1917
github.com/minio/sha256-simd v1.0.1
2018
github.com/mitchellh/go-homedir v1.1.0
21-
github.com/prometheus/client_golang v1.22.0
19+
github.com/prometheus/client_golang v1.23.2
2220
github.com/prometheus/client_model v0.6.2
23-
github.com/spf13/cobra v1.9.1
24-
github.com/spf13/viper v1.20.1
25-
golang.org/x/text v0.26.0
26-
golang.org/x/time v0.12.0
27-
google.golang.org/grpc v1.73.0
21+
github.com/spf13/cobra v1.10.2
22+
github.com/spf13/viper v1.21.0
23+
golang.org/x/text v0.31.0
24+
golang.org/x/time v0.14.0
25+
google.golang.org/grpc v1.77.0
2826
gopkg.in/yaml.v3 v3.0.1
29-
k8s.io/api v0.33.2
30-
k8s.io/apiextensions-apiserver v0.33.2
31-
k8s.io/apimachinery v0.33.2
32-
k8s.io/client-go v0.33.2
27+
k8s.io/api v0.34.2
28+
k8s.io/apiextensions-apiserver v0.34.2
29+
k8s.io/apimachinery v0.34.2
30+
k8s.io/client-go v0.34.2
3331
k8s.io/klog/v2 v2.130.1
34-
k8s.io/kube-openapi v0.0.0-20250701173324-9bd5c66d9911
35-
k8s.io/pod-security-admission v0.33.2
36-
sigs.k8s.io/yaml v1.5.0
32+
k8s.io/kube-openapi v0.0.0-20251125145642-4e65d59e963e
33+
k8s.io/pod-security-admission v0.34.2
34+
sigs.k8s.io/yaml v1.6.0
3735
)
3836

3937
require (
4038
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
4139
github.com/beorn7/perks v1.0.1 // indirect
42-
github.com/charmbracelet/colorprofile v0.3.1 // indirect
40+
github.com/charmbracelet/colorprofile v0.3.3 // indirect
4341
github.com/charmbracelet/harmonica v0.2.0 // indirect
44-
github.com/charmbracelet/x/ansi v0.9.3 // indirect
45-
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
46-
github.com/charmbracelet/x/term v0.2.1 // indirect
42+
github.com/charmbracelet/x/ansi v0.11.0 // indirect
43+
github.com/charmbracelet/x/cellbuf v0.0.14 // indirect
44+
github.com/charmbracelet/x/term v0.2.2 // indirect
45+
github.com/clipperhouse/displaywidth v0.5.0 // indirect
46+
github.com/clipperhouse/stringish v0.1.1 // indirect
47+
github.com/clipperhouse/uax29/v2 v2.3.0 // indirect
4748
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
48-
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
49+
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
4950
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
5051
github.com/fsnotify/fsnotify v1.9.0 // indirect
51-
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
52+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
5253
github.com/go-logr/logr v1.4.3 // indirect
53-
github.com/go-openapi/jsonpointer v0.21.1 // indirect
54-
github.com/go-openapi/jsonreference v0.21.0 // indirect
55-
github.com/go-openapi/swag v0.23.1 // indirect
56-
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
54+
github.com/go-openapi/jsonpointer v0.22.1 // indirect
55+
github.com/go-openapi/jsonreference v0.21.2 // indirect
56+
github.com/go-openapi/swag v0.25.1 // indirect
57+
github.com/go-openapi/swag/cmdutils v0.25.1 // indirect
58+
github.com/go-openapi/swag/conv v0.25.1 // indirect
59+
github.com/go-openapi/swag/fileutils v0.25.1 // indirect
60+
github.com/go-openapi/swag/jsonname v0.25.1 // indirect
61+
github.com/go-openapi/swag/jsonutils v0.25.1 // indirect
62+
github.com/go-openapi/swag/loading v0.25.1 // indirect
63+
github.com/go-openapi/swag/mangling v0.25.1 // indirect
64+
github.com/go-openapi/swag/netutils v0.25.1 // indirect
65+
github.com/go-openapi/swag/stringutils v0.25.1 // indirect
66+
github.com/go-openapi/swag/typeutils v0.25.1 // indirect
67+
github.com/go-openapi/swag/yamlutils v0.25.1 // indirect
68+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
5769
github.com/gogo/protobuf v1.3.2 // indirect
5870
github.com/google/gnostic-models v0.7.0 // indirect
5971
github.com/google/go-cmp v0.7.0 // indirect
6072
github.com/inconshreveable/mousetrap v1.1.0 // indirect
61-
github.com/josharian/intern v1.0.0 // indirect
6273
github.com/json-iterator/go v1.1.12 // indirect
63-
github.com/klauspost/cpuid/v2 v2.2.11 // indirect
64-
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
65-
github.com/mailru/easyjson v0.9.0 // indirect
74+
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
75+
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
6676
github.com/mattn/go-colorable v0.1.14 // indirect
6777
github.com/mattn/go-isatty v0.0.20 // indirect
6878
github.com/mattn/go-localereader v0.0.1 // indirect
69-
github.com/mattn/go-runewidth v0.0.16 // indirect
79+
github.com/mattn/go-runewidth v0.0.19 // indirect
7080
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
71-
github.com/modern-go/reflect2 v1.0.2 // indirect
81+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
7282
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
7383
github.com/muesli/cancelreader v0.2.2 // indirect
7484
github.com/muesli/termenv v0.16.0 // indirect
7585
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
7686
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
77-
github.com/pkg/errors v0.9.1 // indirect
78-
github.com/prometheus/common v0.65.0 // indirect
79-
github.com/prometheus/procfs v0.17.0 // indirect
87+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
88+
github.com/prometheus/common v0.67.2 // indirect
89+
github.com/prometheus/procfs v0.19.2 // indirect
8090
github.com/rivo/uniseg v0.4.7 // indirect
81-
github.com/sagikazarmark/locafero v0.9.0 // indirect
82-
github.com/sourcegraph/conc v0.3.0 // indirect
83-
github.com/spf13/afero v1.14.0 // indirect
84-
github.com/spf13/cast v1.9.2 // indirect
85-
github.com/spf13/pflag v1.0.6 // indirect
91+
github.com/sagikazarmark/locafero v0.12.0 // indirect
92+
github.com/spf13/afero v1.15.0 // indirect
93+
github.com/spf13/cast v1.10.0 // indirect
94+
github.com/spf13/pflag v1.0.10 // indirect
8695
github.com/subosito/gotenv v1.6.0 // indirect
8796
github.com/x448/float16 v0.8.4 // indirect
8897
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
89-
go.uber.org/multierr v1.11.0 // indirect
90-
go.yaml.in/yaml/v2 v2.4.2 // indirect
98+
go.yaml.in/yaml/v2 v2.4.3 // indirect
9199
go.yaml.in/yaml/v3 v3.0.4 // indirect
92-
golang.org/x/net v0.41.0 // indirect
93-
golang.org/x/oauth2 v0.30.0 // indirect
94-
golang.org/x/sync v0.15.0 // indirect
95-
golang.org/x/sys v0.33.0 // indirect
96-
golang.org/x/term v0.32.0 // indirect
97-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
98-
google.golang.org/protobuf v1.36.6 // indirect
99-
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
100+
golang.org/x/net v0.46.1-0.20251013234738-63d1a5100f82 // indirect
101+
golang.org/x/oauth2 v0.33.0 // indirect
102+
golang.org/x/sys v0.38.0 // indirect
103+
golang.org/x/term v0.36.0 // indirect
104+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 // indirect
105+
google.golang.org/protobuf v1.36.10 // indirect
106+
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
100107
gopkg.in/inf.v0 v0.9.1 // indirect
101-
k8s.io/component-base v0.33.2 // indirect
102-
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
103-
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
108+
k8s.io/component-base v0.34.2 // indirect
109+
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect
110+
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
104111
sigs.k8s.io/randfill v1.0.0 // indirect
105-
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
112+
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
106113
)

0 commit comments

Comments
 (0)