Commit Graph
319 Commits
Author SHA1 Message Date
Anis Elleuch a5ea937df2 mirror: Fix double printing of remove object msg (#2639)
Mirror code depends on rm code which naturally prints delete messages,
this PR will make mirror uses its own delete code since it is simple
enough to do.

Also add size information to remove message
2019-01-24 07:13:46 -08:00
kannappanr 539cd245d6 ls: Add Stat call to determine bucket/directory (#2656) 2019-01-23 17:17:35 -08:00
Harshavardhana ede0911de2 Support parquet select implementation (#2643) 2019-01-22 11:13:58 -08:00
Harshavardhana 733d3c5d54 Avoid making Stat calls on listing (#2650) 2019-01-22 16:02:56 +05:30
Harshavardhana 0854af6e6d Migrate to mitchellh/go-homedir from minio/go-homedir (#2641)
We don't use this fork of ours anymore and we don't need
to maintain it anymore as we haven't made any significant
changes to upstream code or fixed bugs.
2019-01-08 00:23:51 -08:00
Harshavardhana d8d3a3dec1 Remove incorrect OutputSerialization 2019-01-07 03:08:41 -08:00
Harshavardhana 59ef9fe468 Support SSE without keys (#2626) 2019-01-04 11:56:43 -08:00
Harshavardhana bda754d07f Migrate to go1.11.4 for CI builds (#2634) 2018-12-28 16:47:22 -08:00
Anis Elleuch 124b9fa4d9 Avoid remove freeze when server returns an error (#2631)
Minio can return during deletion sometimes, like missing quorum,
but mc can block in that case. The reason is that Remove() in
client-s3 doesn't actively listen for errors reported by minio-go
RemoveObjects() API  because that would also block this latter.
2018-12-27 17:38:17 -08:00
Harshavardhana 45578f0ed2 Implement head command (#2630) 2018-12-27 13:17:44 -08:00
Praveen raj Mani 4e7eeb0725 Ignore broken symlink durring mirror (#2607)
Fixes #2604
2018-12-21 13:38:12 -08:00
KnutAtteslander f0309e33e1 Fix typo in admin-user-add.go (#2629) 2018-12-20 06:56:50 -08:00
Anis Elleuch 8964876217 error msgs: Add punctuations when needed (#2628)
This commit will automatically add ':' or '.' after scanning
the generic and the detail error messages. This will simplify
maintaining error messages.
2018-12-18 23:18:28 -08:00
Praveen raj Mani 69f967b3f3 mc mirror should not stop incase of errors (#2624)
Fixes #2623
2018-12-12 10:48:48 -08:00
Harshavardhana 2073642656 Allow copying file onto itself (#2617)
This allows encrypting an unencrypted file
using server side CopyObject API.
2018-12-06 10:18:16 -08:00
Harshavardhana f3eaa54a32 Breaking change --config-folder is now --config-dir (#2620) 2018-12-05 14:10:36 -08:00
Harshavardhana 5117f74fce Allow empty objects to be uploaded (#2613) 2018-11-28 17:14:07 +05:30
Harshavardhana 57414cbb6e Add in-place update feature (#2605) 2018-11-26 20:04:55 +05:30
Harshavardhana 24d4c28aa9 Pass query down on all objects when recursive (#2603) 2018-11-20 08:45:01 +05:30
Harshavardhana cb4f46854b Fix command line names and documentation (#2602) 2018-11-19 17:19:53 -08:00
Harshavardhana 0992c3a50d Fallback detecting filetype from magic numbers (#2598) 2018-11-16 07:45:46 -08:00
Zachary Zhao c5eaa30253 Change USERNAME to ACCESSKEY and PASSWORD to SECRETKEY (#2594)
Since `ACCESSKEY/SECRETKEY` is common knowledge for S3 user,
we should make it clear to avoid confusing people.
2018-11-13 18:19:00 -08:00
kannappanr 2fc5413002 Fix: Remove local file during a mirror operation (#2593)
Fixes #2586
2018-11-09 13:31:15 -08:00
Kale Blankenship 8137e79d0c Close readers returned by Client.Get (#2595)
Change Client.Get to return an io.ReadCloser instead of io.Reader
so that it can be closed.
2018-11-08 17:02:14 -08:00
Harshavardhana b827fac635 Fix help message usage for some commands (#2591) 2018-11-05 10:37:33 -08:00
Harshavardhana 4479667d4c Allow resuming and stopping an active heal operation (#2584) 2018-11-04 19:25:14 -08:00
Harshavardhana 9226796558 Fix a typo in config set success message (#2588) 2018-11-01 16:46:44 +05:30
Harshavardhana 6ca902d13a Add additional error message in heal (#2583) 2018-10-27 02:53:24 -07:00
kannappanr 73a61b4203 Parse alias set via env variable while prsing encryption key (#2581)
Check MC_HOSTS_ env variable also while looking for the alias to set encryption key
Fixes #2580
2018-10-26 12:51:57 -07:00
Harshavardhana eab117c07c Allow access key minimum to be 3 characters (#2579) 2018-10-25 19:21:52 +05:30
Harshavardhana 7b69f0064d Add 'mc admin restart' message (#2574) 2018-10-18 17:46:20 -07:00
Anis Elleuch 0dd32c1b26 Add admin profiling command (#2557)
Implement profiling command to start & download profiling data of
a standalone or all nodes of a cluster.

```
1. Start CPU profiling
   $ mc admin profiling start --type "cpu" myminio/

2. Download latest profiling data under save under profiling.zip
   $ mc admin profiling stop myminio/
```
2018-10-17 17:06:12 -07:00
Harshavardhana c707a17f30 Add 'users policy' command(#2573) 2018-10-17 15:21:11 -07:00
Harshavardhana b7e87b623d Add admin users (#2554) 2018-10-16 14:54:25 -07:00
Praveen raj Mani 449cad0eb8 Migrate from "mime" to "github.com/minio/minio/pkg/mimedb" (#2563)
The content-type resolutions are standardized across platforms.

Fixes #2559
2018-10-02 17:17:44 -07:00
Harshavardhana 7260b0f9ea Ignore errors during mirror (#2562)
S3 lists 1000 objects in batches, but once this batch is being
processed to be copied over there is no way to lock across the
entire batch for mirroring. Due to this we introduce a scenario
when objects might have been deleted in parallel from another
application.

In such a scenario simply ignore such objects and proceed to
copy other files.

Fixes #2537
2018-10-01 15:33:18 +05:30
Harshavardhana a83ffe321c Implement select command (#2538) 2018-09-30 23:18:33 -07:00
Anis Elleuch 87f7e65c4c Disallow copying/mirroring a folder into itself (#2553)
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.
2018-09-25 17:34:40 -07:00
Praveen raj Mani ab31cf97da Remove extraneous bucket on target while mirroring (#2550)
Fixes  #2527
2018-09-25 10:20:14 -07:00
Praveen raj Mani b2d2e09105 mc heal and mc mirror should respond with proper exit code (#2543)
respond with os.exit(0) incase of errors

Fixes #2534 #2474
2018-09-20 15:23:40 -07:00
kannappanr c9f33698fc Display the config in correct format when json flag is used (#2544)
Fixes #2530
2018-09-19 11:48:21 -07:00
kannappanr c352cadd4b Display restart failures in admin service restart command (#2533)
Fixes #2532
2018-09-10 16:23:17 -07:00
Harshavardhana 12627c35e4 Fix parallel upload performance issues (#2521)
Tested by transferring 29GiB data, around 246569 files
over 100Gig network.

- master branch
```
time mc mirror /root myminio/testbucket/
real	2m10s
```

- after changes
```
time mc mirror /root myminio/testbucket/
real	1m2s
```

By default runtime.NumCPU() workers are started.
2018-08-30 22:31:08 +05:30
poornas 1d5870b2a2 Fix url parsing of MC_HOSTS_ env variable (#2523) 2018-08-30 22:22:53 +05:30
Harshavardhana bc756e3dbd Fix cp crash when resuming from session (#2520)
We should make sure to handle errors properly
when reading from the session and also parsing.

Current master ignores all these situations
which leads to crash, this PR handles this to avoid
nil pointer crashes.
2018-08-27 12:03:40 -07:00
Aarushi Arya bc679788ac mirror watch: Exit on error while copying. (#2511)
mirror: exit, if copy error occurs while watching.

Fixes #2505
2018-08-23 15:58:14 -07:00
Harshavardhana 073ed250fe Update madmin API with latest server changes (#2516) 2018-08-17 18:55:05 -07:00
Harshavardhana 3b78c115f6 Remove workaround for http response tracer (#2514) 2018-08-17 17:15:03 -07:00
Harshavardhana 26f5102eae Remove/deprecate admin lock commands (#2503) 2018-08-06 12:59:13 -07:00
Ashish Kumar Sinha 9998e077df Remove error statement in mc mirror (#2500)
mc mirror complains about extra file in destination,
but this is not an error so removed the error message.

Fixes: #2470
2018-08-02 22:45:54 +05:30