This PR in-turn ends up supporting cascading deletes
for `mc mirror` setups when you have
```
mc mirror --watch alias1 alias2
mc mirror --watch alias2 alias3
```
IT still avoids cyclical deletes such as
```
mc mirror --watch alias1 alias2
mc mirror --watch alias2 alias1
```
client-s3.Stat() does not properly detect a prefix when there is another
lower one,
e.g: Stat() of 'dir/' fails when there is 'dir-name/' in the same parent
prefix.
In a site wide mirroring, non existing buckets in the destination site
are still created if --dry-run is passed. This commit will avoid this.
This commit also prints a mirror message of the newly created buckets
in a site wide mirroring.
When mirror in --watch mode is restarted, the previous minio-go
ListenNotification/ListenBucketNotification call is not properly
canceled. This commit creates a new context for that listen call and
cancels it when client-s3 Watch() is asked to be stopped.
Also remove the `--full` flag and run the new perf tests (that run quite
fast) always (if the minio version supports it).
In case of older versions of minio that have the older versions of the
performance tests, mc will not request for those tests to be run, and
subsequently will not look for their results in the response.
Removing an old code that calculates incorrectly the bucket and object
from the client-s3.targetURL. The old code assumed that
client-s3.targetURL can have this style
http://bucket.endpoint/prefix/object but this is not true.
client-s3.targetURL will always have this endpoint style
https://endpoint/bucket/object whenever vhost is enabled or not for a
given alias.
Co-authored-by: Anis Elleuch <anis@min.io>
Currently, when mirror is not able to copy an object (e.g. corrupted)
and watch is specified, mirror will restart mirroring again to stop
again at the same problematic object.
Co-authored-by: Anis Elleuch <anis@min.io>
Do no miss sending object/version to contentCh when there is deletion
result available.
This commit fixes issues seen when some objects/versions are not deleted
when --no-current is passed.
Co-authored-by: Anis Elleuch <anis@min.io>
Earlier commit #8eae2e3bbfafe952ecb33904c0d9073871a32169 reverted
this behavior, bringing it back
Co-authored-by: Poorna Krishnamoorthy <poorna@minio.io>
This PR also changes the interpretation of --non-current flag to delete
all non current versions that qualify irrespective of whether top level
version is a delete marker.
Co-authored-by: Poorna Krishnamoorthy <poorna@minio.io>
automatic prompt for certs broke system trusted tls endpoints
since it ignored the currently loaded certs as trusted.
if they are available and we can establish TLS we should
proceed instead of failing and asking users to always use
`--insecure`
--insecure does not have an effect when running mc in a non-terminal. This
commit fixes the behavior by ignoring the prompt from trusting self
signed certificate when --insecure is passed as well.
This commit adds an extension to the `alias set`
command. When adding an alias fails due to a TLS
trust error - i.e. remote peer certificate verification
fails - `mc` fetches the remote peer certificate,
computes the public key fingerprint and asks the user
to confirm the fingerprint.
When the user confirms the fingerprint, the certificate
is added to the `CAs` directory.
This allows users to use a TOFU authentication with
self-signed certificates - similar to SSH.
Signed-off-by: Andreas Auernhammer <hi@aead.dev>
A recent commit changed the behavior of client-s3.GetObjectLockConfig()
without properly checking the behavior of the callers introducing a bug
during mv command where the target is an S3 server.
Add some tests for the mc mv command as well.