Commit Graph
866 Commits
Author SHA1 Message Date
Shireesh Anjal e45d648ce9 Rename --offline flag to --airgap (#3837)
Retain `--offline` as hidden for backward compatibility (won't show up
in help)
2021-10-18 09:49:52 -07:00
Harshavardhana ae271e7645 add new linters and fix unnecessary type conversions (#3835) 2021-10-14 15:33:31 -07:00
Klaus Post 0eef0174a7 inspect: Save data unencrypted by default (#3832)
By default decrypt the data. Add `--encrypt`.
2021-10-12 11:49:49 -07:00
Ori Hoch 6047ef858a fixes minio/mc#3830 servers without lock returns locking disabled (#3831) 2021-10-11 14:26:23 -07:00
Shireesh Anjal e4d4bf6641 Add register sub-command to mc admin subnet (#3808)
By default, it will run in `online` mode and try to register the cluster
on subnet. If the subnet license is not available in minio/mc config, it
will

- ask the user for login credentials
- use the credentials for authentication and call the registration api
- get the license from response of the api and store it in config
- use the stored license for any subsequent calls

In case the user belongs to multiple organizations in subnet, they will
be prompted to choose the appropriate organization from the list.

If the client machine is in an airgapped environment, user can choose to
use the `--offline` flag when running the command. In this case, it will

- generate and print the registration token
- ask the user to paste it in the subnet registration screen
- accept the license generated by subnet and store it in config

As part of this work, the `health` sub-command is also enhanced to:
- run in `online` mode by default, which tries to upload the health
report to subnet. Here the user will be prompted for subnet credentials
(if license not available in config) _before_ generating the health
report as it is a long running process.
- support a new flag `--offline` which can be used when subnet is not
reachable. When used, the health report will be generated in a local
json.gz file, which can then be uploaded on subnet.

The examples in help text of both the sub-commands are enhanced to list
multiple use cases.

When saving license to config, first preference is given to minio
config. If the minio server supports the `subnet license` key, the
license will be stored here. In case it is an older version of minio
that doesn't support this key, then the license will be stored in mc
host config.
2021-10-07 11:20:28 -07:00
Aditya Manthramurthy 198bca9cdf Add new admin replicate subcommand (#3810)
This change adds support for enabling site replication
2021-10-06 16:57:01 -07:00
Krishnan Parthasarathi 054cfa0103 ilm-edit: Accept zero days for transition (#3824) 2021-10-06 13:34:41 -07:00
Anis Elleuch 6b329ce01f rb: Fix side wide removal of an alias (#3796)
* rb: Fix side wide removal of an alias

rb --force --dangerous should remove all buckets under an alias. This
PR fixes a recent regression.
2021-10-06 09:56:57 -07:00
Harshavardhana 44a597a9f9 allow removal of replica/ilm event-types (#3823) 2021-10-06 09:24:12 -07:00
Shireesh Anjal 55c6a1fccc fix: incorrect spinner for network perf test (#3813)
In case of non-distributed setup, the server doesn't return network perf
data. Because of this, the network spinner doesn't finish, and is closed
explicitly outside the loop, resulting two lines (one incomplete, one
complete) for it.

Fixed by explicitly checking the number of servers when checking for
completion of the network spinner.
2021-10-05 17:00:41 -07:00
Anis Elleuch 026cfa16c5 admin info: Show 'OK' in yellow when offline networks/disks (#3814)
In mc admin info output, it is better to show 'OK' status in yellow and
not in green when there is a failed disk or a failed network link so it
is easier for users to detect something wrong.
2021-10-05 17:00:27 -07:00
Krishnan Parthasarathi 924df70b33 Add support for immediate tiering (#3816) 2021-10-04 12:19:48 -07:00
Shireesh Anjal 6c41669342 health: perform only lightweight tests by default (#3820)
Perform only lightweight tests by default, and include the long running
tests only if specified through a `--full` flag in the `admin subnet
health` command.
2021-10-04 09:03:19 -07:00
Anis Elleuch 1aa0f47736 ilm: Correctly show tags in tabular info when this non AND tag (#3819)
Tag can be set directly under Filter tag and not always under
Filter.And in the lifecycle document. In that case, the tag won't be
properly showed in the tabular info of the ILM listing. This PR fixes
it.
2021-10-01 11:59:15 -07:00
Klaus Post bc69976481 Remove unused Transport option. (#3818) 2021-10-01 11:41:34 -07:00
Klaus Post 7e6f46fba6 Bump CI Go versions (#3811)
* Bump CI Go versions
* Fix changed fmt.
* Only check vet on one version.
* Bump minimum go version in go.mod
* Add Darwin test.

Replaces #3807
2021-09-28 09:19:52 -07:00
Anis Elleuch 1bcd5df300 Add ilm restore command (#3790) 2021-09-24 09:32:39 -07:00
Krishnan Parthasarathi 368b4106d7 Disallow updating azure tier account-name (#3805) 2021-09-23 10:57:39 -07:00
Anis Elleuch 445414dc0c svcacct: Colorize svcacct output (#3806) 2021-09-23 10:01:37 -07:00
Anis Elleuch fa0aa1e45f heal: More verbose information (#3795)
heal info now shows the list of all MinIO nodes and the status of disks,
OK, unformatted, healing with an estimation of the time of healing
completion. It also shows the tolerance of nodes/disks, meaning how many
nodes or disks we can turn off before losing read operation in the
cluster.
2021-09-22 14:39:59 -07:00
ebozduman 5a8f677304 Windows support for copying local files to object storage (#3666) 2021-09-22 14:38:56 -07:00
Anis Elleuch 4e4c912b37 Order mc admin info output by endpoint (#3804)
To make easy for users to navigate through the list of servers.
2021-09-21 09:08:28 -07:00
Ashish Kumar Sinhaandsinhaashish a8bf2a463b Add global flags to edit tier command (#3802)
Co-authored-by: sinhaashish <ashish@minio.com>
2021-09-17 07:09:00 -07:00
Krishna Srinivas e576844f0f Erase the spinner on speedtest completion (#3800) 2021-09-16 17:25:17 -07:00
Krishna Srinivas d7bc62efa6 Show spinner during speedtest (#3799) 2021-09-16 15:39:12 -07:00
Harshavardhana 1f997000a3 trace: multiple values for headers are ',' separated (#3798) 2021-09-16 08:55:08 -07:00
Ashish Kumar Sinha 1f2429c336 validation for namespace removal (#3783) 2021-09-15 11:34:41 -07:00
Poorna Krishnamoorthy 6bf64d9704 Add multisite replication support in mc replicate cmd (#3766)
Also adding a flag to `mc replicate reset` to allow 
granular replication reset by target
2021-09-15 10:32:28 -07:00
Krishna Srinivas 24456eb990 Support speedtest autotuning on the server side (#3777) 2021-09-14 23:29:49 -07:00
Shireesh Anjal 56b22c37fc fix: subnet health spinners not working properly (#3788)
The "admin info" step was moved from being the first step to the last
step in minio at some point, but the sequence of spinners in mc was not
updated with this change. Because of this, the first spinner itself used
to get stuck for the whole duration of report generation.

Fixed by correcting the sequence of spinners to make them in sync with
the processing in minio.

Signed-off-by: Shireesh Anjal <shireesh@minio.io>
2021-09-08 08:01:55 -07:00
Kaan Kabalak 4e56329bae Replace 'none' in 'mc anonymous get/set' with 'private' (#3792)
This commit replaces the 'none' policy with 'private' for the
'mc anonymous get/set' command without breaking 
backward compatibility
2021-09-07 19:10:13 -07:00
Anis Elleuch 7f37854b02 parallel-manager: Reduce parallelism when there is not enough memory (#3629)
Some users with low memory and good connection uploading some big files
can see memory crash, since mc will increase upload parallelism over
time when the bandwidth and the server is able to carry the load.

This PR will check the free OS memory before starting mirror/cp and will
estimate current memory usage based on uploaded objects sizes, it will
stop parallelism until the memory gets some room.
2021-09-01 09:07:26 -07:00
Shireesh Anjal ef90b8b3dd Add sys services and config spinner in subnet health (#3772)
Signed-off-by: Shireesh Anjal <shireesh@minio.io>
2021-08-31 11:17:58 -07:00
Anis Elleuch 0667914d16 rb: --force flag forces bucket removal after BucketNotEmpty err (#3780)
Some users struggle to remove a bucket when they don't use recommended
setups, such as NFS disks.

This command will force bucket removal in server side, using
x-minio-force-delete during DELETE bucket call.
2021-08-23 07:10:41 -07:00
Harshavardhana c19d58bb88 add 'mc update' progress bar support (#3782) 2021-08-21 21:01:31 -07:00
Anis ElleuchandAnis Elleuch a88acb58d4 fix: Avoid crash when asking for no existing transition/expiry info (#3771)
mc ilm ls has --expiry and --transition to show for only expiry or
transition information, but if one of them doesn't exist, mc crashes.
The PR fixes this.

Co-authored-by: Anis Elleuch <anis@min.io>
2021-08-17 14:11:09 -07:00
Harshavardhana 43b03a8532 support 'mc rm --non-current' to delete non-current objects (#3768) 2021-08-10 18:29:22 -07:00
Klaus Post b3ce21fb72 Add mc admin inspect (#3754)
Add function to download data from server with admin privileges.

For https://github.com/minio/minio/pull/12635
2021-08-06 06:42:23 -07:00
Shireesh Anjal 539a6b5654 Add sys errors spinner in subnet health output (#3760)
The subnet health report generation now includes collection of system
errors. So add a spinner for this step too in the screen output of the
command.

Signed-off-by: Shireesh Anjal <shireesh@minio.io>
2021-08-05 22:30:19 -07:00
Krishna Srinivas bc5835e680 feat: admin speedtest implementation (#3759) 2021-07-29 18:18:58 -07:00
Harshavardhana 4af8b2d20b do not prematurely default multipart to 16MiB 2021-07-27 08:42:07 -07:00
Harshavardhana addaf66de8 fix: do not prematurely error out during Heal() (#3762) 2021-07-26 08:01:59 -07:00
Harshavardhana c3ab68ed1e allow configuring multipart size for testing (#3761)
add MC_UPLOAD_MULTIPART_SIZE, MC_UPLOAD_MULTIPART_THREADS
to test in situations when default values are not enough
for showing proper bandwidth usage.
2021-07-23 09:21:59 -07:00
Harshavardhana 7dafdaf88e rename policy to anonymous command (#3755)
although keep `policy` command hidden
for backward compatibility.
2021-07-19 08:49:28 -07:00
Harshavardhana c319567430 do not print config values in base64 (#3757)
fixes #3696
2021-07-19 08:29:20 -07:00
Anis Elleuch bfafb96632 heal: Refactor info output (#3730)
mc admin heal <alias> will show simplifed output which aggregates MRF &
new disks healing.

e.g.:

```
$ mc admin heal myminio/
Objects Healed: 7/27 (25.9%), 31 MB/110 MB (0%)
Heal rate: 3 obj/s, 10 MB/s
Estimated Completion: 11 seconds

```
2021-07-16 09:51:00 -07:00
Emir İşman 05ec684549 deps: update jwt-go dependency (#3756) 2021-07-10 13:37:58 -07:00
Shireesh Anjal db1b1bd811 fix: health report incompatibility with old minio (#3751)
When the subnet health command from current mc is used with the MinIO
versions before the latest health data structure changes (v2) were
introduced, the generated report doesn't contain the cluster information
(minio -> info).

This is because these old versions of minio don't return this
information in the output of the `healthinfo` api.

Fixed this by explicitly pulling the server info separately when we
detect that the health schema version is not v2.
2021-07-01 10:04:08 -07:00
Klaus Post a1ba511f16 trace: Display times in local timezone (#3750)
Make sure times are converted to local time zone.
2021-06-29 08:48:12 -07:00
Poorna Krishnamoorthy 2c52cdf27c Add flag to mc replicate for existing object replication (#3698)
This allows triggering a resyncing of previously
replicated objects when existing object replication is
enabled. It is useful in scenarios where replication target
is entirely lost and content needs to be replicated again.
2021-06-12 18:02:25 -07:00