37 Commits

Author SHA1 Message Date
Prashanth Pai
aa1bfb3e67 Rebase to Swift 2.2.1 release
NOTE:
The previous rebase was to Swift 2.1.0 and this rebase is to
Swift 2.2.1 (first release in kilo series). There was a
Swift 2.2.0 (last release in juno series) release in between.

Change-Id: Ibce2e299935e165db89a91a6fe8c4c5c027db098
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2015-02-02 11:17:59 +05:30
Prashanth Pai
52e764ecab Rebase swiftonfile to swift 2.1.0 release
Change-Id: I10776fe7d4e3069201775ec6ceae96fd3db32125
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-10-07 02:02:01 +05:30
Thiago da Silva
f482f2fdf4 Updating SwiftOnFile version to release 2.0
Updated sof version and tox swift dependency to
release 2.0.
Also, made some documentation changes to the object-server
configuration sample file to point out that volume must
mounted before starting sof object-server.

Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-08-18 13:20:15 -04:00
Thiago da Silva
de24352275 changing references of gluster to swiftonfile
Renamed files and directories as well as replaced
infile references to gluster where appropriate

Signed-off-by: Thiago da Silva <thiago@redhat.com>
2014-07-08 11:04:31 -04:00
Prashanth Pai
e5d939bdce Support Storage Policy - Rev 8
* Added a version of .functests script that does not replace existing
  SAIO conf files and rings. This expects the appropriate setup to be
  ready before running functional tests.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-06-26 17:38:02 +05:30
Prashanth Pai
8ea7bd718d Support Storage Policy - Rev 5
* Sync to Swift 2.0.0rc1 release.
* Use separate conf files for functional tests
* Define swiftonfile as policy with index 2

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-06-23 15:08:35 +05:30
Prashanth Pai
d91e33a0f4 Support Storage Policy - Rev 4
Added Swift On File specific functional tests that checks SoF's
object naming convention by comparing names of objects PUT and
actual files found over mountpoint.

Remove old reference to keystone functional tests.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-06-23 12:22:43 +05:30
Prashanth Pai
abf0641e40 Support Storage Policy - Rev 3
* Functional tests now run in SAIO+SoF setup.
* Fix and update various constraints.
* Update object-server.conf, swift.conf files. Add test.conf file.
* Added ./.functests script

TODO:
* Reintroduce gluster_swift_tests.py with SoF
  specific functional tests.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-06-23 12:22:43 +05:30
Prashanth Pai
3f4d0f98de Support Storage Policy
* The file path on mountpoint was /container/obj and has been changed to
  /account/container/obj. This structure is not created on account and
  container creation but rather during the first object PUT to that
  container.
* Rename OnDiskManager class to DiskFileManager
* Remove overridden container_update() method and use Swift's default
  implementation that updates container DB.
* Add support for async_dir in storage policies - failed database
  updates are stored in these directories to be later picked up by
  object-updater daemon. This change reintroduced write_pickle and
  pickle_async_update methods which are slightly modified versions
  of Swift's methods of the same name.
* Updated tox.ini dependency on Swift to point to feature/ec branch of
  Swift's github repo.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-06-23 12:22:42 +05:30
Prashanth Pai
ba39ade716 Remove non SP related code
This commit only removes code that is not required when swiftonfile
will be used as Storage Policy in Swift.

This commit does NOT:
* include code changes to support SP
* fix functional tests
* update documentation related to SP

This commit removes the following:
* Gen builders script and its man page.
* Authentication guide, user guide and other docs.
* Swiftkerbauth code, unit tests, func tests and doc.
* gswauth code, unit tests, func tests and doc.
* Object expirer code modifications, unit tests and doc.
* Conf files of account, container, proxy.
* Account, container and proxy server code - server.py of each.
* Account, container and proxy unit and functional tests.
* DiskDir class and corresponding unit tests.
* Our overridden ring.py (enforces account = volume = device) and tests.
* Functional tests for authentication filters.
* modules/swift and test/deploy directories.
* Proxy base controllers unit tests.

NOTE: We may have to reintroduce some of the above functional and unit
tests after SP related code changes - during fixing functional tests.

This commit modifies:
* setup.py to reflect the above code removals.
* constraints.py to remove references to ring.py
* object server.py to remove object-expirer changes
* tox.ini to remove ksfunctest and swfunctest

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2014-06-23 12:22:42 +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
Chetan Risbud
2505d82815 Functional tests for SwiftKerbAuth filter.
This provides an infrastructure for swiftkerbauth
related functional test cases.
More test cases will be added later.
Added a section in swiftkerbauth guide about how to run
functional tests.

test/functional_auth/swiftkerbauth
----------------------------------

A new authentication filter related functional
tests and configuration to reside here.
The configuration would help setup the
environment. All the generic functional tests
should run fine with PASSIVE mode of swiftkerbatuh.
Please refere to swiftkerbatuh documentation for
ACTIVE/PASSIVE mode of working.

swiftkerbauth/test_swkrbath_active.py
-------------------------------------
This file has all the testcases of active mode of
swiftkerbauth. More test cases to be added later.

SwiftKerbAuth related test cases are meant to run
on the setup where SwiftKerbAuth is setup and
installed.

Change-Id: Ibc2a3945f5c9b6714475fcec0ee9d153debb48e3
Signed-off-by: Chetan Risbud <crisbud@redhat.com>
Reviewed-on: http://review.gluster.org/6925
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2014-03-14 11:56:15 -07:00
Prashanth Pai
2ccd2c4d96 Sync with OpenStack Swift v1.13.0
Also, bumped version of gluster-swift to v1.13.0

Change-Id: I797dc704c9523540cba847b1e8ff3da97b79630c
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/7229
Reviewed-by: Chetan Risbud <crisbud@redhat.com>
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2014-03-13 05:09:19 -07:00
Luis Pabon
d5ebf36f7e Sync with OpenStack Swift v1.12.0
* 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>
2014-02-16 22:08:06 -08:00
Luis Pabon
6a8e9a70e9 Sync with OpenStack v1.11.0 Jan 10 2014
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>
2014-01-15 11:28:08 -08:00
Luis Pabon
bc9bdcf25b Rebase to OpenStack Swift v1.10.0.172.g9fe7748
* 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
2013-12-05 14:13:57 -08:00
Luis Pabon
3796a1c757 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>
2013-11-27 04:37:11 -08:00
Luis Pabon
2bd930bb44 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>
2013-11-04 13:46:25 -08:00
Thiago da Silva
9f8d2e61a7 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>
2013-10-30 16:57:46 -07:00
Peter Portante
100d6b01bd Rebase to lastest OpenStack Swift DiskFile API
As of October 28th, 2013, we rebase to OpenStack Swift master (commit
4bfe674) to pick up the lastest officially supported DiskFile API
changes. We use a snapshot of OpenStack Swift stored in the
gluster-swift launchpad downloads area so that we can deliberately
rebase at our own pace.

With this refactoring, all the code for handling I/O is wholly
contained in the swift tree for object operations. This will allow us
to use a different fs_utils implementation in the future (for example,
one based on a yet-to-be-implemented python bindings over libgfapi).
This also means the "Fake_file" class has been removed entirely.

Change-Id: I767983f88c59786e30b6c64da16d1cb6ab3c3e7f
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/5993
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-10-29 07:25:59 -07: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
c86bf48f72 fixing pep8 tests for new gswauth middleware
Formatted original swauth code to pass pep8 tests.

Change-Id: I7c63a102ece44e8331137d1d5576a58588fe53e2
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Reviewed-on: http://review.gluster.org/6087
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-10-16 10:28:44 -07:00
Prashanth Pai
d2b9657bcf Make setup.py pep8 compliant
Change-Id: I7d935203a3fbb59d298f91daaef0a10ca3004d2f
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/6045
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-10-15 16:26:59 -07:00
Prashanth Pai
5cd60a1ac0 Remove swiftkerbauth.py from tox.ini
Change-Id: Ib73e0f86a8c6d80495ab966255f9143b20cdfb90
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/6038
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-10-14 20:14:28 -07:00
Luis Pabon
ac1ac5bd21 GSWauth authentication to be based on SWauth
We are planning on creating a GlusterFS aware authentication
system for gluster-swift based on SWauth.

We forked from SWauth commit
41d36ebe160aa3346f6f45197fff0c80f38fde58

Change-Id: Ia28730d21e04fc8d9ce0cb317fc04d0d97583fca
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/6069
2013-10-13 19:36:20 -07:00
Thiago da Silva
46cd43fdf4 Adding new unit tests and removed some unused functions
New unit tests help improve test coverage of common/Glusterfs.py code
Also removed a function that was no longer being used.

Change-Id: Iaa0eed3d2b9ffcc148c1e00b28322ebf93b3f13c
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Reviewed-on: http://review.gluster.org/6053
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-10-10 13:42:31 -07:00
Thiago da Silva
2d56bc3803 fixing tox requirements
Old link to download swift 1.9.1 is broken, updated to download directly

Change-Id: I02401c4f243376b58940b13e212d6dfafc1c76c9
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Reviewed-on: http://review.gluster.org/6060
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-10-09 16:47:03 -07:00
Luis Pabon
b8bc402508 Use tox to satisfy functional test requirements
Instead of installing and polluting the host development system
with the required packages to run the functional tests, it is
now possible to run the functional tests from inside tox.  All
the required packages are installed in the tox environment and
run from there.

The only external dependencies are that the functional tests
still must use /etc/swift for configuration files on the host
and /mnt/gluster-object must be on a XFS or GlusterFS volume.

Change-Id: I4a949dbcad778018e22c61d09ae1ba5f21a03aec
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/5976
Reviewed-by: Peter Portante <pportant@redhat.com>
Tested-by: Peter Portante <pportant@redhat.com>
2013-09-20 12:51:17 -07:00
Luis Pabon
3609471ada Tests should depend on PIP instead of Yum
Unit tests now use pip to install the desired version of
pip.  Functional tests have been changed to use pip instead
of yum to install the desired version of pip.

Change-Id: I4ccc743385fb4258549c115e575c8834fd4d0561
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/5853
Reviewed-by: Peter Portante <pportant@redhat.com>
2013-09-10 11:55:03 -07:00
Prashanth Pai
53bb81c585 Include extras/ dir in flake8 source code check
Moving forward all python scripts in extras/ are to
be checked for pep8 compliancy.

Change-Id: I4f20c1c97590049ba59fd432cbabba89df101e81
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/5714
Reviewed-by: Peter Portante <pportant@redhat.com>
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-08-28 19:15:59 -07:00
Peter Portante
9d4e67e741 Updates to support Havana interim version 1.9.1.
The code changes are basically:

  * Apply refactoring in the DiskFile class to use the new DiskWriter
    abstraction

    * Move and rename our diskfile module to match upstream

  * ThreadPools allow us to remove the tpool usage around fsync

  * Update the Ring subclass to support the get_part() method

  * Update to use the 1.9.1 proxy server unit tests

    * Move the DebugLogger class to test.unit

  * Rebuild the Rings to use the new layout

    * Remove backup ring builder files

  * Update spec files to 1.9.1, and tox to use swift 1.9.1

  * Updated version to 1.9.0-0

Change-Id: Ica12cac8b351627d67500723f1dbd8a54d45f7c8
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/5331
2013-08-21 19:38:35 -07:00
Peter Portante
50e1660f5b Add branch coverage, HTML pages, verbosity
Running the unit tests outside of tox is useful since one can use the
python debugger, pdb, to step through failing tests to find out what
is wrong. Having it conveniently generate the coverage HTML reports
avoids running tox just to get that data.

We also add support for branch coverage, which will be highlighted in
the HTML reports.

Change-Id: Iccc7cd12efff8c136702638c8cb2fdca5d5d680b
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/5134
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-06-03 14:02:30 -07:00
Peter Portante
b291641985 Add DiskDir unit test skeleton and pep8 filter
The new DiskDir unit test skeleton is quite incomplete, but gets the
DiskDir module on the board for modules covered, explicitly exposing
the fact that we need to get test coverage. This is a first step.

At the same time, we also update all the modules we have applying the
fix for pep8 errors now run under tox. We can then add a Jenkins
pre-commit job to fail on pep8 errors. This brings our code to parity
with what they are doing in OpenStack Swift.

Change-Id: Ia0565606512efda6e73f67bd00269177b89db858
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/5080
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-05-24 12:08:18 -07:00
Peter Portante
b12f8f5dbf Generate coverage HTML reports by default.
Change-Id: I840a379bce93df52e7725b87c6bd6ee95fcdbebd
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/5031
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
2013-05-17 12:53:40 -07:00
Peter Portante
dc35ead3b2 Enable JUnit test output for deeper integration with Jenkins
We also enable XML output for coverage reports.

Change-Id: Ide5057f089f7b6271910be042b510d3b4e149a31
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/4984
Reviewed-by: Peter Portante <pportant@redhat.com>
Tested-by: Peter Portante <pportant@redhat.com>
2013-05-10 20:18:10 -07:00
Peter Portante
3a75da67cb Remove "ufo" directory, promoting contents to top-level
Additionally, we drop the "ufo" references from setup.py, spec file
and README, and add the HISTORY file describing how the repo was
initially created. We also update the RPM spec file to use the name
"gluster-for-swift" to avoid colliding with existing RPM names from
RHS 2.0 (the spec file's description was also updated, along with
the version number).

Change-Id: If804224a94208d57896e4189c63736ffc9e01d5e
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/4966
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Reviewed-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Peter Portante <pportant@redhat.com>
Tested-by: Peter Portante <pportant@redhat.com>
2013-05-10 07:12:08 -07:00