-
Notifications
You must be signed in to change notification settings - Fork 456
decommission
Cesar Celis Hernandez edited this page Jan 30, 2024
·
1 revision
- Create cluster
createcluster nodeport
- install operator
installoperator nodeport
- install tenant lite
installtenant nodeport
- increase from 1 pool to 2 pools
- Wait couple of minutes until is ready:
- Get status:
mc alias set myminio https://localhost:30081 minio minio123 --insecure
mc admin decommission status myminio --insecure
Expected:
$ mc admin decommission status myminio --insecure
┌─────┬───────────────────────────────────────────────────────────────────────────────────────┬────────────────────────┬────────┐
│ ID │ Pools │ Raw Drives Usage │ Status │
│ 1st │ https://myminio-pool-0-{0...3}.myminio-hl.tenant-lite.svc.cluster.local/export{0...1} │ 16.2% (total: 332 GiB) │ Active │
│ 2nd │ https://myminio-pool-1-{0...3}.myminio-hl.tenant-lite.svc.cluster.local/export{0...1} │ 16.2% (total: 332 GiB) │ Active │
└─────┴───────────────────────────────────────────────────────────────────────────────────────┴────────────────────────┴────────┘
- Start Decommission:
mc admin decommission start myminio/ https://myminio-pool-0-{0...3}.myminio-hl.tenant-lite.svc.cluster.local/export{0...1} --insecure
Expected:
$ mc admin decommission start myminio/ https://myminio-pool-0-{0...3}.myminio-hl.tenant-lite.svc.cluster.local/export{0...1} --insecure
Decommission started successfully for `https://myminio-pool-0-{0...3}.myminio-hl.tenant-lite.svc.cluster.local/export{0...1}`.
- Monitor until complete:
$ mc admin decommission status myminio/ --insecure
┌─────┬───────────────────────────────────────────────────────────────────────────────────────┬────────────────────────┬──────────┐
│ ID │ Pools │ Raw Drives Usage │ Status │
│ 1st │ https://myminio-pool-0-{0...3}.myminio-hl.tenant-lite.svc.cluster.local/export{0...1} │ 16.2% (total: 332 GiB) │ Complete │
│ 2nd │ https://myminio-pool-1-{0...3}.myminio-hl.tenant-lite.svc.cluster.local/export{0...1} │ 16.2% (total: 332 GiB) │ Active │
└─────┴───────────────────────────────────────────────────────────────────────────────────────┴────────────────────────┴──────────┘
- Remove decommissioned pool from tenant spec
k edit tenant storage-lite -n tenant-lite
Cesars-MacBook-Pro:~ cniackz$ k edit tenant storage-lite -n tenant-lite
tenant.minio.min.io/storage-lite edited
- Operator log:
I0130 15:18:40.193678 1 event.go:298] Event(v1.ObjectReference{Kind:"Tenant", Namespace:"tenant-lite", Name:"myminio", UID:"58a44125-aff4-4b93-8b7f-95367bc4fceb", APIVersion:"minio.min.io/v2", ResourceVersion:"2509", FieldPath:""}): type: 'Normal' reason: 'PoolRemoved' Tenant pool myminio-pool-0 removed
- Status:
$ mc admin decommission status myminio --insecure
┌─────┬───────────────────────────────────────────────────────────────────────────────────────┬────────────────────────┬────────┐
│ ID │ Pools │ Raw Drives Usage │ Status │
│ 2nd │ https://myminio-pool-1-{0...3}.myminio-hl.tenant-lite.svc.cluster.local/export{0...1} │ 14.9% (total: 332 GiB) │ Active │
└─────┴───────────────────────────────────────────────────────────────────────────────────────┴────────────────────────┴────────┘
- Pods from pool 0 are gone, pods from pool 1 are present:
$ k get pods -n tenant-lite
NAME READY STATUS RESTARTS AGE
myminio-pool-1-0 2/2 Running 0 9m40s
myminio-pool-1-1 2/2 Running 0 9m43s
myminio-pool-1-2 2/2 Running 0 9m46s
myminio-pool-1-3 2/2 Running 0 10m
- Decommission worked in 4.5.8
- Decommission worked in 5.0.11