harbor icon indicating copy to clipboard operation
harbor copied to clipboard

Replication task cannot be stopped

Open lengrongfu opened this issue 2 years ago • 2 comments

If you are reporting a problem, please make sure the following information are provided:

Expected behavior and actual behavior: I created and run a copy task, the task is running for a long time, during the run I click the stop task button on the page, nothing happens, the task stop fails.

Hope can control the task and stop.

image

Steps to reproduce the problem:

  1. Create a task that replicates the origin of https://artifacthub.io/
  2. stop task, and stop faild.

Versions: Please specify the versions of following systems.

  • harbor version: [2.5.0]
  • docker engine version: [y.y.y]
  • docker-compose version: [z.z.z]

Additional context:

  • Harbor config files: You can get them by packaging harbor.yml and files in the same directory, including subdirectory.
  • Log files: You can get them by package the /var/log/harbor/ .

lengrongfu avatar Aug 08 '22 16:08 lengrongfu

It took an hour or so for the task to stop succeeding.

lengrongfu avatar Aug 09 '22 02:08 lengrongfu

Through my analysis of the code, I found that after calling post /replication/executions to execute the create executions logic and then calling Put /replication/executions to execute the stop executions logic, if the execution is time-consuming, it will not succeed when the task stops.

lengrongfu avatar Aug 09 '22 08:08 lengrongfu

For all the asynchronous jobs in harbor such as GC/Replication/Scan..., the stop logic is executed by checkpoints, harbor presets multiple check points in the process of jobs, so if the time-consuming process between the last checkpoint and next checkpoint, It does take some time to stop, but this works as the expected. But as you mentioned It took an hour or so for the task to stop succeeding., it is really not a good user experience, thanks for your pr, I also reviewed the change, but I think we should keep the consistency of different jobs instead of doing any special logic for someone, I suggest you can open a discussion in the harbor repository so that we can collect more user opinions, If we finally need to do this, we can make a completed proposal for the design and implement this as a full feature in the future release. Thanks!

chlins avatar Aug 15 '22 09:08 chlins

OK, we can ask for a discussion to see if there are similar issues.

lengrongfu avatar Aug 15 '22 10:08 lengrongfu

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] avatar Oct 15 '22 09:10 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.

github-actions[bot] avatar Nov 15 '22 09:11 github-actions[bot]