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>
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/1416720https://review.openstack.org/151897
Change-Id: Iaa2e4992fc9fb5bcc39b2b9c08d2b4c69201117d
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Functional tests used to fail as incorrect HTTPBadRequest
was being imported.
Change-Id: I95b13fbe45e435b27628e532ae1637957172f081
Signed-off-by: Prashanth Pai <ppai@redhat.com>
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>
* 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>
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>
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>
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>
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>
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>
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>
* 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>
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
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>