Andreas Auernhammer
79ba4d3f33
refactor ObjectLayer PutObject and PutObjectPart ( #4925 )
...
This change refactor the ObjectLayer PutObject and PutObjectPart
functions. Instead of passing an io.Reader and a size to PUT operations
ObejectLayer expects an HashReader.
A HashReader verifies the MD5 sum (and SHA256 sum if required) of the object.
This change updates all all PutObject(Part) calls and removes unnecessary code
in all ObjectLayer implementations.
Fixes #4923
7 years ago
Harshavardhana
d864e00e24
posix: Deprecate custom removeAll/mkdirAll implementations. ( #4808 )
...
Since go1.8 os.RemoveAll and os.MkdirAll both support long
path names i.e UNC path on windows. The code we are carrying
was directly borrowed from `pkg/os` package and doesn't need
to be in our repo anymore. As a side affect this also
addresses our codecoverage issue.
Refer #4658
7 years ago
poornas
18c4e5d357
Enable browser support for gateway ( #4425 )
8 years ago
Harshavardhana
298b470f69
fs/erasure: Ignore objects with / even for DeleteObject() ( #4303 )
...
Additionally GetObject() also returns errFileNotFound similar
to HeadObject().
Fixes #4302
8 years ago
Krishnan Parthasarathi
2bd694dbc8
Add disksUnavailable healStatus const ( #3990 )
...
`disksUnavailable` healStatus constant indicates that a given object
needs healing but one or more of disks requiring heal are offline. This
can be used by admin heal API consumers to distinguish between a
successful heal and a no-op since the outdated disks were offline.
8 years ago
Krishnan Parthasarathi
e3fd4c0dd6
XL: Make listOnlineDisks and outDatedDisks consistent w/ each other. ( #3808 )
8 years ago
Harshavardhana
6efee2072d
objectLayer: Check for `format.json` in a wrapped disk. ( #3311 )
...
This is needed to validate if the `format.json` indeed exists
when a fresh node is brought online.
This wrapped implementation also connects to the remote node
by attempting a re-login. Subsequently after a successful
connect `format.json` is validated as well.
Fixes #3207
8 years ago
Bala FA
825000bc34
Use humanize constants for KiB, MiB and GiB units. ( #3322 )
8 years ago
Bala FA
bef0a50bc1
Cleanup and fixes ( #3273 )
...
* newRequestID() (previously generateUploadID()) returns string than byte array.
* Remove unclear comments and added appropriate comments.
* SHA-256, MD5 Hash functions return Hex/Base64 encoded string than byte array.
* Remove duplicate MD5 hasher functions.
* Rename listObjectsValidateArgs() into validateListObjectsArgs()
* Remove repeated auth check code in all bucket request handlers.
* Remove abbreviated names in bucket-metadata
* Avoid nested if in bucketPolicyMatchStatement()
* Use ioutil.ReadFile() instead of os.Open() and ioutil.ReadAll()
* Set crossDomainXML as constant.
8 years ago
Harshavardhana
c91d3791f9
heal: Add healing support for bucket, bucket metadata files. ( #3252 )
...
This patch implements healing in general but it is only used
as part of quickHeal().
Fixes #3237
8 years ago
Harshavardhana
f22862aa28
heal: Refactor heal command. ( #2901 )
...
- return errors for heal operation through rpc replies.
- implement rotating wheel for healing status.
Fixes #2491
8 years ago
Krishna Srinivas
0320a77dc0
HealBucket: create the bucket if it is missing in one of the disks. ( #2924 )
8 years ago
Krishna Srinivas
f5f007e183
Test: Add test case for xl.HealObject() ( #2884 )
...
fixes #2842
8 years ago
Krishna Srinivas
61a18ed48f
sha256: Verify sha256 along with md5sum, signature is verified on the request early. ( #2813 )
8 years ago
Karthic Rao
1ce339abeb
Fixing ineffssaign errors ( #2608 )
8 years ago
Krishna Srinivas
9358ee011b
logging: Print stack trace in case of errors.
...
fixes #1827
8 years ago
Krishnan Parthasarathi
de67bca211
Move formatting of disks out of object layer initialization ( #2572 )
8 years ago
Anis Elleuch
421cccb1d7
Add naughty disk to simulate disk errors ( #2645 )
8 years ago
Harshavardhana
bccf549463
server: Move all the top level files into cmd folder. ( #2490 )
...
This change brings a change which was done for the 'mc'
package to allow for clean repo and have a cleaner
github drop in experience.
8 years ago
karthic rao
70fd38818e
clean up: ineffassign fixes ( #2411 )
8 years ago
Krishnan Parthasarathi
5730d40478
tests: Added GetObject, DeleteObject and PutObject unit-tests ( #2222 )
9 years ago
Krishnan Parthasarathi
5cc9e4e214
fs/XL: Return IncompleteBody{} error for short writes ( #2228 )
9 years ago
Harshavardhana
4c21d6d09d
tests: Remove racey failedDisks behavior in RenameObject tests. ( #2138 )
...
Additionally also initialize namespace lock only once per test
run, there is no reason to initialize it multiple times to avoid
races.
Fixes #2137
9 years ago
Krishnan Parthasarathi
78ae696749
Added couple of unit-tests to xlObjects ( #1950 )
...
* Added couple of units to xlObjects
* Used test_utils for initialize/destroying xlObjects
9 years ago