You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when a value different than 0 is specified, the validator fails the request with the following message: the 1st field (indicating Seconds of time) of the cron setting must be 0
Why are we forcing the seconds value to be 0? Personally it suits be to be able to specify the replication crons up to the second.
I have a few pull-based replications that i perform every 2 minutes, but I want to stagger them out every 15 seconds so we don't have a thundering herd on the source harbor.
Speaking of that, when a harbor receives multiple requests and that it can't handle all of them, it starts rejecting the requests with 401/403 status codes but that's an issue for another day.
By digging deeper, I found that it's the Auth Middleware that does not give back the oath token, and when the request continues to the backend, it is not equipped with the oauth so the remaining calls fail.
The text was updated successfully, but these errors were encountered:
The cron image is just a general rule on how to specify cron string for scheduled job. However, Harbor enforced some additional limitations.
As for the second field, it is fixed to be 0. The reason for that is mainly to avoid users configuring it as * which is overwhelming and doesn't makes sense. And the second field is fixed as 0 in UI for all scheduled tasks, API is try to make it consistent with it.
As for the minute field, it cannot be *, because replicating every minute might also be overwhelming.
The documentation in the harbor GUI states that the seconds field can take any value from 0-59
https://github.com/goharbor/harbor/blob/main/src/portal/src/app/shared/components/cron-schedule/cron-tooltip/cron-tooltip.component.html#L29
But when a value different than 0 is specified, the validator fails the request with the following message:
the 1st field (indicating Seconds of time) of the cron setting must be 0
By searching for the message we find the culprit: https://github.com/goharbor/harbor/blob/main/src/controller/replication/model/model.go#L113
Versions:
Please specify the versions of following systems.
[2.10.0]
[5:26.0.0-1~debian.11~bullseye]
[2.25.0-1~debian.11~bullseye]
Why are we forcing the seconds value to be 0? Personally it suits be to be able to specify the replication crons up to the second.
I have a few pull-based replications that i perform every 2 minutes, but I want to stagger them out every 15 seconds so we don't have a thundering herd on the source harbor.
Speaking of that, when a harbor receives multiple requests and that it can't handle all of them, it starts rejecting the requests with 401/403 status codes but that's an issue for another day.
By digging deeper, I found that it's the Auth Middleware that does not give back the oath token, and when the request continues to the backend, it is not equipped with the oauth so the remaining calls fail.
The text was updated successfully, but these errors were encountered: