Commit Graph

215 Commits

Author SHA1 Message Date
Pushpesh Sharma d7af44b204 Provide more generic string in testAssert of some TCs
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: I3ba0f169dddf29368f0adb74027256dcdc894b89
Signed-off-by: Pushpesh Sharma <psharma@redhat.com>
Reviewed-on: http://review.gluster.org/6719
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2014-01-21 10:12:02 -08:00
Luis Pabon 63315ccecd Fixed tox issues with new versino of Pip
BUG: https://bugs.launchpad.net/bugs/1268017

Change-Id: Ifce6cc992e49f6824c75d07069b335e208e960d8
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/6702
2014-01-15 11:27:57 -08:00
Chetan Risbud 569f8e613e Release 1.10.0-3
Change-Id: I33f8e78c80da4609796c109a983c78e65170ee33
Signed-off-by: Chetan Risbud <crisbud@redhat.com>
Reviewed-on: http://review.gluster.org/6710
2014-01-14 23:41:00 -08:00
Thiago da Silva bf643c4916 fix error handing in swauth tools
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>
Reviewed-on: http://review.gluster.org/6707
Reviewed-by: Chetan Risbud <crisbud@redhat.com>
Tested-by: Chetan Risbud <crisbud@redhat.com>
2014-01-14 23:06:44 -08:00
Pushpesh Sharma 41c7bbcc74 Doc Fix for 1267718
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: Icbdf7287153152e0173cef00b5336361081151c3
Signed-off-by: Pushpesh Sharma <psharma@redhat.com>
Reviewed-on: http://review.gluster.org/6692
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2014-01-14 12:06:55 -08:00
Thiago da Silva df6b4adfc5 Fix bug where admin is able to delete reseller_admin
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>
Reviewed-on: http://review.gluster.org/6690
Reviewed-by: pushpesh sharma <psharma@redhat.com>
Tested-by: pushpesh sharma <psharma@redhat.com>
2014-01-14 11:55:03 -08:00
Pushpesh Sharma 4c3ac4b341 Fixes,TCs for user/account operation by non super_admin users
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: I45d99252825b82008abb679cffcc980732c815ea
Signed-off-by: Pushpesh Sharma <psharma@redhat.com>
Reviewed-on: http://review.gluster.org/6676
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2014-01-10 07:45:10 -08:00
Chetan Risbud f67937757a Release 1.10.0-2
Change-Id: I5b686fb74124fb9392b647b1198730113f9e05ac
Signed-off-by: Chetan Risbud <crisbud@redhat.com>
Reviewed-on: http://review.gluster.org/6670
2014-01-08 22:35:34 -08:00
Thiago da Silva a2381549c7 fixed gswauth cmd tools to require admin key argument
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>
Reviewed-on: http://review.gluster.org/6664
Tested-by: Luis Pabon <lpabon@redhat.com>
2014-01-08 04:11:20 -08:00
Prashanth Pai c3c46d6188 Fix users not able to change their own password/key
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>
Reviewed-on: http://review.gluster.org/6668
Reviewed-by: Chetan Risbud <crisbud@redhat.com>
Tested-by: Chetan Risbud <crisbud@redhat.com>
2014-01-08 03:30:36 -08:00
Prashanth Pai f81f652899 Handle ENOSPC on os.close() operation
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>
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/6666
Tested-by: Chetan Risbud <crisbud@redhat.com>
Reviewed-by: Chetan Risbud <crisbud@redhat.com>
2014-01-08 03:07:16 -08:00
Thiago da Silva 2931f64a92 removing -s option from gswauth tools
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>
Reviewed-on: http://review.gluster.org/6660
Tested-by: Chetan Risbud <crisbud@redhat.com>
2014-01-07 19:29:02 -08:00
Thiago da Silva 15dd7c56f7 updading quick start guide with Havana information
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
Reviewed-on: http://review.gluster.org/6554
2014-01-06 18:29:31 -08:00
Thiago da Silva 788fe19b9d New info on user roles, swauth tools and authentication
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>
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Reviewed-on: http://review.gluster.org/6555
Reviewed-by: Prashanth Pai <ppai@redhat.com>
2014-01-06 18:29:17 -08:00
Prashanth Pai e61f396cc7 Fix typo and add comment
Fix spelling of "privileges" in gswauth-* commands.
Add comment to clarify use of req.credentials_valid.

Change-Id: Ibb4d331f57df29e28670252b1360b3a72ea688cf
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/6448
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-12-16 08:09:38 -08:00
Luis Pabon caeabbb85e Release 1.10.0-1
Change-Id: Ied2dabfa2a91b84290d7d2631b7a56a664865406
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/6486
2013-12-11 10:42:56 -08:00
Luis Pabon 495efaff9d CentOS python-2.6 fixes
* 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
2013-12-11 04:17:48 -08:00
Thiago da Silva 6cbe54cea2 fix issue with swauth-clean-token returning 403 errors
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>
Reviewed-on: http://review.gluster.org/6465
2013-12-11 04:13:12 -08:00
Thiago da Silva cc2b0b7ae5 renaming swauth tools to gswauth
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>
Reviewed-on: http://review.gluster.org/6466
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-12-11 04:12:10 -08:00
Luis Pabon f3c8c36cdd Return BadRequest on X-Delete-At/After headers
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>
Reviewed-on: http://review.gluster.org/6444
2013-12-05 11:47:20 -08:00
Pushpesh Sharma 74d0b1ca0d Functional TCs for Multi-Protocol Access
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>
Reviewed-on: http://review.gluster.org/6443
2013-12-05 09:55:56 -08:00
Prashanth Pai fc9124caf4 gswauth: Fix 403 being returned instead of 401
- 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>
2013-12-05 09:15:40 -08:00
Luis Pabon 0eb79aad36 Fix test configuration file
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>
Reviewed-on: http://review.gluster.org/6439
2013-12-05 07:19:37 -08:00
Thiago da Silva db63e2e599 adding tabular output to swauth-list
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>
Reviewed-on: http://review.gluster.org/6372
2013-11-29 14:01:11 -08:00
Luis Pabon 6474e030bf Setup and run in a virtual environment
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>
Reviewed-on: http://review.gluster.org/6371
2013-11-27 06:55:48 -08:00
Chetan Risbud ae818dd454 Man(8) page for gluster-swift-gen-builder
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>
Reviewed-on: http://review.gluster.org/6352
2013-11-26 05:39:45 -08:00
Luis Pabon 5bd7bfacb2 Fixed incorrect revision in Havana
Havana is supposed to be 1.10.0-X, but it was 1.10.1-X like
Icehouse.

Change-Id: I06c4ee7db5575b9d0674c0b95bf01becf27fdc21
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/6346
2013-11-25 18:43:14 -08:00
Prashanth Pai 4fafbca466 Fix minor typo in gswauth usage documentation
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>
2013-11-25 18:42:10 -08:00
Luis Pabon 7095f1c654 Fix double close issue in diskfile
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>
2013-11-22 09:31:50 -08:00
Pushpesh Sharma f4c0ab5b98 Functional Tests for gswauth_cli
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>
Reviewed-on: http://review.gluster.org/6327
2013-11-21 05:44:08 -08:00
Luis Pabon b46dc3ae9c Log only non-ENOENT errors in diskfile
DiskFile.open() gets called for every PUT.  The expected sideeffect
is that if the file exists, the metadata in the object will be
populated.

DiskFile.open() was logging any errors it detected while trying
to open() the file.  Issue is that when we PUT a new file, there
is no entry, and open() will return an error.  The was incorrectly
logging each one of these errors.

Change-Id: I7d721df177761066fdaa46d278fff2d779924999
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/6316
Reviewed-by: Thiago Da Silva <thiago@redhat.com>
Reviewed-by: Peter Portante <pportant@redhat.com>
Tested-by: Prashanth Pai <ppai@redhat.com>
2013-11-21 05:06:33 -08:00
Thiago da Silva 3f504879c4 fix error with swauth-clean-tokens
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>
Reviewed-on: http://review.gluster.org/6312
2013-11-20 11:38:10 -08:00
Chetan Risbud adb7301b23 Multiple changes in 'gluster-swift-gen-builder'
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>
Reviewed-on: http://review.gluster.org/6310
2013-11-20 06:09:02 -08:00
Thiago da Silva 870a6e6226 renaming instances of swauth to gswauth
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>
Reviewed-on: http://review.gluster.org/6278
2013-11-15 19:57:13 -08:00
Luis Pabon 477b4a9e56 Update RPM spec file
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/6265
Reviewed-by: Thiago Da Silva <thiago@redhat.com>
Tested-by: Thiago Da Silva <thiago@redhat.com>
2013-11-14 15:14:23 -08:00
Thiago da Silva 53fda6b5e0 new user related gswauth functional tests
New tests around account and user modifications
Testing password changes and invalid admin rights

porting changes to havana branch

Change-Id: I2e867c2bb3ed10f375cc3f20fa66506e2cdd96e6
Reviewed-on: http://review.gluster.org/6223
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/6260
2013-11-14 13:39:19 -08:00
Thiago da Silva 2282142e4f fix metadata overwrite during a post request
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>
2013-11-14 13:38:56 -08:00
Prashanth Pai a43de0dc5b Improve logging and raising DiskFileNoSpace
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>
2013-11-14 11:02:19 -08:00
Thiago da Silva 7aa628033d refactoring add/remove account and user tests
These tests cover account registration and de-registration
user creation/delete, and listing of both account and user.

Some functions were renamed to better represent their purpose
and make them generic enough to be used by other tests

Change-Id: Ie622daccfc8e2d2fb45565952a99d7d832ce1189
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Reviewed-on: http://review.gluster.org/6212
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/6257
2013-11-14 10:00:05 -08:00
Thiago da Silva b0497ce11d make gluster volume name configurable
changed code to look at configuration file for
the metadata gluster volume name. The default is still
gsmetadata

Change-Id: I9bf74b9566ea1c9716c42f7ced0f999e02824868
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Reviewed-on: http://review.gluster.org/6225
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/6258
2013-11-13 13:00:31 -08:00
Thiago da Silva 48046e5822 Update auth_guide.md
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>
Reviewed-on: http://review.gluster.org/6259
2013-11-13 12:59:24 -08:00
Luis Pabon 9e8e2275e2 Keystone Functional Tests
Functional tests using OpenStack Keystone Authentication.  Tests
require the following:
1. Keystone server is running locally
2. Keystone server has been setup according to the test.conf
3. /mnt/gluster-object has the directories setup

Change-Id: I460471e549da91366cb817916ed5293c7e7adda4
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/6218
Reviewed-by: Peter Portante <pportant@redhat.com>
Tested-by: Peter Portante <pportant@redhat.com>
Reviewed-on: http://review.gluster.org/6224
2013-11-05 14:31:53 -08:00
Thiago da Silva 621c8b2327 first gswauth functional tests
commiting first gswauth functional tests.
Currently there are two tests, to create account
and to create an user. Each test is self contained
in that it goes through the process of creating and deleting
accounts and users as needed.

More tests will be added shortly.

Change-Id: I26d577790aed8c79c9de11f224516423e9769962
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Reviewed-on: http://review.gluster.org/6188
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/6211
2013-11-04 11:48:33 -08:00
Luis Pabon 3d68776d35 Havana Release
Change-Id: I0595d451cd3ed08b3a47757a3166d7556e6ae868
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/6160
2013-10-28 13:25:19 -07:00
Luis Pabon bf4689fe75 Changed to havana branch
Change-Id: Icfae6d4c02be452aa9debea9b12adc8771b33500
Signed-off-by: Luis Pabon <lpabon@redhat.com>
2013-10-28 15:01:30 -04:00
Peter Portante 286a1308db Rebase to OpenStack Swift Havana (1.10.0)
Change-Id: I90821230a1a7100c74d97cccc9c445251d0f65e7
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/6157
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-10-28 11:51:51 -07:00
Thiago da Silva 6b8d7c5919 moving functional tests to prepare for auth tests
moved the actual tests to generic folder and created
an auth dir that will contain specific tests and configuration
files for each authentication service

Change-Id: I80debb917a53c3f56629b92cf5e7157da916d223
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Reviewed-on: http://review.gluster.org/6140
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-10-25 19:34:47 -07:00
Peter Portante 04e402599b Sync functional tests with Swift v1.9.1
Change-Id: Id478f651fe937883837291059da9da853fcd2de2
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/6141
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-10-25 10:57:40 -07:00
Thiago da Silva b48149a4af applied changes made by Luis Pabon to support gluster-swift
The current changes support only one account per volume
The next changes will be made to add support for multiple accounts
Also modified unit tests that were failing after code changes.
Original changes were made here: https://github.com/lpabon/swauth/tree/gluster-swift

Change-Id: I5577d7dc042fc22de8625c8bdf30329cc3338cb9
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Reviewed-on: http://review.gluster.org/6107
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-10-24 11:49:23 -07:00
Prashanth Pai ade571006d Deploy Apache as web front-end for gluster-swift
Swift can alternatively be configured to work as a request processor of
Apache server. This alternative deployment scenario uses mod_wsgi of
Apache to forward requests to the swift wsgi application and middleware.

'client' <---> 'Apache2+mod_wsgi' <---> 'middleware' <---> 'core swift'

Change-Id: If396dcbdf651af0dce55b951cd2eaadc6783384f
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/6116
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-10-23 18:54:17 -07:00