diff --git a/cmd/bucket-lifecycle.go b/cmd/bucket-lifecycle.go index a513de7f1..2f650b5a0 100644 --- a/cmd/bucket-lifecycle.go +++ b/cmd/bucket-lifecycle.go @@ -401,7 +401,8 @@ func expireTransitionedObject(ctx context.Context, objectAPI ObjectLayer, oi *Ob EventName: eventName, BucketName: oi.Bucket, Object: objInfo, - Host: "Internal: [ILM-Expiry]", + UserAgent: "Internal: [ILM-Expiry]", + Host: globalLocalNodeName, }) case expireRestoredObj: diff --git a/cmd/bucket-replication.go b/cmd/bucket-replication.go index be28efa64..87fc71827 100644 --- a/cmd/bucket-replication.go +++ b/cmd/bucket-replication.go @@ -387,7 +387,8 @@ func replicateDelete(ctx context.Context, dobj DeletedObjectReplicationInfo, obj VersionID: versionID, DeleteMarker: dobj.DeleteMarker, }, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, EventName: event.ObjectReplicationNotTracked, }) return @@ -403,7 +404,8 @@ func replicateDelete(ctx context.Context, dobj DeletedObjectReplicationInfo, obj VersionID: versionID, DeleteMarker: dobj.DeleteMarker, }, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, EventName: event.ObjectReplicationNotTracked, }) return @@ -424,7 +426,8 @@ func replicateDelete(ctx context.Context, dobj DeletedObjectReplicationInfo, obj VersionID: versionID, DeleteMarker: dobj.DeleteMarker, }, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, EventName: event.ObjectReplicationNotTracked, }) return @@ -449,7 +452,8 @@ func replicateDelete(ctx context.Context, dobj DeletedObjectReplicationInfo, obj VersionID: versionID, DeleteMarker: dobj.DeleteMarker, }, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, EventName: event.ObjectReplicationNotTracked, }) continue @@ -516,14 +520,16 @@ func replicateDelete(ctx context.Context, dobj DeletedObjectReplicationInfo, obj VersionID: versionID, DeleteMarker: dobj.DeleteMarker, }, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, EventName: eventName, }) } else { sendEvent(eventArgs{ BucketName: bucket, Object: dobjInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, EventName: eventName, }) } @@ -560,7 +566,8 @@ func replicateDeleteToTarget(ctx context.Context, dobj DeletedObjectReplicationI VersionID: dobj.VersionID, DeleteMarker: dobj.DeleteMarker, }, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, EventName: event.ObjectReplicationNotTracked, }) if dobj.VersionID == "" { @@ -920,7 +927,8 @@ func replicateObject(ctx context.Context, ri ReplicateObjectInfo, objectAPI Obje EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) return } @@ -938,7 +946,8 @@ func replicateObject(ctx context.Context, ri ReplicateObjectInfo, objectAPI Obje EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) globalReplicationPool.queueMRFSave(ri.ToMRFEntry()) logger.LogIf(ctx, fmt.Errorf("failed to get lock for object: %s bucket:%s arn:%s", object, bucket, ri.TargetArn)) @@ -958,7 +967,8 @@ func replicateObject(ctx context.Context, ri ReplicateObjectInfo, objectAPI Obje EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) continue } @@ -1020,7 +1030,8 @@ func replicateObject(ctx context.Context, ri ReplicateObjectInfo, objectAPI Obje EventName: eventName, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) // re-queue failures once more - keep a retry count to avoid flooding the queue if @@ -1065,7 +1076,8 @@ func (ri ReplicateObjectInfo) replicateObject(ctx context.Context, objectAPI Obj EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) return } @@ -1084,7 +1096,8 @@ func (ri ReplicateObjectInfo) replicateObject(ctx context.Context, objectAPI Obj EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) logger.LogIf(ctx, fmt.Errorf("Unable to update replicate metadata for %s/%s(%s): %w", bucket, object, objInfo.VersionID, err)) } @@ -1101,7 +1114,8 @@ func (ri ReplicateObjectInfo) replicateObject(ctx context.Context, objectAPI Obj EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) return } @@ -1112,7 +1126,8 @@ func (ri ReplicateObjectInfo) replicateObject(ctx context.Context, objectAPI Obj EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) return rinfo } @@ -1137,7 +1152,8 @@ func (ri ReplicateObjectInfo) replicateObject(ctx context.Context, objectAPI Obj EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) return } @@ -1208,7 +1224,8 @@ func (ri ReplicateObjectInfo) replicateAll(ctx context.Context, objectAPI Object EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) return } @@ -1227,7 +1244,8 @@ func (ri ReplicateObjectInfo) replicateAll(ctx context.Context, objectAPI Object EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) logger.LogIf(ctx, fmt.Errorf("Unable to update replicate metadata for %s/%s(%s): %w", bucket, object, objInfo.VersionID, err)) } @@ -1251,7 +1269,8 @@ func (ri ReplicateObjectInfo) replicateAll(ctx context.Context, objectAPI Object EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) return } @@ -1262,7 +1281,8 @@ func (ri ReplicateObjectInfo) replicateAll(ctx context.Context, objectAPI Object EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) return rinfo } @@ -1292,7 +1312,8 @@ func (ri ReplicateObjectInfo) replicateAll(ctx context.Context, objectAPI Object EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) } // object with same VersionID already exists, replication kicked off by @@ -1340,7 +1361,8 @@ func (ri ReplicateObjectInfo) replicateAll(ctx context.Context, objectAPI Object EventName: event.ObjectReplicationNotTracked, BucketName: bucket, Object: objInfo, - Host: "Internal: [Replication]", + UserAgent: "Internal: [Replication]", + Host: globalLocalNodeName, }) return } diff --git a/cmd/data-scanner.go b/cmd/data-scanner.go index 946f7b34d..03ce556fd 100644 --- a/cmd/data-scanner.go +++ b/cmd/data-scanner.go @@ -1077,8 +1077,8 @@ func (i *scannerItem) applyVersionActions(ctx context.Context, o ObjectLayer, fi Object: ObjectInfo{ Name: i.objectPath(), }, - UserAgent: "scanner", - Host: globalMinioHost, + UserAgent: "Internal: [Scanner]", + Host: globalLocalNodeName, RespElements: map[string]string{"x-minio-versions": strconv.Itoa(len(fivs))}, }) } @@ -1203,7 +1203,8 @@ func applyExpiryOnNonTransitionedObjects(ctx context.Context, objLayer ObjectLay EventName: eventName, BucketName: obj.Bucket, Object: obj, - Host: "Internal: [ILM-Expiry]", + UserAgent: "Internal: [ILM-Expiry]", + Host: globalLocalNodeName, }) return true diff --git a/cmd/erasure-object.go b/cmd/erasure-object.go index a9bed6534..039378d19 100644 --- a/cmd/erasure-object.go +++ b/cmd/erasure-object.go @@ -1997,7 +1997,8 @@ func (er erasureObjects) TransitionObject(ctx context.Context, bucket, object st EventName: eventName, BucketName: bucket, Object: objInfo, - Host: "Internal: [ILM-Transition]", + UserAgent: "Internal: [ILM-Transition]", + Host: globalLocalNodeName, }) auditLogLifecycle(ctx, objInfo, ILMTransition) return err diff --git a/cmd/object-handlers-common.go b/cmd/object-handlers-common.go index 04f3d55b6..41805f906 100644 --- a/cmd/object-handlers-common.go +++ b/cmd/object-handlers-common.go @@ -384,7 +384,8 @@ func deleteObjectVersions(ctx context.Context, o ObjectLayer, bucket string, toD Name: dobj.ObjectName, VersionID: dobj.VersionID, }, - Host: "Internal: [ILM-Expiry]", + UserAgent: "Internal: [ILM-Expiry]", + Host: globalLocalNodeName, }) } }