Commit graph

4796 commits

Author SHA1 Message Date
Harshavardhana ef61b36c5a Fix PUT bucket notification deadlocks (#5734)
This PR fixes two different variant of deadlocks in
notification.

- holding write lock on the bucket competing with read lock
- holding competing locks on read/save notification config
2018-03-29 12:00:20 -07:00
Harshavardhana 35b3913d22 Fix block id length upto 8bytes only for azure gateway. (#5731)
This PR also reverts commit 2f9354b17e
to bring back 8 byte block id requirement for azure gateway.
2018-03-29 09:54:47 -07:00
Harshavardhana 228c8f05f4 Improve some wording in disk caching docs (#5730) 2018-03-29 10:12:14 +05:30
poornas af024a9c69 Remove deadcode related to multipart cleanup for fs (#5716)
The cleanup code is no longer needed as we moved to lockfree 
multipart backend for fs
2018-03-29 08:26:52 +05:30
Minio Trusted 5a7ab7b06e Update yaml files to latest version RELEASE.2018-03-28T23-45-53Z 2018-03-28 23:48:23 +00:00
poornas 5006e28367 Add disk-cache and worm to user-agent (#5729) 2018-03-28 16:26:27 -07:00
poornas a3e806ed61 Add disk based edge caching support. (#5182)
This PR adds disk based edge caching support for minio server.

Cache settings can be configured in config.json to take list of disk drives,
cache expiry in days and file patterns to exclude from cache or via environment
variables MINIO_CACHE_DRIVES, MINIO_CACHE_EXCLUDE and MINIO_CACHE_EXPIRY

Design assumes that Atime support is enabled and the list of cache drives is
fixed.
 - Objects are cached on both GET and PUT/POST operations.
 - Expiry is used as hint to evict older entries from cache, or if 80% of cache
   capacity is filled.
 - When object storage backend is down, GET, LIST and HEAD operations fetch
   object seamlessly from cache.

Current Limitations
 - Bucket policies are not cached, so anonymous operations are not supported in
   offline mode.
 - Objects are distributed using deterministic hashing among list of cache
   drives specified.If one or more drives go offline, or cache drive
   configuration is altered - performance could degrade to linear lookup.

Fixes #4026
2018-03-28 14:14:06 -07:00
Harshavardhana 2f9354b17e Use uuid.New() for uploadID in azure gateway (#5721) 2018-03-28 11:17:25 -07:00
Harshavardhana 6e9c853312 After healing re-load disks with the new format (#5718)
This PR also fixes correct calculation of drive states
before and after healing of objects.

Fixes #5700
Fixes #5708
2018-03-28 06:41:39 +05:30
poornas 76d1e8bbcd change fs.json format to include checksum fields (#5685) 2018-03-27 17:23:10 -07:00
Bala FA 3ebe61abdf Quick support to server level WORM (#5602)
This is a trival fix to support server level WORM.  The feature comes
with an environment variable `MINIO_WORM`.

Usage:
```
$ export MINIO_WORM=on
$ minio server endpoint
```
2018-03-27 16:44:45 -07:00
Takeshi Watanabe 2182c1a4f7 Use paho configuration API instead of setting it directly with struct initializer. (#5707) 2018-03-26 16:45:21 -07:00
Nitish Tiwari 58291acb8d Fix object deletion where quorum is not available (#5709)
Object deletion should not be possible if quorum is not
available. This PR updates deleteObject() to check for
quorum errors before proceeding with object deletion.

Fixes #5535
2018-03-26 16:39:28 -07:00
Harshavardhana de44be86d0 Use readQuorum instead of writeQuorum to check bucket exists (#5715)
Fixes #5708
Fixes #5700
2018-03-26 16:36:57 -07:00
Kanagaraj M 19451e374a revert browser newux changes (#5714) 2018-03-26 12:49:12 -07:00
Harshavardhana 35e64573fa Add missing env doc for MINIO_DOMAIN (#5705) 2018-03-26 09:11:39 -07:00
kannappanr 7c747a9643
Return complete Location URL in CompleteMultipartUpload (#5692)
Remove getLocation function.
Fixes #5687
2018-03-23 13:46:57 -07:00
Kanagaraj M 1c91c7b54d added eslint prettier check to travis (#5701)
- "yarn eslint" will throw the error if there are any formatting issues
- "yarn format" will format the js file based on the project's
prettier configuration.
2018-03-23 11:41:10 -07:00
Harshavardhana 020cc8b669 Remove old unmaintained docs (#5699)
- removes backend/{fs,xl} files.
- removes FreeBSD doc since we already have FreeNAS doc.
- removes sets/ directory which is redundant with
  large-bucket directory.
- removes browser/ directory which attempts
  to explain about browser RPC calls, since
  its an internal API we do not need to document it.
2018-03-24 00:07:04 +05:30
Nitish Tiwari 850caaa1be
Add iptables/ufw command example to open relevant ports for Minio (#5604)
fixes #5022
2018-03-24 00:00:47 +05:30
Kanagaraj M 4ca0ec4586 added yarn test to travis.yml (#5696) 2018-03-23 14:36:20 +05:30
Kanagaraj M 85154508b0 updated favicon.ico and ui-assets.go (#5698) 2018-03-23 14:06:18 +05:30
Rushan de84f41bec Fix the styling of upload abort button (#5697) 2018-03-23 13:04:39 +05:30
Kaan Kabalak 3805a055ab Fix New UX related bugs for Alerts, BucketList and Abort Upload modal (#5694)
- Center text on Alert component appearing on top
- Change "Upload" to "Continue" on New UX Abort Upload modal
- Fix issue where long bucket names were overflowing instead of
continuing on the next line
- Fix word wrap issue similar to the last one for the alerts that appear
on top
- Help fix the cluttering issue on #5690 as the right margin has been
increased in alerts

Fixes #5689, #5691 and #5695
2018-03-23 12:19:27 +05:30
Harshavardhana 17409517ec Fix docs to expand on new limits on a distributed setup (#5677) 2018-03-22 16:24:14 -07:00
Nitish Tiwari cf67f1838e Add unit tests for endpoint-ellipses.go (#5681) 2018-03-22 16:23:54 -07:00
Harshavardhana 787f158f92 update browser assets for newux 2018-03-22 13:30:39 -07:00
Kanagaraj M c0e45f9098 Fix failing unit tests in browser (#5688)
* format js files using prettier

Used the following command to format the files
prettier --write "browser/app/js/**/*.js"

* fix failing unit tests in browser
2018-03-22 12:25:56 -07:00
Kanagaraj M cb3818be27
adding local pagination to bucket list (#5684)
* adding local pagination to bucket list

When there are more than 5000 buckets, browser ui
becomes unresponsive since react needs to create
5000 elements which takes browser resources.
So we show only 100 buckets for the first time,
and load more buckets when the user is scrolling down.

* move inline styles to less file
2018-03-22 23:28:48 +05:30
Rushan 1459c4be1e Browser: Update UI with new components and elements (#5671) 2018-03-21 11:38:57 -07:00
Kaan Kabalak 384b4fdf28 Tweak fetchBuckets to comply with the changes made to the routes (#5592)
This commit removes the argument in the fetchBuckets function that was
introduced in #5580. Due to the adjustment made in #5584, we no longer
need to differentiate between where the function has been called from.
2018-03-21 11:38:56 -07:00
Kanagaraj M 6a15b89b9a refactor Dropzone component and added tests (#5578) 2018-03-21 11:38:56 -07:00
Kanagaraj M 54e5ee6535 removed duplicate route components from browser (#5584)
All routes '/', '/:bucket/', '/:bucket/*' render the same
component. Instead we could just have a single route like following which
combines all the above routes

'/:bucket?/*'

bucket is optional here, so it can cover '/'
2018-03-21 11:38:56 -07:00
Kaan Kabalak a6adef0bdf Refactor bucket delete and bucket policy (#5580)
This commit adds the bucket delete and bucket policy functionalities
to the browser.

Part of rewriting the browser code to follow best practices and
guidelines of React (issues #5409 and #5410)

The backend code has been modified by @krishnasrinivas to prevent
issue #4498 from occuring. The relevant changes have been made to the
code according to the latest commit and the unit tests in the backend.
This commit also addresses issue #5449.
2018-03-21 11:38:56 -07:00
Kanagaraj M 416841869a allow non-loggedin users to access public bucket (#5570)
* conditionally render main action buttons

- Make bucket action will be available only for loggedIn users
- File upload button will be avaialble for loggedIn users
  and non-loggedIn users if the prefix is writable

* select the bucket and prefix from the url

When the url contains bucket and prefix, it will be selected
by default instead of the first bucket from the list.

* show BucketSearch only for LoggedIn users

* allow non-LoggedIn users to access public bucket

* removed unused Router imports

* fix test case failures in BucketList.test.js

* remove dupicate minioBrowserPrefix from url

since history is already initialized with minioBrowserPrefix,
no need to use it in push or replace

* remove unused match from App component

* remove unused minioBrowserPrefix imports
2018-03-21 11:30:50 -07:00
Kanagaraj M bb0adea494 Refactor browser dropdown links and components (#5562)
* refactor browser links and about modal

Moved about modal to separate component and added unit tests.

* refactor change password modal component

* added unit tests for ChangePasswordModal

* fix logout function in browser dropdown

* remove older unused BrowserDropdown component

* remove unused variables from BrowserDropdown component

* show BrowserDropdown and StorageInfo only for LoggedIn users

Non-loggedIn users will see a 'Login' button
2018-03-21 11:30:50 -07:00
Kanagaraj M 6a42727e00 Refactor download object and bulk action components (#5546) 2018-03-21 11:30:50 -07:00
Kanagaraj M da4558a8f7 Refactor delete object and share object components (#5537) 2018-03-21 11:30:50 -07:00
Kaan Kabalak 566ac78b8b Add missing unit tests for PR #5499 (#5527)
Part of #5410
2018-03-21 11:30:50 -07:00
Kanagaraj M 44f8f7059c Refactor make bucket and upload components (#5521) 2018-03-21 11:30:50 -07:00
Kanagaraj M 9bfa07ecf5 re-organize components and actions by feature (#5518)
Now the files grouped based on the features instead of
the previous approach of grouping by type.
2018-03-21 11:30:50 -07:00
Kaan Kabalak ead6337eab Add missing unit tests to JavaScript and React components (#5505)
Add the missing unit tests login, bucket listing, and bucket searching functionalities.
2018-03-21 11:30:50 -07:00
Kanagaraj M feb726dd98 Refactor of components (#5499) 2018-03-21 11:30:50 -07:00
Kanagaraj M 9ab6a8035f upgrading react and refactoring components (#5409) (#5444)
- upgraded react from v16.2.0
- upgraded react-router to v4.2.0 and re-writen the routes
- using prettier to format the code
- added jest to unit test components/reducers/selectors

This provides a skeleton to start of with. Only basic unit test
cases are added, remaining needs to be added.

In terms of functionality, it provides login, listing and searching
buckets. Remaining functionalities will be added in upcoming patches.
2018-03-21 11:30:50 -07:00
Kanagaraj M 76be54551f support for sourcemaps in browser code (#5451)
changed from 'eval' to 'cheap-module-eval-source-map' to 
generate source map of the original code instead of transpiled code.
2018-03-21 11:30:50 -07:00
Kaan Kabalak 0da377f3e9 Upgrade webpack from v1 to v3 (#5448)
- Changed webpack.config.js and webpack.production.config.js
according to the migration guidelines
- Updated packages that had unmet peer dependencies after the 
webpack update

Fixes #5398
2018-03-21 11:30:50 -07:00
Kaan Kabalak 9cc77e51f5 Change name of 'Settings' dropdown link to 'Change Password' (#5394) 2018-03-21 11:30:50 -07:00
Kaan Kabalak bbbbb8d3e2 Center dropdown toggle correctly across browsers (#5395)
This commit also fixes the shifting issue for Firefox when the dropdown
toggle is clicked.
2018-03-21 11:30:50 -07:00
Harshavardhana 565dc8b283 Do not check for GOPATH env for builds (#5628)
Since go1.8 GOPATH is not required to set prior, as
it defaults to "${HOME}/go" we only need to check if
go tool detected GOPATH correctly. If yes then we
proceed if not we fail.
2018-03-20 12:05:49 -07:00
Harshavardhana c726145baf Fix regression in removing notification (#5673)
fixes a regression introduced in 0e4431725c
when removing a previously applied notification configuration.

event.ParseConfig() was stricter in terms of handling notification
configuration, we need to allow when notification configuration is
sent empty, this is the way to remove notification configuration.
2018-03-20 12:02:56 -07:00