-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mirror watch doesn't recover when server is temporary down #4883
Comments
Not sure if this is something we want to fix. If a remote is down, we will not receive notifications and mirror will miss entries. Restarting mc seems like the reasonable solution to re-enumerate the files on either side. |
That is what is expected from mc --watch not sure why it's failing. |
Well, the server isn't up when it is called, hence the |
No the idea was that even with that it perpetually keeps retrying. Looks like someone has changed the code. |
Well, that is a problem, if it changed then. |
I'm observing that too. In my case it would be perfect if Browsing through the code, I found the following (just a hypothesis, haven't tested my observations at all): If I'm not mistaken, errors from the watcher are handled on line 754ff in mirror-main.go. If an error occurs, it is forwarded to the parallel manager ( The parallel manager will handle that error task in one of its workers. If a worker encounters an error task, then it simply terminates itself (line 97ff in parallel-manager.go). But all the others seem to continue as if nothing happened. |
It seems that the code in Maybe there should be a distinction between fatal errors (connection lost to bucket) and recoverable errors. In that case it would be possible to make a distinction at line 588ff |
Expected behavior
I'm trying to mirror my s3 bucket to a local directory into a doker container using the image
minio/mc:RELEASE.2024-03-13T23-51-57Z-cpuv1
with the commandAs you can see the bucket is the source and the container folder is the target and it works very good file will be added or removed based on the actual state of the bucket.
Actual behavior
I'm experienced a problem when the minio server is down or unreacheable, the container show the following log:
but when the minio-server is up again the minio-client can't recover the mirroring functionality and essentially the container is useless and must to be manually restarted.
There is something I'm doing wrong or simply the minio-client is not inteded to recover it self?
Steps to reproduce the behavior
This is the complete logs provided by the container
mc --version
mc version RELEASE.2024-03-13T23-51-57Z (commit-id=2508db9c560c10be0ed2203eaa585134235b6907)
Runtime: go1.21.8 linux/amd64
Copyright (c) 2015-2024 MinIO, Inc.
License GNU AGPLv3 https://www.gnu.org/licenses/agpl-3.0.html
System information
Docker container with image
minio/mc:RELEASE.2024-03-13T23-51-57Z-cpuv1
The text was updated successfully, but these errors were encountered: