currently STS specific behavior is global,
`mc` however supports multiple aliases - we
need to make sure that `mc` treats this ENV
specific to an alias.
Also adds option to check if the cluster has enough read quorum and if
the cluster is taken down for any maintenance.
Uses madmin.AnonymousClient for invoking the requests
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>
- reach subnet, upon failure provide `--airgap` command line
to allow them to upload report manually.
- use a proper httpClient when reaching out to subnet
with a 10sec timeout, and also support custom proxies
with self signed certs.
- also fix some error messages and cleanup help with correct
wording and grammar.
Add an optional text flag `license` to the `subnet health`
command. If this flag is passed, upload the generated health report to
Subnet by passing the license key as auth.
```
mc alias set
alias remove
alias list
```
are new commands that replace mc config host sub-commands.
mc config host will still be available but hidden for backward
compatiblity. The JSON output is also kept if the user is running mc
config host command.
Remove Insufficient permission error from ignored list of errors.
Fixes#2752 - When mirror fails due to insufficient
permissions of user on a bucket, this should be
displayed
Previously OlderThan and NewerThan was configured for day
which has been changed to Days, Hours and minutes.
Also, changed the `flag` in `find` command to be `newer-than` and `older-than` to be consistent with other commands.
As unix cp command complains when you copy a directory into itself,
(such as `cp -r ~/Desktop/ ~/Desktop/sub/`), mc will follow the
same behavior with this commit.
The main reason is that copy or mirror command can be unpredictable
with the style of copy.
Example:
```
$ mc ls -r myminio/testbucket/
[2018-09-25 19:28:17 CET] 8B dir/object
[2018-09-25 19:28:40 CET] 8B object
$ mc -q cp -r myminio/testbucket/ myminio/testbucket/dir/
`myminio/testbucket/dir/object` -> `myminio/testbucket/dir/dir/object`
`myminio/testbucket/object` -> `myminio/testbucket/dir/object`
```
We can notice that `myminio/testbucket/dir/object` is both source and target
in the copy operation. The last copy operation that will occur will rule the
result of the total copy operation and `myminio/testbucket/dir/dir/object`
will have a different content in each copy operation.
Due to the unpredictability mentionned above, we will disallow copying or
mirroring a folder into itself.
newRandomID() func may return string with uppercase letters. Such
strings will make invalid bucket name as S3 doesn't allow
uppercase lettes in bucket names.
randString() always returns strings with lowercase letters or
numbers.
Fixes#2496