summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* PUT of a Directory failedChetan Risbud2014-03-123-15/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PUT of a directory fails with gluster-swift when there exists object of a same name. This is because the objects and directories are placed on the glusterfs. And hence the filesystem semantics are applicable there. Exceptions raised in such situation are needed to be handled and reported correctly back to proxy-server with HTTPConflict as a error code. Although swift still continues to choose 503 as the best respose in such cases. No tracebacks reported. Fix covers the case when there exists a directory and object of the same name is PUT. Code changes fixes both the failure cases mentioned in the bug. Examples of failing PUT requests: 1) curl -v -X PUT http://127.0.0.1:8080/v1/AUTH_test/c1/dir1/obj2/anotherobject -d'asdasdsadA' -- obj2 was already an object. 2)curl -v -H 'Content-Length: 0' -H 'Content-Type: application/directory' -X PUT http://127.0.0.1:8080/v1/AUTH_test/c1/obj1 -- obj1 was already and object Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1071021 Change-Id: Id3042d920e3f99e740d4042ef5907ac8c59e04db Signed-off-by: Chetan Risbud <crisbud@redhat.com> Reviewed-on: http://review.gluster.org/7181 Reviewed-by: Prashanth Pai <ppai@redhat.com> Tested-by: Prashanth Pai <ppai@redhat.com>
* Restart memcached after clean-up-token --purge-allChetan Risbud2014-03-111-2/+8
| | | | | | | | | | | | | | | | | | | | Bug: https://bugs.launchpad.net/gluster-swift/+bug/1269444 Recommended way is to flush the cached tokens from memcached after gswauth-clean-up-token. As currently there is no way to flush only those tokens from memcached. So a debug message recommending restart of the memcached. A quick fix. Bigger fix would come in later. Older cached tokens should be flushed/invalidated to let access path work correctly with valid and new tokens. Change-Id: Ic7a820eb3c60bac4829d5c5230cb3a5241b77957 Signed-off-by: Chetan Risbud <crisbud@redhat.com> Reviewed-on: http://review.gluster.org/7168 Reviewed-by: Prashanth Pai <ppai@redhat.com> Tested-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com>
* Update Havana link to 1.10.0-2Luis Pabon2014-02-251-1/+1
| | | | | | Change-Id: Ib0765d2109645a2da0e2e58b176ad26b932d7b99 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/7159
* Sync with OpenStack Swift v1.12.0Luis Pabon2014-02-169-655/+1801
| | | | | | | | | | | | * Bumped the version of gluster-swift to v1.12.0. * Added document on how to do a sync Change-Id: I676e110759b0bce3007a2a38f3b384b4ca9d710d Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6977 Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Chetan Risbud <crisbud@redhat.com> Tested-by: Chetan Risbud <crisbud@redhat.com>
* Update keystone authentication documentationAntonio Messina2014-02-141-1/+171
| | | | | | | | | | | Add detailed information on how to configure gluster-swift to use Keystone as an authentication source. Change-Id: I9e3ea72378e3f85db45e0ab0320d43591976e038 Signed-off-by: Antonio Messina <antonio.s.messina@gmail.com> Reviewed-on: http://review.gluster.org/6956 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* simplifying instructions in auth guideThiago da Silva2014-02-101-2/+21
| | | | | | | | | | | | | | | | | | | | Attempted to simplify the instructions around authenticating with swift client. Provided users a basic and more advanced method of authenticating. The previous version only listed the advanced method, which is still necessary because it instructs reseller admins on how to access other accounts Bug: https://bugs.launchpad.net/gluster-swift/+bug/1267445 Change-Id: I99cae591627616206fb5277af4b636b8dd2ca3cd Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6863 Reviewed-by: pushpesh sharma <psharma@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Chetan Risbud <crisbud@redhat.com> Tested-by: Chetan Risbud <crisbud@redhat.com>
* Revert "Attempt to fix failing testMetadataOnPost functional test"Chetan Risbud2014-02-101-1/+0
| | | | | | | | | This reverts commit ad6fb3558019e0f65de0b36c2c2f78d94925838c Change-Id: I0e04c923880b3b987bedb04fdb10d3f9813bb884 Reviewed-on: http://review.gluster.org/6952 Reviewed-by: Chetan Risbud <crisbud@redhat.com> Tested-by: Chetan Risbud <crisbud@redhat.com>
* Attempt to fix failing testMetadataOnPost functional testPrashanth Pai2014-02-101-0/+1
| | | | | | | | | | | | | | | | On Jenkins, functional tests occasionally fail in testMetadataOnPost test case with ResponseNotReady exception. This is an attempt to fix that as I'm guessing that the following could be the reason. It is advised to read the whole response body before sending a new request: http://docs.python.org/2/library/httplib.html#httplib.HTTPConnection.getresponse http://hg.python.org/cpython/file/2.7/Lib/httplib.py#l1033 Change-Id: I2ee880fd15af8766dcbd12f84ef561a67acdcdce Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6945 Reviewed-by: Chetan Risbud <crisbud@redhat.com> Tested-by: Chetan Risbud <crisbud@redhat.com>
* adding error handling to gswauth-cleanup-tokens toolThiago da Silva2014-02-052-10/+27
| | | | | | | | | | | | | | | added input validation for a couple of options and error handling in case a non-existing account name is provided Change-Id: I6d703d584552fc7b7574f34e79ed25a2982b6d5e Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6767 Reviewed-by: Prashanth Pai <ppai@redhat.com> Tested-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com> Reviewed-by: Chetan Risbud <crisbud@redhat.com>
* Fixes some TCs that assert for response code 403Pushpesh Sharma2014-01-301-15/+13
| | | | | | | | | | | | | For some scenarios although the expected response as per the REST spec is 403, but due to technical limitation/performance improvements it is decided to go with 401.EX:An admin/regular user tries to add a reseller admin user. Change-Id: Ibc280a0be6e5cb81d4d2c46d9a758915ff60ae8f Reviewed-on: http://review.gluster.org/6833 Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Chetan Risbud <crisbud@redhat.com> Tested-by: Chetan Risbud <crisbud@redhat.com>
* Rebase swiftkerbauth imported code with upstreamChetan Risbud2014-01-278-25/+407
| | | | | | | | | | | | | | | | | Few changes have been merged to upstream swiftkerbauth repo. This commit brings it down to gluster-swift repo. Bringing below changes to gluster-swift repo in one go. http://review.gluster.org/#/c/6296/ http://review.gluster.org/#/c/6370/ http://review.gluster.org/#/c/6595/ http://review.gluster.org/#/c/6713/ http://review.gluster.org/#/c/6732/ Change-Id: I10dc12d75ec63fca313339fbc71e4f18071af552 Signed-off-by: Chetan Risbud <crisbud@redhat.com> Reviewed-on: http://review.gluster.org/6764 Reviewed-by: Prashanth Pai <ppai@redhat.com>
* Test cases for gswauth-cleanup-tokenPushpesh Sharma2014-01-241-8/+152
| | | | | | | | | | | | This commit creates a new class to validate the cleanup-token & set-account-service CLI utility.This test tries to cover all the psossible values that can be passed as user input valid/invalid. Change-Id: Ia8ca40ca9e63a296b70cb999c6507b7b1ffbdf61 Signed-off-by: Pushpesh Sharma <psharma@redhat.com> Reviewed-on: http://review.gluster.org/6759 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Provide more generic string in testAssert of some TCsPushpesh Sharma2014-01-211-12/+12
| | | | | | | | | | | | | | | CLI test case were failing on RHEL systems as the error string on Fedora19 and RHEL6.4 systems are different however a more gereric string is there on both of the systems and this is about that only. It replaces the 'ECONNREFUSED' & 'No address associated with hostname' with 'Check that the admin_url is valid'.Now the TCs pass on both of the OS. Change-Id: Iff8b2719e8917864ed8f80d961c55a7f9f6fc77b Signed-off-by: Pushpesh Sharma <psharma@redhat.com> Reviewed-on: http://review.gluster.org/6718 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Initial import of the swiftkerbauthChetan Risbud2014-01-2116-7/+2058
| | | | | | | | | | | | | | | Imported code till commit f64a3354185f32928e2568d9ece4a52fa4746c05 Changed a code bit to import correct definitions. kerbauth unit tests do run along with gluster-swift. Install script does install swiftkerbauth. import swiftkerbauth from http://review.gluster.org/swiftkrbauth.git Change-Id: Ia89f2b77cc68df10dee2f41ce074f3381ac3c408 Signed-off-by: Chetan Risbud <crisbud@redhat.com> Reviewed-on: http://review.gluster.org/6597 Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Sync with OpenStack v1.11.0 Jan 10 2014v1.11.0Luis Pabon2014-01-1513-264/+994
| | | | | | | | | | | | | Updated tox.ini, functional tests, and proxy unit tests. BUG: https://bugs.launchpad.net/bugs/1268017 Change-Id: I5ff8359b8abdb8fe5ae82492c12f57c395992735 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6682 Reviewed-by: Thiago da Silva <thiago@redhat.com> Tested-by: Thiago da Silva <thiago@redhat.com>
* fix error handing in swauth toolsThiago da Silva2014-01-149-45/+165
| | | | | | | | | | | | | The swauth tools did not handle an invalid admin_url, so it just failed printing the stacktrace, which is not useful to end users. This fix catches the exception and prints an error message that can help user solve the issue. Change-Id: I806c1cf191b5921e904b155f65cdbde5f2aac695 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6431 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Doc Fix for 1267718Pushpesh Sharma2014-01-143-0/+15
| | | | | | | | | | | | | | | | | | The following piece of documentaion is added to account,container,object.cong-gluster file "default gluster mount point to be used for object store,can be changed by setting the following value in {account,container,object}-server.conf files." BUG:https://bugs.launchpad.net/gluster-swift/+bug/1267718 Change-Id: I7993336b75637034f2cdaf3b41f0960220f7b390 Signed-off-by: Pushpesh Sharma <psharma@redhat.com> Reviewed-on: http://review.gluster.org/6680 Reviewed-by: Chetan Risbud <crisbud@redhat.com> Tested-by: Chetan Risbud <crisbud@redhat.com> Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Fix bug where admin is able to delete reseller_adminThiago da Silva2014-01-103-31/+223
| | | | | | | | | | | | | | | | | Changed the code to only allow the super_admin to delete a reseller_admin. This follows the same logic of user creation, where only the super_admin can create a reseller_admin. Also, took the opportunity to refactor some code and implemented get_user_detail method to remove duplicated code Bug 1260239: https://bugs.launchpad.net/gluster-swift/+bug/1260239 Change-Id: I9e4866cd7ad08698f427846be566ab2364ad4850 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6516 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* fixed gswauth cmd tools to require admin key argumentThiago da Silva2014-01-078-15/+35
| | | | | | | | | | | | | | | | All tools were changed to display the usage help text in case the admin key is not provided as an argument Bug 1261677: https://bugs.launchpad.net/gluster-swift/+bug/1261677 Change-Id: I37fa8518be970364b81955644931f6e416bcdc42 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6553 Reviewed-by: Prashanth Pai <ppai@redhat.com> Tested-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com> Reviewed-by: Luis Pabon <lpabon@redhat.com>
* Fix users not able to change their own password/keyPrashanth Pai2014-01-076-32/+323
| | | | | | | | | | | | | | | | | | | | | | | Users were not able to update their own password/key with the update operation resulting in 403 (HTTPForbidden). EXAMPLES: Command to update password/key of regular user: gswauth-add-user -U account1:user1 -K old_pass account1 user1 new_pass Command to update password/key of account admin: gswauth-add-user -U account1:admin -K old_pass -a account1 admin new_pass Command to update password/key of reseller_admin: gswauth-add-user -U account1:radmin -K old_pass -r account1 radmin new_pass BUG: https://bugs.launchpad.net/gluster-swift/+bug/1262227 Change-Id: I604da5aee67099b29541eb7e51a040a041f1961b Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6650 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Handle ENOSPC on os.close() operationPrashanth Pai2014-01-072-2/+17
| | | | | | | | | | | | | It is quite possible that errors on a previous write() operation are first reported at the final close(). For fruther info, refer to: http://review.gluster.org/#/c/6269/ Change-Id: If0fbe2f5109d28c82cb493f2526fd5057f86b556 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6608 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Unit test should use python 2.6 calls onlyLuis Pabon2014-01-071-1/+1
| | | | | | | Change-Id: I994b0e45d4fdb898378de7cd103f7e429a7fd9cc Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6662 Reviewed-by: Thiago Da Silva <thiago@redhat.com>
* Fixes,TCs for user/account operation by non super_admin usersPushpesh Sharma2014-01-061-96/+394
| | | | | | | | | | | | | | | | | | | This commit does following: 1.New functions in Utils based on CLI 2.Fixes for existing suite 3.Test cases for non super_admin users doing user/account operations I tried to cover most of the possible test cases that can be duducted from the swauth dev guide and swuath user role matrix.These resources can be found here: https://raw.github.com/rbeede/swauth/master/doc/source/Draft%20Security%20Guide/swift_swauth_roles_matrix.png http://gholt.github.io/swauth/dev/ Change-Id: I3267a718e5432cddc751ec53fe9b05ef9061a5e3 Signed-off-by: Pushpesh Sharma <psharma@redhat.com> Reviewed-on: http://review.gluster.org/6537 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* removing -s option from gswauth toolsThiago da Silva2014-01-062-16/+0
| | | | | | | | | | | | | | | | the --suffix option is not currently supported in this version of gswauth, so we are removing to not confuse users. Bug 1262230: https://bugs.launchpad.net/gluster-swift/+bug/1262230 Change-Id: I12da2aad5929f619f838c217330bef503b7e0ba2 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6542 Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Tested-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Chetan Risbud <crisbud@redhat.com>
* New info on user roles, swauth tools and authenticationThiago da Silva2013-12-191-60/+222
| | | | | | | | | | | | Adding new information to the authentication guide on how user roles are defined in gswauth. Also provided information on all gswauth tools and how to authenticate as a user. Change-Id: If565f4bfa9d112cdf7778f930cb4f75ee670d6c4 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6494 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* gswauth: Fix 403 being returned instead of 401Prashanth Pai2013-12-1812-44/+146
| | | | | | | | | | | | | | | | | | | | - 401(Unauthorized) is to be returned when user credentials are wrong where as 403(Forbidden) is to be returned when user credentials are correct but the user doesn't have the priveleges to carry out the operation. - Also error messages displayed when using swauth-* command line utilities have been updated. Change-Id: I485786896ad14d3263f4325d1857cacc93adab96 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6336 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com> Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6447 Reviewed-by: Thiago Da Silva <thiago@redhat.com> Tested-by: Thiago Da Silva <thiago@redhat.com>
* Fix double close issue in diskfileLuis Pabon2013-12-132-15/+35
| | | | | | | | | | | | | | | The DiskWriter was closing the file descriptor when it finished writing but initializing it to None. Therefore, the DiskFile context manager would then try to close it also. Change-Id: I188ec814d025e28c7b89532f0502ebf1d4a20a09 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6317 Reviewed-by: Peter Portante <pportant@redhat.com> Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com> Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6487
* updading quick start guide with Havana informationThiago da Silva2013-12-111-49/+36
| | | | | | | | | | Updatd links to point to havana builds as well as wording Changed 'Gluster for Swift' to 'Gluster-Swift' Change-Id: I60df2c6c1a6bb0dac529ac50f552fa262fb9ff23 Signed-off-by: Thiago da Silva <thiago@redhat.com> Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6297
* Fix minor typo in gswauth usage documentationPrashanth Pai2013-12-111-3/+6
| | | | | | | | | | Change-Id: I356f486c28da5c11ab1dec5d83a411f765c235f0 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6335 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com> Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6432
* CentOS python-2.6 fixesLuis Pabon2013-12-111-3/+3
| | | | | | | | | * Need to replace functions which are not supported in python 2.6 Change-Id: I4308f7c43a60fde9d8538b53422ddc18499dc1f9 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6457 Reviewed-on: http://review.gluster.org/6484
* renaming swauth tools to gswauthThiago da Silva2013-12-0613-47/+46
| | | | | | | | | | | | | | | | cli tools for account and user mgmt have been renamed from swauth-* to gswauth-* Updated other configuration and test files accordingly Change-Id: Iced3bb27fbd09da45754ddb264f8fb4528ab423c Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6417 Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com> Reviewed-by: Shilpa MJ <smanjara@redhat.com> Tested-by: Shilpa MJ <smanjara@redhat.com> Reviewed-by: Luis Pabon <lpabon@redhat.com>
* Bump to version 1.10.2Luis Pabon2013-12-051-1/+1
| | | | | | Change-Id: Ie92d8a8a692e5a9f618d58fefa69e0d90baae200 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6446
* Rebase to OpenStack Swift v1.10.0.172.g9fe7748v1.10.2-0v1.10.2Luis Pabon2013-12-055-78/+606
| | | | | | | | | | | * Updated Proxy unit test * Updated Functional tests * Updated Tox to point to the new swift snapshot available on http://launchpad.net/gluster-swift Change-Id: Ia91593c6a28d5a3fe70715ddc60546931ae71635 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6445
* Fix unit-tests failing in master branchPrashanth Pai2013-12-051-8/+8
| | | | | | | | | | | | | | Unit tests failed as upstream swift was updated with this commit: f0c0855ec8207fa8be63ed4f3135c8e29a31acc0 Updated gluster-swift unit tests accordingly. Change-Id: I286c807a17d79c2d9a21ee436f029a0f59cb9b7b Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6268 Reviewed-by: Peter Portante <pportant@redhat.com> Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* fix issue with swauth-clean-token returning 403 errorsThiago da Silva2013-12-052-4/+9
| | | | | | | | | | | | | | | The issue was due to missing a necessary change that was made when changing the auth account name from .auth to metadata volume. the auth account has a group of the same name, so the .auth account also had a .auth group, so we needed to change that too to the metadata volume (e.g., gsmetadata) Change-Id: Iaa3b7a1b2628f5b863807932e863593be0011a82 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6416 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Return BadRequest on X-Delete-At/After headersLuis Pabon2013-12-055-6/+149
| | | | | | | | | | | Gluster-swift does not support X-Delete-After or X-Delete-At headers. The code needs to inform the caller with a 400-BadRequest if they use these headers. Change-Id: Ic9d3a1646c0d26bb0204245efce4501f7479fee6 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6364 Reviewed-by: Chetan Risbud <crisbud@redhat.com>
* Fix test configuration fileLuis Pabon2013-12-053-1/+16
| | | | | | | | | | | | | All the configuration files were missing settings used when gluster-swift is installed Change-Id: I4ff877241a5965f2b0359e0549629614596045bb Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6430 Reviewed-by: Thiago Da Silva <thiago@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com>
* adding tabular output to swauth-listThiago da Silva2013-11-274-7/+34
| | | | | | | | | | | | swauth-list now shows lists of accounts, users and groups in a tabular format (default). JSON and plain-text options are still available Change-Id: I897009f5f6c05aa4c14e306bb6ad35234e993fcd Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6347 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Setup and run in a virtual environmentLuis Pabon2013-11-272-3/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using tox, developers can down drop into an environment which sets up and runs gluster-swift with gswauth authentication. The developer is then dropped into a shell which is running inside the tox environment. OpenStack Swift and Gluster-Swift are available to the developer. Once the developer exists the shell, the environment will be cleaned up and terminated. Usage: tox -e run Example: $ tox -e run GLOB sdist-make: /home/lpabon/gluster-swift/setup.py run inst-nodeps: /home/lpabon/gluster-swift/.tox/dist/gluster_swift-1.10.1-0.zip run runtests: commands[0] | bash tools/tox_run.sh Ring files are prepared in /etc/swift. Please restart object store services Redirecting to /bin/systemctl start memcached.service Starting proxy-server...(/etc/swift/proxy-server.conf) Starting container-server...(/etc/swift/container-server.conf) Starting account-server...(/etc/swift/account-server.conf) Starting object-server...(/etc/swift/object-server.conf) bash-4.2$ swauth-list -K gswauthkey {"accounts": [{"name": "test"}, {"name": "test2"}]} bash-4.2$ swauth-list -K gswauthkey test {"services": {"storage": {"default": "local", "local": "http://127.0.0.1:8080/v1/AUTH_test"}}, "account_id": "AUTH_test", "users": [{"name": "tester"}, {"name": "tester3"}]} bash-4.2$ swauth-list -K gswauthkey test tester {"groups": [{"name": "test:tester"}, {"name": "test"}, {"name": ".admin"}], "auth": "plaintext:testing"} bash-4.2$ exit exit Redirecting to /bin/systemctl stop memcached.service Signal proxy-server pid: 22862 signal: 15 Signal container-server pid: 22863 signal: 15 Signal account-server pid: 22864 signal: 15 Signal object-server pid: 22865 signal: 15 proxy-server (22862) appears to have stopped container-server (22863) appears to have stopped account-server (22864) appears to have stopped object-server (22865) appears to have stopped run: commands succeeded congratulations :) Change-Id: I98de5d1b1698b4cd355888f2c15a46df021a9e87 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6365 Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com>
* Man(8) page for gluster-swift-gen-builderChetan Risbud2013-11-252-0/+76
| | | | | | | | | | | | | | | | | | Man page provides details on gluster-swift-gen-builder script and its usage. Man page will be placed in section 8. Bug: 1001033 https://bugzilla.redhat.com/show_bug.cgi?id=1001033 Change-Id: Ie172173d3873256facb55eb3be0accebe360025e Signed-off-by: Chetan Risbud <crisbud@redhat.com> Reviewed-on: http://review.gluster.org/6294 Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com> Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Functional Tests for gswauth_cliPushpesh Sharma2013-11-202-0/+250
| | | | | | | | | | | | | | | | | | | | | | | This test suite plans to tests following gswauth commands:- 1. swauth-prep 2. swauth-add-account 3. swauth-delete-account 4. swauth-add-user 5. swauth-delete-user 6. swauth-set-account-service 7. swauth-cleanup-tokens 8. swauth-list It uses 'commands' python module to execute gswauthcommands, and capture the status and output of commands followed by asserts to verify if the captured status and output is same as expected ones.This initial draft has tests for first 1-5 commands. Change-Id: I8591884e87c6ffd88446aacd04a1db2daab2d189 Signed-off-by: Pushpesh Sharma <psharma@redhat.com> Reviewed-on: http://review.gluster.org/6277 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* fix metadata overwrite during a post requestThiago da Silva2013-11-203-43/+140
| | | | | | | | | | | | | | | During a post request, the object-server is ovewriting the existing object metadata. This fix prevents the overwrite of the system metadata while it allows for the user to add/remove user metadata Change-Id: Ic62cd064589b625ee425a9934be8766650622c13 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6254 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com> Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6315
* Multiple changes in 'gluster-swift-gen-builder'Chetan Risbud2013-11-191-8/+46
| | | | | | | | | | | | | | | | script now does some validation on accountnames and does not put forward anything on screen unless asked verbose, '-v'. Help text is also added and can be used with '-h' option. Bug: 1001033 https://bugzilla.redhat.com/show_bug.cgi?id=1001033 Change-Id: I26af27fc96c1b1b0b84319d8b8453dfa075a8c55 Signed-off-by: Chetan Risbud <crisbud@redhat.com> Reviewed-on: http://review.gluster.org/6121 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* fix error with swauth-clean-tokensThiago da Silva2013-11-192-1/+35
| | | | | | | | | | | | Error is caused by left-over code from swauth. It had hard-coded the auth account to .auth. Changed code to use volume specified in the config file Change-Id: Id00eb3964b6b26a84511e4753ab80b2dea5654da Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6280 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Improve logging and raising DiskFileNoSpacePrashanth Pai2013-11-156-11/+279
| | | | | | | | | | | | | | | | | | | | | | | | This commit only improves logging whenever ENOSPC (No space on disk) or EDQUOT (Quota limit exceeded) is returned by glusterfs Also, added methods to: - get filename from file descriptor - log with rate limit Caveat: Although raising DiskFileNoSpace results in object-server returning HTTPInsufficientStorage[507] correctly, the swift proxy-server invokes "best_response" method that returns [503] to the user. When write-behind translator is turned on in glusterfs, it may set errno to EIO instead of ENOSPC/EDQUOT. This is documented in BZ 986812 BUG: 985862, 985253, 1020724 Change-Id: Ib0c5e41c11a8cdccc2077f71c31d8a23229452bb Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6199 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6269
* Update RPM spec fileLuis Pabon2013-11-144-103/+92
| | | | | | | | | | | | | | | | | | | | | | Update the RPM file with the comments from submittal spec file to the Fedora Project. This update also differntiates between the project name 'gluster-swift' and the Fedora distribution name 'glusterfs-openstack-swift'. This simple changes makes it less confusing when downloading the source on http://launchpad.net/gluster-swift . For more information on the Fedora Project submittal status please see: https://bugzilla.redhat.com/show_bug.cgi?id=1003089 This fix also creates a tar.gz source file so that Jenkins can archive it. This can be used for distributions other than RPM based systems. Change-Id: Ia9b85d53cf576a7754aaa018396adb70cb0f2855 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6261 Reviewed-by: Thiago Da Silva <thiago@redhat.com> Tested-by: Thiago Da Silva <thiago@redhat.com>
* renaming instances of swauth to gswauthThiago da Silva2013-11-135-15/+15
| | | | | | | | | | | changed code where appropriate to gswauth instead of swauth Change-Id: Iadcec4f379fae3f063379b4899797b375290cc7b Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6226 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Functional TCs for Multi-Protocol AccessPushpesh Sharma2013-11-101-2/+101
| | | | | | | | | | | | | | | | 1.testObjectsFromMountPoint verifies the directory structure from mount point that is created by REST This test uses os,re and other python modules. It assumes the root directory is /mnt/gluster-object 2.testObjectContentFromMountPoint check md5 sum computed from mount point is same as etag. Change-Id: I676218c9b828022f599f4dea7ad0284777fc0506 Signed-off-by: Pushpesh Sharma <psharma@redhat.com> Reviewed-on: http://review.gluster.org/6208 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* new gswauth functional testsThiago da Silva2013-11-101-8/+120
| | | | | | | | | | | New tests around account and user modifications Testing password changes and invalid admin rights Change-Id: I2e867c2bb3ed10f375cc3f20fa66506e2cdd96e6 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6223 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
* Update auth_guide.mdThiago da Silva2013-11-101-0/+95
| | | | | | | | | | adding first draft of gswauth section to authentication guide Change-Id: I801c9f4add18a5e5f5c735e61cf99fc3a5b935c2 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6222 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>