goharbor/harbor · error

single active replication is not allowed for event_based tri

Error message

single active replication is not allowed for event_based triggers

What it means

Error "single active replication is not allowed for event_based triggers" thrown in goharbor/harbor.

Source

Thrown at src/server/v2.0/handler/replication.go:119

				Cron: params.Policy.Trigger.TriggerSettings.Cron,
			}
		}
	}
	if params.Policy.Speed != nil {
		if *params.Policy.Speed < 0 {
			*params.Policy.Speed = 0
		}
		policy.Speed = *params.Policy.Speed
	}

	if params.Policy.CopyByChunk != nil {
		policy.CopyByChunk = *params.Policy.CopyByChunk
	}

	if params.Policy.SingleActiveReplication != nil {
		// Validate and assign SingleActiveReplication only for non-event_based triggers
		if params.Policy.Trigger != nil && params.Policy.Trigger.Type == model.TriggerTypeEventBased && *params.Policy.SingleActiveReplication {
			return r.SendError(ctx, fmt.Errorf("single active replication is not allowed for event_based triggers"))
		}
		policy.SingleActiveReplication = *params.Policy.SingleActiveReplication
	}

	id, err := r.ctl.CreatePolicy(ctx, policy)
	if err != nil {
		return r.SendError(ctx, err)
	}
	location := fmt.Sprintf("%s/%d", strings.TrimSuffix(params.HTTPRequest.URL.Path, "/"), id)
	return operation.NewCreateReplicationPolicyCreated().WithLocation(location)
}

func (r *replicationAPI) UpdateReplicationPolicy(ctx context.Context, params operation.UpdateReplicationPolicyParams) middleware.Responder {
	if err := r.RequireSystemAccess(ctx, rbac.ActionUpdate, rbac.ResourceReplicationPolicy); err != nil {
		return r.SendError(ctx, err)
	}
	policy := &repctlmodel.Policy{
		ID:                params.ID,

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/server/v2.0/handler/replication.go:119 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/77f8834e4c5de700. Report an issue: GitHub.