Commit Graph
1082 Commits
Author SHA1 Message Date
Anis Elleuch d43c25ffa3 restart: Use health check instead of service info API (#4190)
`mc admin service restart` currently uses ServerInfo() API which is costly.
2022-08-08 09:32:27 -07:00
Shireesh Anjal de706ef096 Fix example description for mc support perf (#4193)
The current description seems incomplete as it doesn't mention object
storage performance.
2022-08-08 08:35:51 -07:00
Harshavardhana 7838be4a7f apply --status-code only for HTTP traces if present (#4189)
fixes #4188
2022-08-08 08:33:23 -07:00
Ashish Kumar Sinha 63d0e213c3 update ping command with new terminal UI (#4163) 2022-08-08 00:04:14 -07:00
Harshavardhana 6cee296d04 rename Remove -> Removed in 'mc rm' (#4187) 2022-08-05 21:54:56 -07:00
Taran Pelkey 1381bf2168 Update examples for admin-config-reset (#4160) 2022-08-05 20:29:15 -07:00
Poorna 351d021b92 Change ui for admin cluster bucket import (#4184)
Report on all errors encountered during import
2022-08-05 01:01:28 -07:00
Anis Elleuch 4e42a9e3eb rb: Better error message when the user passes an object name (#4183)
The new error message is:
```
$ mc rb --force play/testbucket/dir/
mc: <ERROR> Failed to remove `play/testbucket/dir/`. Bucket name `testbucket/dir/` not valid.
```
2022-08-03 08:43:41 -07:00
Anis ElleuchandAnis Elleuch 554905ac46 rm: Fix successful message for operations on the filesystem (#4182)
Names of the removed files when mc operatres on the filesystem are
not shown properly. The code is splitting the removed path into bucket
and prefix which doesn't make sense for filesystem.

The commit will just send the path of the removed object.

Co-authored-by: Anis Elleuch <anis@min.io>
2022-08-03 08:33:04 -07:00
Harshavardhana cf428f1188 support in-place rewrite of objects in heal and convert the format (#4175) 2022-08-03 05:46:31 -07:00
Harshavardhana 69c0129cc7 remove sysinfo from errorIf with globalDebug (#4178)
remove sysinfo from errorIf without globalDebug

Bonus remove unused error BucketNameTopLevel and
fixes #4177
2022-08-02 17:00:08 -07:00
Ashish Kumar Sinha 16ff57a0ef add errors to admin top api command (#4176) 2022-08-01 12:43:32 -07:00
Shireesh Anjal edd633ff2f Save api key passed as argument in config (#4157)
When the account api key is passed to `mc license register` via the
`--api-key` flag and after the registration is successful, save it to
minio config, so that it can be used automatically in subsequent calls.

Also stop extracting and storing api key from the response of SUBNET
register api.
2022-07-31 22:44:23 -07:00
dorman 37a83f23f0 change rm color on the terminal (#4171)
fixes #4165
2022-07-29 12:17:16 -07:00
dorman 11d3bace31 rm: add fake message with --fake (#4170)
fixes #4166
2022-07-29 11:03:24 -07:00
Anis Elleuch 624e3c1606 Remove isURLPrefixExists() call (#4173)
isURLPrefixExists() is used after url2Stat() function to check if the
given aliased URL corresponds to an existing prefix in the server. However,
 url2Stat() is already doing that and returns valid information for
those prefixes.

Removing isURLPrefixExists() all together.
2022-07-29 10:43:20 -07:00
Shireesh Anjal a80947bfe8 Validate license against deployment id (#4161)
The command `mc license update` should error out in case the deployment
id from the license doesn't match the cluster.
2022-07-28 08:37:47 -07:00
Harshavardhana c7570bd54a introduce net.Conn deadlines to avoid hung connections (#4164)
fixes #4133
2022-07-27 08:21:05 -07:00
Shireesh Anjal 9de421ffd4 New offline registration flow (#4156)
Instead of asking the user to

- open the subnet register page
- paste the registered token
- copy the generated license token
- paste it back on mc

Now we will simply ask the user to visit a subnet URL (which contains
the registration token as a query parameter). On visiting this page,
subnet will automatically register the cluster and generate a license
for it.

User can then optionally update the license on mc using 
the `mc license update` command
2022-07-26 23:21:06 -07:00
Anis Elleuch c32a438045 Add admin bucket info command (#4109)
Print bucket usage and configuration (encryption, policy, ILM, etc..)
2022-07-25 10:42:12 -07:00
Poorna 015134b2b7 Add mc replicate diff cmd to show unreplicated objects (#4127) 2022-07-23 19:25:13 -07:00
Anis Elleuch 657b6315fc support perf to execute all speed tests (#4158)
This commit will make `mc support perf <alias>` to execute all
performance tests, networking, drive and object speed tests.

perf will only have --duration and --verbose flags.

The user can still test with 'drive', 'object', and 'net' but they will
be hidden for now along with their flags.
2022-07-23 18:58:57 -07:00
Harshavardhana 95e6947f9c remove sysinfo from --json mode without --debug (#4159) 2022-07-23 18:57:57 -07:00
Taran Pelkey 537ad9468a Add support for NewerNoncurrentVersions (#4153) 2022-07-22 15:29:30 -07:00
Anis Elleuch 1c1ee7a5a4 info: Show pools summary of a erasure cluster (#4162)
Also fix the assumption that each node has one pool, so print all pools
indexes that belong to a particular node
2022-07-21 07:30:50 -07:00
Klaus Post cb7f9b6db2 Add mc cat --tail and --offset (#4149)
Allow range requests for cat operations, either specifying tail or an absolute offset.

If tail is longer then fail, the entire file is listed.
2022-07-18 21:22:10 -07:00
Shireesh Anjal 603857371c Add license update command (#4155) 2022-07-18 18:54:45 -07:00
Klaus Post 48e9183957 Move mc admin top scanner -> mc admin scanner info (#4151)
Also, add `mc admin scanner trace` which gives a simplified trace 
with only relevant options.
2022-07-15 02:20:55 -07:00
Harshavardhana 288e8e3678 update madmin-go to v1.4.5 (#4154) 2022-07-13 22:22:35 -07:00
Shireesh Anjal 7b20dc2958 Move support register to license register (#4150)
Also, introduce a new command `license info` to print information 
from the license (when the license is available)
2022-07-13 18:25:30 -07:00
Ashish Kumar Sinha add7b7b881 add mc ping command (#4074) 2022-07-11 09:16:12 -07:00
Krishnan Parthasarathi 11771955b3 fix: tier-add help (#4148) 2022-07-08 08:47:12 -07:00
Shireesh Anjal 81c4a5ad6e Add --api-key flag to mc support register (#4144) 2022-07-06 07:54:36 -07:00
Aditya Manthramurthy 811d7e5edb Add commands to manage external IDPs (#4131)
This adds the set, info, ls and rm commands
2022-07-05 18:19:13 -07:00
Harshavardhana 58860ccb15 reset timer after the function body is finished (#4143)
reset timer after the function body is finished

this is needed to make sure to wait "expected" amount
of time, otherwise the timer has already fired (negating
the wait of your function body)
2022-07-02 08:45:00 -07:00
Klaus Post 82a6c4f20f Add admin top scanner & trace --call=scanner (#4130)
mc: Add admin top scanner & trace --call=scanner

Examples:
```
λ mc admin top scanner myminio
Scanner Activity: ●∙∙
+-------------------------------------------------------------------------------------------------------+
| Last full scan time:   0d0h5m; Estimated 7358.44/month                                                |
| Current cycle:         129439; Started: 2022-06-22 18:01:50.5775259 +0200 CEST                        |
| Active disks:          1                                                                              |
| -------------------------------------- Last Minute Statistics --------------------------------------- |
| Objects Scanned:       101 objects; Avg: 3.775ms; Rate: 145440/day                                    |
| Versions Scanned:      10001 versions; Avg: 31.998µs; Rate: 14401440/day                              |
| Versions Heal Checked: 200 versions; Avg: 1.394ms; Rate: 288000/day                                   |
| Read Metadata:         101 objects; Avg: 0ms                                                          |
| ILM checks:            10001 versions; Avg: 408ns                                                     |
| Check Replication:     10001 versions; Avg: 3.646µs                                                   |
| Verify Deleted:        0 folders; Avg: 0ms                                                            |
| Yield:                 59.083s total; Avg: 584.978ms/obj                                              |
| ------------------------------------- Currently Scanning Paths -------------------------------------- |
| 127.0.0.1:9002/d:/data/distxl-plain/s2/d1/warp-benchmark-bucket/qwrShN3c/405.M(nsCrNI(PZhkAqA.rnd     |
+-------------------------------------------------------------------------------------------------------+
```

```
λ mc admin trace --call=scanner myminio
2022-06-22T18:04:12.705 [SCANNER] scanner.ScanFolder 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 warp-benchmark-bucket/ajJkH6Ic/2425.mLeCC9gkg)7aQxfJ.rnd 15.2171467s
2022-06-22T18:04:28.022 [SCANNER] scanner.ScanObject 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 ajJkH6Ic/304.SAWTkh9)WJrnZF7l.rnd/xl.meta 1.0691ms
2022-06-22T18:04:27.922 [SCANNER] scanner.ScanFolder 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 warp-benchmark-bucket/ajJkH6Ic/304.SAWTkh9)WJrnZF7l.rnd 209.3969ms
2022-06-22T18:04:28.232 [SCANNER] scanner.ScanObject 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 ajJkH6Ic/405.(kO1pyUPMdhsaXev.rnd/xl.meta 1.0531ms
2022-06-22T18:04:28.131 [SCANNER] scanner.ScanFolder 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 warp-benchmark-bucket/ajJkH6Ic/405.(kO1pyUPMdhsaXev.rnd 207.7757ms
2022-06-22T18:04:28.440 [SCANNER] scanner.ScanObject 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 ajJkH6Ic/506.E726EiB(GNLfSLro.rnd/xl.meta 1.0317ms
...
```
2022-07-01 16:04:04 -07:00
Praveen raj Mani c29c4a38a6 Implement mc ready to check if the cluster is ready or not (#4101)
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
2022-07-01 12:02:25 -07:00
Shireesh Anjal 5afc2bdfad Add support status command (#4140)
Will print following information:

- Is the cluster registered
- Is pushing logs to SUBNET enabled
- Is pushing callhome info to SUBNET enabled
2022-07-01 11:20:35 -07:00
Eng Zer Jun 264d21c65a refactor: replace strings.Replace with strings.ReplaceAll (#4135)
strings.ReplaceAll(s, old, new) is a wrapper function for
strings.Replace(s, old, new, -1). But strings.ReplaceAll is more
readable and removes the hardcoded -1.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-06-27 03:59:09 -07:00
Ashish Kumar Sinha 40ee1a4ed6 change admin console to support logs show (#4132) 2022-06-26 11:51:48 -07:00
Poorna b1d8ca83f2 admin: add admin cluster iam import/export cmd (#4102) 2022-06-26 11:36:48 -07:00
Shireesh Anjal 78f844a357 Save license at the time of registration (#4123)
Currently we only extract the `api_key` from SUBNET's registration api
response and store it in the minio subnet config. The response contains
license also, and it can be useful in getting information about the
subscription. So this PR enhances the register command to extract and
store the license also.
2022-06-26 11:35:31 -07:00
Harshavardhana 17f5b7b11c add further license banners in default 'help' output (#4129) 2022-06-22 09:41:02 -07:00
Anis Elleuch 0e44ad30db Update version printing to include more information (#4125)
Show licence, copyright header and platform in addition to mc version.
2022-06-16 13:17:03 -07:00
Harshavardhana fc1d65b6e8 filter out hidden flags from error printing (#4122) 2022-06-16 09:45:16 -07:00
Anis Elleuch b0e8574969 Healing finish estimation time relies on disk usage space (#4124)
Do not rely on the disk scanner's total object numbers.

Also, remove healing MRF from the calculation for simplicity.
2022-06-16 09:43:53 -07:00
Harshavardhana a9a7b7a225 fix: help output formatting for cluster bucket export/import 2022-06-15 13:34:24 -07:00
Harshavardhana ce9e444740 add unfreeze command to 'unfreeze' S3 API calls (#4121) 2022-06-15 13:29:14 -07:00
Shireesh Anjal 80ae287b02 Add commands to enable/disable callhome and logs (#4107)
- Remove the get/set options under `callhome`
- Move logs settings to a separate command (`mc support logs`)
- Provide toggle options (`enable, disable, status`) for both the
commands

In case of logs (`mc support logs enable|disable|status`),

`enable` configures minio to push logs to SUBNET in real-time by
configuring the webhook `logger_webhook:subnet`
`disable` disables the webhook
`status` displays whether it is enabled or disabled

In the case of call home (`mc support callhome enable|disable|status`),

`enable` configures minio to automatically push callhome info to SUBNET
every 24hrs by setting the config `callhome enable=on`
`disable` disables callhome by setting `enable=off`
`status` displays whether it is enabled or disabled
2022-06-15 09:14:52 -07:00
Harshavardhana 127d84854d improve UI for driveperf inspired from object perf test (#4118) 2022-06-14 23:09:58 -07:00