Commit Graph
2957 Commits
Author SHA1 Message Date
Harshavardhana 67c1957eb0 cli/mb: make bucket takes multiple arguments. (#1745)
As an example

```
$ mc mb /tmp/bc{1..10}
```

It is convenient to have this when 'mc mb' is aliased
to 'mkdir' for everyday use.

Fixes #1743
2016-06-30 02:25:58 -07:00
Krishnan Parthasarathi 3d7796f38c Vendorize recent fixes to minio-go (#1744) 2016-06-29 17:49:09 -07:00
Harshavardhana 2d431dacbc ls/cp/mirror: Ignore objects with StorageClass GLACIER. (#1742)
Fixes #1741
2016-06-23 00:28:17 -07:00
Aakash Muttineni 17468c8863 Vendor update (#1739) 2016-06-14 22:44:33 +05:30
Anand Babu (AB) Periasamy 475670de7d Update play description. (#1735) RELEASE.2016-06-03T18-48-37Z 2016-05-30 22:51:44 -07:00
Aakash Muttineni f9efb67bc2 Minio-go vendor update (#1734) 2016-05-29 23:44:16 -07:00
Krishnan Parthasarathi 9766ff1805 Append trailing slash to targetURL only if absent (#1731) 2016-05-28 13:16:57 -07:00
Krishnan Parthasarathi cc4227e3f2 Made session list ignore broken sessions (#1728)
* Made session list ignore broken sessions

- `mc session list` - skips partial sessions[1]

- `mc session clear all` - doesn't clear partial sessions.
The idea is to prevent the user from clearing all sessions without
realising that there were partial sessions.

When there is one or more partial sessions, clear each one of them individually
as follows,
 `mc session clear <broken-session-id>` - clears the partial sessions.

[1] - partial session - a session with missing `.data` file in the sessions directory.

N B The presence of partial sessions indicate some underlying bug in session mangement
code. This PR provides relief for users in the event of such a bug.

* Added comments to session helper functions and to be provide context
2016-05-23 23:05:39 -07:00
Krishnan Parthasarathi ba2e8149c8 Ignore BucketEmpty error for top-level listing (#1727)
* Ignore BucketEmpty error for top-level listing

This is relevant in the case of non-fs backend like s3, play etc.

* Used ToGoError() to get Error interface from *probe.Error
2016-05-22 23:04:26 -07:00
Krishnan Parthasarathi b48371e971 Create only one custom transport for all S3 clients (#1722)
* Create only one custom transport for all S3 clients

Closes #1721

* Moved back to http.DefaultTransport

... because ResponseHeaderTimeout may fail `mc mirror` in slow networks
2016-05-21 02:07:18 -07:00
Anis Elleuch 8b074767db ls: list objects inside a directory when this latter is passed without a trailing separator (#1724) 2016-05-20 16:43:06 -07:00
Krishnan Parthasarathi e5bc26c75a Removed setting of http.Client Timeout for mc (#1720)
* Removed setting of http.Client Timeout for mc

Fixes #1719

* Moved mcDefaultTransport closer to use

* Set ResponseHeaderTimeout to 3 secs

* Vendored in changes from github.com/minio/minio-go

* Fixed CI build errors due to API changes, post vendoring

* Fixed unit tests w.r.t the change from insecure to secure in minio.NewV{2,4} API
2016-05-20 00:35:49 -07:00
Harshavardhana 959fa74ca5 profile: Add MC_PROFILER env supporting cpu, mem, block profiling. (#1714)
All profiled outputs are written inside `~/.mc/profile`
2016-05-10 19:10:59 -07:00
Krishna Srinivas ac57970229 Merge pull request #1711 from harshavardhana/signals
session: Signal trap shouldn't panic, close the Notify handler.
2016-05-10 12:39:42 +05:30
Harshavardhana 9fb8cfc1b3 session: Signal trap shouldn't panic, close the Notify handler.
Avoid executing Notify handler again when two SIGINTS are
received which can occur when 'mc' is busy copying a
largefile.

Fixes #1710
2016-05-10 00:05:18 -07:00
Harshavardhana 06ad6c53f7 debug: Tracing should print success response for PUT/POST ops. (#1708)
Due to a golang bug need to add specific code to handle this
properly when the response body has ContentLength of '0'

Ref for more info : https://github.com/golang/go/issues/13942.
2016-05-07 01:11:09 -07:00
Anis Elleuch a9b0b14149 Increase update url fetching timeout to 3 seconds (#1704) 2016-04-28 16:03:09 -07:00
Krishna Srinivas 9a454e714d Merge pull request #1702 from harshavardhana/mirror
mirror/cp: Skip NoSuckKey, NoSuchBucket errors properly in cp/mirror.
2016-04-28 14:40:01 +05:30
Harshavardhana 319b3d8434 mirror/cp: Skip NoSuckKey, NoSuchBucket errors properly in cp/mirror.
Fixes #1693
2016-04-27 20:37:42 -07:00
Harshavardhana 2fec2b4107 session: Close session only if fields have changed. (#1701)
Fixes #1700
2016-04-27 20:10:40 -07:00
Harshavardhana 382aa26859 vendorize: New changes in minio-go. (#1699)
- Fixes listing bug with done channel.
- Fixes retry go-routine leak.
- Adds more to the list of network errors to retry safely.
2016-04-25 01:20:15 -07:00
Anand Babu (AB) Periasamy d7854b6dfa Merge pull request #1698 from harshavardhana/access-msg
access: Change set access perm message.
2016-04-24 00:40:19 -07:00
Harshavardhana e3b6c12925 access: Change set access perm message. 2016-04-24 00:33:39 -07:00
Anand Babu (AB) Periasamy d9224348ce Merge pull request #1697 from harshavardhana/access-docs
access: update docs.
2016-04-23 16:23:44 -07:00
Harshavardhana 6b91c6f430 access: update docs. 2016-04-23 15:15:20 -07:00
Aaron Walker 7e9b96e354 cp/mirror use CopyObject API to enable server side copy (#1686)
Add Copy to s3 and fs methods/enable server side copy
2016-04-23 15:14:31 -07:00
Anand Babu (AB) Periasamy 8a8d4619de Merge pull request #1695 from harshavardhana/ignore
fs: Ignore file in recursive as well.
2016-04-22 01:31:01 -07:00
Harshavardhana 3af0902f28 fs: Ignore file in recursive as well. 2016-04-22 01:23:23 -07:00
Anand Babu (AB) Periasamy 6b4c1a4239 Merge pull request #1694 from harshavardhana/ls
ls: ls should ignore error BucketNameEmpty.
2016-04-21 18:15:12 -07:00
Harshavardhana 783d29794a ls: ls should ignore error BucketNameEmpty.
This is a valid case of 'ls', without this change.

```
$ mc ls localhost
mc: <ERROR> Unable to stat ‘localhost’. Bucket name cannot be empty.
```

What we need to ideally see is if server is not available is
```
$ mc ls localhost
mc: <ERROR> Unable to list folder. Get http://localhost:9000/: dial tcp [::1]:9000: getsockopt: connection refused
```
2016-04-21 17:10:16 -07:00
Anand Babu (AB) Periasamy a094c50f5a Merge pull request #1692 from harshavardhana/is-valid
config: Relax valid access and secret keys.
2016-04-19 18:27:44 -07:00
Harshavardhana 621e8cf0ff config: Relax valid access and secret keys.
Deviating from AWS Standards to support non
AWS Standard keys for Ceph and Exoscale probably
others.

Fixes #1690
2016-04-19 14:52:33 -07:00
Anand Babu (AB) Periasamy 4bd9336139 Merge pull request #1691 from harshavardhana/vendor
vendor: Vendorize minio-go
2016-04-19 02:47:13 -07:00
Harshavardhana c517833663 vendor: Vendorize minio-go
- Bucket policy fixes by Karthik Rao.
- China region fixes.
- Fixes a concurrent crash in Signature V2 code by Anis Elleuch.
2016-04-18 23:15:56 -07:00
Anand Babu (AB) Periasamy 8e4cc8df00 Merge pull request #1687 from harshavardhana/mirror-remove
mirror: Implement '--remove' feature.
2016-04-18 18:29:18 -07:00
Anis Elleuch 94f4c4cd2d Avoid removing session v7 json files by migrateSessionV5ToV6 (#2) 2016-04-18 17:47:39 -07:00
Harshavardhana c4c99999bc session: Add isRemoved() for session to avoid removing last removed files again. 2016-04-18 13:56:14 -07:00
Anis Elleuch 6abd3a4ed6 Avoid a possible crash when an error occurs while removing a file (#1) 2016-04-18 11:41:56 -07:00
Harshavardhana 9e94120d68 mirror: Implement '--remove' feature.
Fixes #1628
2016-04-17 12:21:43 -07:00
Anis Elleuch ba088b8fc0 Move ioutils pkg from minio to mc and fix a sorting list bug (#1688)
* Move ioutils pkg from minio to mc

* Fix an important bug in sorting fs list in recursive mode
2016-04-17 12:20:48 -07:00
Anis Elleuch 98ac1817cb Rewrite diff code (#1681) 2016-04-17 01:18:30 -07:00
Anand Babu (AB) Periasamy 65a31e34c9 check if sources exist (#1685) 2016-04-15 16:59:38 -07:00
Krishna Srinivas 264f1ef992 Merge pull request #1684 from harshavardhana/zip
release: Remove zip, tar.gz release builds.
2016-04-14 13:42:32 +05:30
Harshavardhana b30bbc0e74 release: Remove zip, tar.gz release builds. 2016-04-13 23:48:58 -07:00
Krishna Srinivas 7a77686878 Merge pull request #1680 from harshavardhana/gofmt
url: isURLPrefixExists() should use non-recursive mechanism.
2016-04-12 12:24:04 +05:30
Harshavardhana 0c4200306b url: isURLPrefixExists() should use non-recursive mechanism.
The reason is to avoid generating recursive requests while
we are only concerned about the top level prefix that if
it exists.
2016-04-11 20:44:36 -07:00
Harshavardhana 619b1b4e2a url: There is no reason to split '?' delimiter. (#1679)
The reasoning is that we are not providing query
params through 'mc' and we don't need to handle it
specially. Since all paths are absolute with only
delimiter of '/' all other characters should be allowed
including '?'.

For this same reason now newURL is called newClientURL.

Fixes #1677
2016-04-11 18:20:56 -07:00
Sreeram Boyapati 57d22664f4 config: validate config.json file (#1676)
- Minio Client validates only config host add parameters
    Not the config file. Use the same utils to validate config file

    if HostURL is wrong.
        /storage?googleapis?com for host /storage?googleapis?com is not valid. Could not parse it

    if API is wrong.
        S3v2iasdasd API for host https://www.google.com is not Valid. It is not part of any of the following APIs:
        1. S3v4
        2. S3v2

    If the version is wrong.
        Config version 9 does not match GlobalMCConfiguration 8.

    Example:

    mc: <ERROR> Config version 9 does not match GlobalMCConfiguration 8.

    S3v2asda API for host httpsasdkasd is not Valid. It is not part of any of the following APIs:
    1. S3v4
    2. S3v2

    URL httpsasdkasd for host httpsasdkasd is not valid. Could not parse it.
2016-04-10 21:28:17 -07:00
Anis Elleuch 38339b7cd9 Allow question mark in fs file names (#1678) 2016-04-10 15:28:03 -07:00
Anand Babu (AB) Periasamy d5cb19aeab allow caseless API signature in config (#1675) 2016-04-09 13:24:03 -07:00