482 Commits

Author SHA1 Message Date
Greg Karékinian
21dad2aba7 Get the metadata from Redis on a HEAD request
No need to hit the storage backend, we can set the response headers from
the data in Redis
2018-04-26 13:17:43 +02:00
Greg Karékinian
7bd45543f6 Set headers from the Redis metadata on a GET that results in a 304
Also add specs to check for the response headers
2018-04-26 13:17:43 +02:00
Greg Karékinian
f083022e6d Get the ETag from Redis on a GET request
This prevents doing a network request when we would return a 304 anyway
2018-04-26 13:17:43 +02:00
Greg Karékinian
86dc45f444 Add support for S3 through the REST API
This is currently using the old S3 authentication
(https://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html),
in order to support Exoscale Storage

Refs #112
2018-04-26 13:17:43 +02:00
842a8707e8
Merge pull request #116 from 5apps/update_dependencies_2
Update gem dependencies
2018-04-16 13:28:25 +02:00
Greg Karékinian
24b5bf0035 Update gem dependencies 2018-04-16 12:17:28 +02:00
ef8239eca0
Merge pull request #115 from 5apps/feature/75-remove_riak
Remove all Riak code and its dependencies
2018-04-16 12:06:52 +02:00
Greg Karékinian
ac6bec48c4 Remove all Riak code and its dependencies
Closes #75
2018-04-16 11:54:32 +02:00
e876f4ba52
Merge pull request #114 from 5apps/travis_update
Do not install Riak CS, run Travis builds on Trusty containers
2018-04-15 20:13:56 +02:00
Greg Karékinian
21061324dc Do not install Riak CS, run Travis builds on Trusty containers 2018-04-15 20:03:49 +02:00
60c508fba9
Add Last-Modified date to document items in listings
Not in RS spec draft yet, see https://github.com/remotestorage/spec/issues/158 for discussion.
2018-03-12 16:32:00 +02:00
c11310381a
Merge pull request #110 from 5apps/bugfix/redis_db_in_specs
Use all keys from the config file's redis section in the specs
2018-03-08 14:04:34 +02:00
Greg Karékinian
fac033cff5 Use all keys from the config file's redis section in the specs
You can pass a db index, and the code was using it, but not the specs
2018-03-08 12:59:03 +01:00
Greg Karékinian
b6bb36d7c2
Merge pull request #106 from 5apps/bugfix/handle_wrong_redis_metadata
Handle out of sync metadata in Redis on PUTs
2018-01-05 13:17:29 +01:00
Greg Karékinian
3ddcccaee7 Handle the case of a PUT on a non-existing object
The previous code was returning a 500 because the HEAD request failed
2018-01-05 13:11:47 +01:00
Garret Alfert
2fac808343 Split list of ETAGs before removing Weak indicator 2018-01-05 06:55:46 +01:00
Garret Alfert
18670021b1 Handle out of sync metadata in Redis on PUTs
When the IF-MATCH comparison fails, we check the actual metadata on
the Swift server to be sure.
2018-01-05 06:49:42 +01:00
Garret Alfert
24ae9ad893 Allow for weak ETAGs with leading quote
The remoteStorage client currently surrounds all ETAGs with quotes, so
instead of W\"etag" it looks like "W\"etag".
2018-01-03 22:06:03 +01:00
Greg Karékinian
91e687d318
Merge pull request #105 from 5apps/bugfix/ignore_weak_etags
Ignore weak ETAG prefix when comparing MATCH headers
2018-01-03 21:49:02 +01:00
Garret Alfert
8ffd15bb61 Ignore weak ETAG prefix when comparing MATCH headers
Our metadata only contains the actual ETAG value, so we need
to use only that when comparing it.
2018-01-03 21:31:25 +01:00
Greg Karékinian
abddec62de Merge pull request #103 from 5apps/feature/update_gems
Update gems and use Ruby 2.4.1 on Travis
2017-07-05 23:48:44 +02:00
Greg Karékinian
258c9a5ae6 Update rest-client to 2.1.0.rc1 to fix a memory leak in Ruby 2.4 2017-07-05 23:42:37 +02:00
Greg Karékinian
653ef3256a Use Ruby 2.4.1 for the Travis build 2017-07-05 23:42:12 +02:00
Greg Karékinian
2a35b7f56f Merge pull request #101 from 5apps/feature/update_gems
Update gems
2017-06-15 17:06:34 +02:00
Greg Karékinian
ed72a1c3fd Use newer Ruby on Travis build 2017-06-15 17:04:41 +02:00
Greg Karékinian
feaff528eb Update Ruby gems
nokogiri is a security update
2017-06-15 17:03:58 +02:00
Greg Karékinian
e994696fe0 Merge pull request #99 from 5apps/feature/calculate_storage_size_from_metadata
Add a script to calculate a user's storage size from the metadata...
2016-12-15 17:13:15 +01:00
Greg Karékinian
9386666610 Add a migration runner to be able to run the script on all users...
... on as many servers as we want

Set the migration key in platform for all users:

    User.storage_customer.each do |u|
      FiveAppsStore::Application.redis_remotestorage.hset(
        "rs:size_migration", u.username, "not_started"
      )
    end
2016-12-15 16:28:19 +01:00
Greg Karékinian
97a77e2a2c Remove unused test key passed to the eval command 2016-12-15 15:34:51 +01:00
Greg Karékinian
a7c5808593 Add a script to calculate a user's storage size from the metadata...
... And write it to Redis

Usage:

   ENVIRONMENT=development ./migrate_storage_size_from_metadata.rb username
2016-12-15 13:21:54 +01:00
Greg Karékinian
06d234071a Merge pull request #98 from 5apps/bugfix/remove_whitespace_from_token
Remove line break from the token file when loading it
2016-10-24 15:30:37 +02:00
Greg Karékinian
c1ed996b1d Only send the first 20 characters of the token 2016-10-19 15:05:30 +02:00
Greg Karékinian
be43a7474a Remove line break from the token file when loading it 2016-10-18 18:03:02 +02:00
e575398854 Merge pull request #97 from 5apps/feature/single_container_migration
Remove container migration checks and scripts
2016-09-12 12:26:09 +01:00
Garret Alfert
07533e139d Remove migration scripts 2016-09-12 12:32:31 +02:00
Garret Alfert
35abddc4ea Remove container migration checks 2016-09-12 11:49:23 +02:00
d81a4b8314 Merge pull request #96 from 5apps/feature/single_container_migration
Skip migration for users with too many files
2016-09-08 12:52:29 +02:00
Garret Alfert
08a2754936 Skip migration for users with too many files 2016-09-08 11:45:41 +02:00
9ca8a7d507 Merge pull request #95 from 5apps/feature/swift_migration
Swift migration for single shared container
2016-09-07 22:38:52 +02:00
Garret Alfert
41baecbf35 Use a MigrationRunner to iterate over all unmigrated users 2016-09-07 19:58:32 +02:00
Garret Alfert
74428408b1 Use new Redis migration hash in Liquor Cabinet itself 2016-09-07 18:13:52 +02:00
Garret Alfert
710657748b Use full dir listing instead of per subdir 2016-09-07 17:59:14 +02:00
Garret Alfert
685c82d068 Use Redis hash for storing migration state instead of one key per user 2016-09-07 17:05:27 +02:00
Garret Alfert
ad8a75a0ad Use COPY method instead of GET and PUT 2016-09-07 14:07:13 +02:00
Garret Alfert
90a6753d88 Use container path directly, instead of hiding it behind a method 2016-09-06 16:36:43 +02:00
Garret Alfert
6b7bb8144e Fix migration script to work without dir objects 2016-09-06 16:24:12 +02:00
Garret Alfert
e6fa6ca586 User proper container and path based on migration state 2016-09-05 18:27:35 +02:00
Garret Alfert
22ce52d00c Migration for moving to a single shared container for all users 2016-09-02 20:03:48 +02:00
Garret Alfert
c79b86bff5 Change Redis key for container migration 2016-09-02 16:41:36 +02:00
Garret Alfert
fdc819d53d Determine which container to use from Redis 2016-09-02 15:15:48 +02:00