Compare commits

...

3 Commits

Author SHA1 Message Date
Minei3oat 3fa2258011
Merge 0bbf1251d1 into e909be6380 2025-07-21 00:14:05 +08:00
Poorna e909be6380 send replication requests to correct pool (#1162)
VulnCheck / Analysis (push) Has been cancelled Details
Fixes incorrect application of ilm expiry rules on versioned objects
when replication is enabled.

Regression from https://github.com/minio/minio/pull/20441 which sends
DeleteObject calls to all pools. This is a problem for replication + ilm
scenario since replicated version can end up in a pool by itself instead of
pool where remaining object versions reside.

For example, if the delete marker is set on pool1 and object versions exist on
pool2, the second rule below will cause the delete marker to be expired by ilm
policy since it is the single version present in pool1
```
{
  "Rules": [
   {
    "ID": "cs6il1ri2hp48g71mdjg",
    "NoncurrentVersionExpiration": {
     "NoncurrentDays": 14
    },
    "Status": "Enabled"
   },
   {
    "Expiration": {
     "ExpiredObjectDeleteMarker": true
    },
    "ID": "cs6inj3i2hp4po19cil0",
    "Status": "Enabled"
   }
  ]
}
```
2025-07-19 13:27:52 -07:00
Minei3oat 0bbf1251d1 Helm: Add option for controlling the serviceAccount's automountServiceAccountToken parameter 2025-06-19 16:58:06 +02:00
3 changed files with 9 additions and 0 deletions

View File

@ -1185,6 +1185,13 @@ func (z *erasureServerPools) DeleteObject(ctx context.Context, bucket string, ob
return z.deleteObjectFromAllPools(ctx, bucket, object, opts, noReadQuorumPools)
}
// All replication requests needs to go to pool with the object.
if opts.ReplicationRequest {
objInfo, err = z.serverPools[pinfo.Index].DeleteObject(ctx, bucket, object, opts)
objInfo.Name = decodeDirObject(object)
return objInfo, err
}
for _, pool := range z.serverPools {
objInfo, err := pool.DeleteObject(ctx, bucket, object, opts)
if err != nil && !isErrObjectNotFound(err) && !isErrVersionNotFound(err) {

View File

@ -3,4 +3,5 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- end }}

View File

@ -594,6 +594,7 @@ serviceAccount:
## The name of the service account to use. If 'create' is 'true', a service account with that name
## will be created.
name: "minio-sa"
automountServiceAccountToken: true
metrics:
serviceMonitor: