Commit Graph

285 Commits

Author SHA1 Message Date
Jenkins eb50236764 Merge "Backport: Fix metadata overall limits bug" into icehouse 2015-08-24 19:03:08 +00:00
Prashanth Pai 79ea52a745 Backport: Fix metadata overall limits bug
This is a manual backport of the following upstream fix:
https://review.openstack.org/126645

Change-Id: Ib807a3271f34fa5a58ce3305566a32362055ee07
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2015-08-21 12:40:52 +05:30
Prashanth Pai bc43f0b4b3 Fix inconsistent data being returned on GET
When content of an object is modified from filesystem interface, a GET
on the object will return inconsistent or incomplete content because the
content length originally stored as metadata no longer reflects the
actual length of the file after modification.

The complete fix will have two parts:
(1) Return the entire content of object as is to the client
(2) The Etag returned should reflect the actual md5sum of object content

This change only fixes (1) mentioned above. This means, the client will
always get the complete content of the file.

Fix (2) is not part of this change. This means, if content length of the
object remains same even after modification, the Etag returned would be
incorrect. Fixing (2) involves more invasive changes in the code. So
that is deferred for now and will be sent as a separate change later.

Reference:
https://bugs.launchpad.net/swiftonfile/+bug/1416720
https://review.openstack.org/151897

Change-Id: Iaa2e4992fc9fb5bcc39b2b9c08d2b4c69201117d
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2015-08-20 18:05:27 +05:30
Prashanth Pai ad0bb79827 Import HTTPBadRequest from swift's module
Functional tests used to fail as incorrect HTTPBadRequest
was being imported.

Change-Id: I95b13fbe45e435b27628e532ae1637957172f081
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2015-08-20 18:05:21 +05:30
Prashanth Pai 74d02e6c6e Exclude .trashcan dir from container listing
Since RHS 3.1, .trashcan directory is visible from glusterfs
fuse mount. This causes problems in gsexpiring volume in which
the directories should be integers (timestamps). The expirer
crashes when it tries to:

    int(".trashcan")

This change does not list .trashcan as a container when a GET
request is issued on the account/volume.

Change-Id: I70830a4085c5cf0890cb8e54ef8521c18a20c7f3
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2015-08-19 10:52:15 +05:30
Prashanth Pai b2dbc15e9b Catch ESTALE in addition to ENOENT
Change-Id: Icf0a9b79371890b9a4ac8ea522ff15f08a3c2e75
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2015-08-19 10:52:10 +05:30
Prashanth Pai 8d60b484e9 Properly handle read_metadata() exceptions
* Gracefully handle ENOENT encountered due to races in deletion.
* Fixed a consumer of read_metadata() that used to catch OSError
  instead of IOError.

Change-Id: I238c05ac8a04b707dd75c454f1722bd788c25339
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2015-08-19 10:51:31 +05:30
Prashanth Pai 6762fc6593 Fix object server leaking file descriptors
Object server never closes file descriptor when DiskFile.open()
raises an exception. This is fixed by catching exceptions thrown
by code block inside DiskFile.open() and manually closing the
file descriptor.

Change-Id: If989b542d6380dda0fe499792b73e67c8121ad1e
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2015-08-13 10:36:30 +05:30
Prashanth Pai 2842e8236a Fix API incompatibility in update_metadata()
A major security fix[1] has been back-ported to icehouse branch in
upstream Swift. This fix changes the method signature of one of the
methods that we override, namely "update_metadata()". The method
signature of the same method in gluster-swift has been adjusted
accordingly. However, the entire fix itself has NOT been backported
as the implementations are different and due to time constraints.

[1]: https://review.openstack.org/#/c/126645/

Running unit tests in icehouse branch fails with:
AttributeError: 'VersionInfo' object has no attribute 'semantic_version'
Installing testtools package seems to be a good workaround for now.

Also fixed pep8 issues and removed duplicate gswauth unit tests.

Change-Id: I61d635ca5f47eb37f5275297c262f2bfe41de1fa
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2015-08-13 10:33:21 +05:30
Jenkins 2beeef64da Merge "Remove swiftkerbauth code" into icehouse 2014-11-26 15:52:12 +00:00
Prashanth Pai 93dbcb5064 Update object-expirer.conf with explanations
Change-Id: Id88eb3b7021beb71e5cd62f7155ae2dc04a68908
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-11-20 12:00:10 +05:30
Jenkins c9d2f09ee3 Merge "Check if /etc/swift exists in ring builder" into icehouse 2014-11-17 02:31:29 +00:00
Prashanth Pai d66c14c108 Remove swiftkerbauth code
Swiftkerbauth is a generic auth middleware for Swift's proxy server.
It is not specific to swiftonfile (previously gluster-swift).

If development continues, the code can reside in a separate repo.

Change-Id: I2c6e805cd1a9eed6d42334352ceb66c4c5811b36
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-11-14 10:03:06 +05:30
Prashanth Pai 3142ed2423 Add object expiration functests
This is to be applied only to icehouse branch
where the old "gluster-swift" code persists.

Change-Id: I2d4698cbb1f89ca7b7bc1a9196106667e6b03e1b
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-11-14 09:52:58 +05:30
Jenkins 97153d150a Merge "Cleanup functest and undo old patch" into icehouse 2014-11-13 20:30:39 +00:00
Prashanth Pai bc234d05ba Remove old travis config file and fix typo
Change-Id: If559097c8019b163fa39505e74d3423abaf2e237
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-11-06 10:12:28 +05:30
Prashanth Pai 260c8ef399 Check if /etc/swift exists in ring builder
If /etc/swift did not exist, the gluster-swift-gen-builders tool
used to go ahead and create them in current dir.

Change-Id: I1879b959b922de6318ecdff2f16eda12c001ae21
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-11-04 15:53:13 +05:30
Prashanth Pai 637dac947c Cleanup functest and undo old patch
Conf files used by different functests were duplicated.
If they needed to be modified (for example, to add new options for
object expiration), they had to be modified at several places.

* added object expirer config that were missing.
* Undid http://review.gluster.org/6444
  which was no longer required.

Change-Id: I601b0dd8fdb10520f81523d8e292e944b34e28ce
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-11-04 14:25:49 +05:30
Thiago da Silva 051e068d1e Merge pull request #35 from prashanthpai/backport-1
Fix unlink call after successful rename (icehouse-backport)
2014-09-05 09:56:59 -04:00
Thiago da Silva be104a36c4 Merge pull request #36 from prashanthpai/backport-2
fix issue with GET on large object (icehouse-backport)
2014-09-05 09:56:07 -04:00
Prashanth Pai ff76f42f8a fix issue with GET on large object (icehouse-backport)
This is a manual backport of:
https://github.com/swiftonfile/swiftonfile/pull/16

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-09-05 12:44:35 +05:30
Prashanth Pai 04d0a9969e Fix unlink call after successful rename
This used to appear for every PUT of an object.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-09-05 12:35:59 +05:30
Thiago da Silva 10b268090e Merge pull request #18 from thiagol11/icehouse
Updating version on __init__ file
2014-05-23 12:58:14 -04:00
Thiago da Silva 5bcab8f6f7 Updating version on __init__ file
Also added release notes on spec file

Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-05-23 11:19:19 -04:00
Luis Pabon 5c2cba23cb Merge pull request #15 from thiagol11/update_spec
updating spec file to add dependency on swift icehouse
2014-05-23 10:33:36 -04:00
Thiago da Silva 52b00a8954 updating spec file to add dependency on swift icehouse
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-05-20 16:02:09 -04:00
Thiago da Silva ae7c93b461 Merge pull request #6 from prashanthpai/rebase
Sync with OpenStack Swift v1.13.1
2014-05-19 21:44:50 -04:00
Prashanth Pai 191e55b976 Revert: allow non-root user to run functests
This caused Jenkins to not run functests.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-05-08 15:01:01 +05:30
Prashanth Pai cb7e968873 Modify unit tests and func tests
* Updated tox.ini
* Created .unittests and .functests
* Added tempurl to pipeline in conf files so that tempurl tests are not
  skipped
* Updated .gitignore file

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-05-08 12:11:46 +05:30
Prashanth Pai d23fd1b56c Sync with OpenStack Swift v1.13.1
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-05-08 11:45:08 +05:30
Thiago da Silva b6d1671b61 Merge pull request #12 from pushpesh/functionalnosetestremove
Functionalnosetestremove
2014-05-07 07:56:13 -04:00
Thiago da Silva 962622b102 Merge pull request #8 from thiagol11/update_readme
updated README.md to Swift-On-File
2014-05-06 15:58:31 -04:00
Thiago da Silva 45608577de Merge pull request #9 from prashanthpai/spec-expirer
Fix object-expirer.conf-gluster RPM build error
2014-05-06 15:57:27 -04:00
Pushpesh Sharma be0ae7e1c6 Minor update 2014-05-06 16:28:39 +05:30
Pushpesh Sharma 65000f1c93 Removing functionalnosetests
With the Icehouse release of openstack-swift functional
case classified as fucntionalnose tests have been moved
to functional cases.Although we copied test suites from
test/fucntionalnose/ to test/functional/ but we still
have same cases under test/functionalnose.This might
cause duplicate tests run.

Change-Id: I025206467aad364debd9050b3186e1379d89ffaf
Signed-off-by: Pushpesh Sharma psharma@redhat.com
Reviewed-on: http://review.gluster.org/7516
Reviewed-by: Prashanth Pai ppai@redhat.com
Tested-by: Prashanth Pai ppai@redhat.com
Reviewed-by: Chetan Risbud crisbud@redhat.com
Reviewed-by: Thiago da Silva thiago@redhat.com
2014-05-06 16:23:08 +05:30
Prashanth Pai 8ab1069410 Fix object-expirer.conf-gluster RPM build error
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-05-05 10:21:35 +05:30
Thiago da Silva afee30faf0 added new support filesystem section
Also, called out the fact that the quick start guide
focus on glusterfs

Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-05-02 16:07:48 -04:00
Thiago da Silva 527b01f0cc updated README.md to Swift-On-File
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-05-02 15:37:10 -04:00
Thiago da Silva 9a240c7a0d Merge pull request #3 from thiagol11/add_jenkins_to_travis
adding support to run jenkins triggered by travis
2014-04-30 07:24:07 -04:00
Thiago da Silva 34b5a8bf7d removing blank lines
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-04-28 19:30:38 -04:00
Thiago da Silva 3568b6457c fixing missing fi
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-04-28 15:45:44 -04:00
Thiago da Silva d8f5b0f36a adding support to run jenkins triggered by travis
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-04-28 15:34:39 -04:00
Thiago da Silva 8041944598 Update README.md 2014-04-22 14:58:18 -04:00
Thiago da Silva c015148c36 Merge pull request #2 from thiagol11/master
Adding travis unit testing
2014-04-22 14:56:38 -04:00
Thiago da Silva 3ddd952fc6 fixing travis file to run correct unit test
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-04-22 14:41:09 -04:00
Thiago da Silva c582669ded adding travis status badge to README
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-04-22 14:35:28 -04:00
Thiago da Silva 809309618e adding py26 unit testing to travis
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-04-22 14:29:46 -04:00
Thiago da Silva 37835fdf72 trigger travis build
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-04-22 14:24:37 -04:00
Thiago da Silva cb6332a188 adding travis ci testing
adding .travis.yml file to enable unit testing run by travis

Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-04-22 14:15:02 -04:00
Thiago da Silva 404fcd815c Updating code to call fs_utils instead of python's os module
This change is being done to prepare the code to always call
fs_utils for all filesystem calls on the data being stored.
By creating this interface (i.e., fs_utils), we can then
make a seamless change to use the current method of 'os.'
calls over FUSE _or_ libgfapi. This new method will be introduced
in a new separate patch.

Change-Id: Ic768fa7352d7672b1f060230bb4486f0ec228152
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Reviewed-on: http://review.gluster.org/7333
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2014-04-10 12:50:38 -07:00