diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b5957ca --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.tox +gluster_swift.egg-info +test/unit/.coverage +build diff --git a/HISTORY b/HISTORY new file mode 100644 index 0000000..dcc4ce3 --- /dev/null +++ b/HISTORY @@ -0,0 +1,160 @@ +This git repository is a child (of sorts) of the git.gluster.com/glusterfs.git +repository, where origins of its contents come from the "swift" and "ufo" +directories of its parent repository. The goal was to acknowledge that the +gluster-swift integration work is in fact a separate and independent coding +effort intersecting at the packaging level with GlusterFS upstream and its +derivative products, for example, Red Hat's RHS. + +To create this repository, we followed the steps below (in pseudo script +form), which assumes that one is using an up-to-date glusterfs.git +locally-cloned repository: + +$ # +$ # First list all of the changes to the "ufo" directory: +$ # +$ git checkout master +$ git log --oneline ufo +6d6205e object-storage: provide more common cfg defaults +bf7b83d object-storage: cleanup err handling in Glusterfs. +bbaa273 object-storage: turn off stat() for container list +6a7d28c object-storage: use tox for unit tests; fix em too +a56dca9 object-storage: Import missing sys and errno modules. +93175bd Adds missing functions to ring.py, and more thorough tests. +790cbb8 object-storage: Removed the redundant REMOTE_CLUSTER option. +ee5df68 object-storage: Fixing the errors and warnings in unittest. +598ca6b object-storage: Restoring multi volume support in UFO. +311a5df object-storage: Use the wrapper functions provided by fs_utils.py to make system calls. +6a6ec98 object-storage: Store the lock file in /var/run/swift. +189eaec object-storage: yield during directory tree walks +16d2801 object-storage: use temp file optimization +8b87819 object-storage: add UFO unit tests +cdcbc5b object-storage: only open file when requested +a1f4a41 object-storage: don't sort object list, not req'd +10ef8ef object-storage: do not list directory for delete +1338ad1 object-storage: apply upstream DiskFile refactor +2fd8af2 object-storage: a set of cleanups to DiskFile +47e21af object-storage: Initial unittest of DiskFile class +0c9f4d1 object-storage: unit tests to 100% cover utils +29c23f2 object-storage: use temp file optimization for pkl +c399ca2 object-storage: Use "-dev" in the version string +7f9adbe object-storage: enforce RPM package dependencies +a8d5907 object-storage: fix account mapping +3d83e6c Replace "ssh foo gluster" with "gluster --remote-host=foo" +f35d192 object-storage: Add a sorted list comparison to test +a64a0d8 object-storage: del 1.4.8 ref from dir hierarchy +$ # +$ # Notice that it only goes back to the point where the "swift" +$ # directory was renamed to "ufo", so we need to checkout the +$ # previous revision by: +$ # +$ git log --oneline | grep -C 1 -F "del 1.4.8" +1f64e5e gsyncd / geo-rep: include hostname in status cmd +a64a0d8 object-storage: del 1.4.8 ref from dir hierarchy +94ddaec Don't ignore all files that match (*o|*la|*lo) +$ git checkout 94ddaec +$ git log --oneline swift +1129698 object-storage: final changes to remove swift diff +e8d9565 object-storage: refactor to use swift devices +05cc14c object-storage: make proper refs to module vars +b696fc0 object-storage: reduce diffs, bury metadata update +ffc7618 object-storage: swift-diff removal: hide obj only +89aff74 object-storage: fix trailing whitespace +d2040d1 object-storage: remove the device and part params +6bd81f2 object-storage: only update metadata that changes +7066b49 object-storage: DiskAccount subclassing of DiskDir +92fed12 object-storage: fix bad refs to check_acct_exists +f3daa0b object-storage: fix bad refs to REMOTE_CLUSTER +ee28eae object-storage: rename self.name to self.container +7fa7029 object-storage: unused parameter cleanup & handl'n +a1fd8c8 object-storage: add missing docs for params +a6b51d6 object-storage: minor code cleanups +b0cb7aa object-storage: remove glusterfs filter requirement +cae3216 object-storage: use constants for directory names +6478b56 object-storeage: refactor to use one memcache key +5c272f4 Minor refactorings to mark an internal routine +8534cd5 Reduce the number of stat/fstat system calls made +4f6aeb6 Further reduce extended attribute reads/writes +3ab5404 Move _add_timestamp() closer to where it is used +1a013e3 object-storage: reduce the number of getxattr system calls by one +5110fc0 object-storage: Bump size of metadata stored per xattr key +2b80439 object-storage: Don't catch generic exceptions around xattr calls +dbe793b object-storage: Refactor code to reduce Swift diffs carried +22050e5 object-storage: change logging of some errors to warnings +ddb4652 Remove the test subdirectory diffs ahead of initial refactoring. +49a3d88 Reduce the number of gratuitous differences in constraints. +3c05477 Fix BZ 865858: remove unnecessary system calls around xattr ops +49fad94 Refactor to use pyxattr's get/set/remove methods +a9c613d Fix a small typ-o in the Swift README +72301d4 swift: Donot display async_pending container. +bf7634c swift: Fix for multiple mounts on the same mount point. +93893b9 swift: Passing account name in container_update. +530a44a swift: Gluster object storage plugin for Openstack Swift. +$ # +$ # Now we see that we have the entire history above. +$ # +$ # Next we need to generate patch files to apply to a clean tree. +$ # To do that, we start by listing the patches for the swift tree +$ # in reverse order and explicitly requesting a numbered format- +$ # patch: +$ let idx=1 +$ for i in $(git log --oneline --reverse swift | awk '{ print $1 }') ; do +$ git checkout $i +$ git format-patch --start-number $idx -1 +$ ((idx++)) +$ done +$ # +$ # Then we need to switch back to top-of-tree and do the same for +$ # the "ufo" directory: +$ # +$ git checkout master +$ for i in $(git log --oneline --reverse ufo | awk '{ print $1 }') ; do +$ git checkout $i +$ git format-patch --start-number $idx -1 +$ ((idx++)) +$ done +$ # +$ # At this point we have a set of sequentially numbered diffs that +$ # can be applied to any git repo ... with two exceptions: patches +$ # 0056-*.patch and 0061-*.patch have references to files that do not +$ # exist ahead of time, so one has to edit out the cli* and .gitignore +$ # diffs from those two patches, respectively, and then one can run +$ # the following command to create a new repo: +$ # +$ cd /tmp # Or what ever directory you want to store the new repo in +$ mkdir newdir +$ cd newdir +$ git init +$ git am /path/to/*.patch # ... generated above +$ git remote add -f origin ssh://@git.gluster.com/gluster-swift.git +$ git pull --no-commit origin master +$ # +$ # By default, a git pull will provide its own commit message, but +$ # we list one below to be explicit in case some environments don't +$ # have the proper "editor" set. +$ # +$ git commit -s -m "Merge up to master before committing initial changes" +$ # +$ # Once we have "Push" commit rights, the following updates the tree: +$ # +$ git push origin master +Counting objects: 660, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (584/584), done. +Writing objects: 100% (659/659), 158.15 KiB, done. +Total 659 (delta 316), reused 0 (delta 0) +remote: Resolving deltas: 100% (316/316) +remote: Processing changes: refs: 1, done +remote: (W) ce1fd47: commit message lines >70 characters; manually wrap lines +remote: (W) cfb17e8: commit subject >65 characters; use shorter first paragraph +remote: (W) c48dcdc: commit message lines >70 characters; manually wrap lines +remote: (W) dd826e2: commit message lines >70 characters; manually wrap lines +remote: (W) b85ce6f: commit message lines >70 characters; manually wrap lines +remote: (W) c565fc2: commit message lines >70 characters; manually wrap lines +remote: (W) 6237313: commit message lines >70 characters; manually wrap lines +remote: (W) 29d922d: commit message lines >70 characters; manually wrap lines +remote: (W) ea1077a: commit message lines >70 characters; manually wrap lines +remote: (W) c61aea1: commit message lines >70 characters; manually wrap lines +remote: (W) a3a03e0: commit message lines >70 characters; manually wrap lines +remote: (W) 3ad7809: commit message lines >70 characters; manually wrap lines +To ssh://Portante@git.gluster.com/gluster-swift.git + 3303443..f534d66 master -> master diff --git a/README b/README new file mode 100644 index 0000000..1dd12e3 --- /dev/null +++ b/README @@ -0,0 +1,22 @@ +Gluster For Swift - Integrating GlusterFS with OpenStack Swift Implementation +of the Swift API. This is a component of the Unified File and Object (UFO) +story for GlusterFS, which allows files and directories created via +gluster-native/nfs/samba mount(s) to be accessed as accounts, containers and +objects. + +Install + * yum install openstack-swift*.noarch + * yum install gluster-swift-1.3*.noarch + +Once this is done, you can access GlusterFS volumes via the Swift API where +accounts are mounted volumes (today), containers are top-level directories, +and objects are files and sub-directories of container directories. + +Command to start the servers (TBD) + swift-init main start + +Command to stop the servers (TBD) + swift-init main stop + +Command to gracefully reload the servers + swift-init main reload \ No newline at end of file diff --git a/ufo/bin/gluster-swift-gen-builders b/bin/gluster-swift-gen-builders similarity index 100% rename from ufo/bin/gluster-swift-gen-builders rename to bin/gluster-swift-gen-builders diff --git a/ufo/etc/account-server/1.conf-gluster b/etc/account-server/1.conf-gluster similarity index 100% rename from ufo/etc/account-server/1.conf-gluster rename to etc/account-server/1.conf-gluster diff --git a/ufo/etc/container-server/1.conf-gluster b/etc/container-server/1.conf-gluster similarity index 100% rename from ufo/etc/container-server/1.conf-gluster rename to etc/container-server/1.conf-gluster diff --git a/ufo/etc/fs.conf-gluster b/etc/fs.conf-gluster similarity index 100% rename from ufo/etc/fs.conf-gluster rename to etc/fs.conf-gluster diff --git a/ufo/etc/object-server/1.conf-gluster b/etc/object-server/1.conf-gluster similarity index 100% rename from ufo/etc/object-server/1.conf-gluster rename to etc/object-server/1.conf-gluster diff --git a/ufo/etc/proxy-server.conf-gluster b/etc/proxy-server.conf-gluster similarity index 100% rename from ufo/etc/proxy-server.conf-gluster rename to etc/proxy-server.conf-gluster diff --git a/ufo/etc/swift.conf-gluster b/etc/swift.conf-gluster similarity index 100% rename from ufo/etc/swift.conf-gluster rename to etc/swift.conf-gluster diff --git a/ufo/gluster-swift-ufo.spec b/gluster-swift.spec similarity index 70% rename from ufo/gluster-swift-ufo.spec rename to gluster-swift.spec index 8c0167c..af80e40 100644 --- a/ufo/gluster-swift-ufo.spec +++ b/gluster-swift.spec @@ -14,14 +14,14 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif -%define _confdir %{_sysconfdir}/swift -%define _ufo_version 1.1 -%define _ufo_release 4 +%define _confdir %{_sysconfdir}/swift +%define _version 1.3 +%define _release 0 -Summary : GlusterFS Unified File and Object Storage. -Name : gluster-swift-ufo -Version : %{_ufo_version} -Release : %{_ufo_release} +Summary : GlusterFS Integration with OpenStack Object Storage (Swift). +Name : gluster-for-swift +Version : %{_version} +Release : %{_release} Group : Application/File Vendor : Red Hat Inc. Source0 : %{name}-%{version}-%{release}.tar.gz @@ -31,19 +31,18 @@ BuildArch: noarch Requires : memcached Requires : openssl Requires : python -Requires : openstack-swift >= 1.4.8 -Requires : openstack-swift-account >= 1.4.8 -Requires : openstack-swift-container >= 1.4.8 -Requires : openstack-swift-object >= 1.4.8 -Requires : openstack-swift-proxy >= 1.4.8 -Obsoletes: gluster-swift -Obsoletes: gluster-swift-plugin +Requires : openstack-swift >= 1.8.0 +Requires : openstack-swift-account >= 1.8.0 +Requires : openstack-swift-container >= 1.8.0 +Requires : openstack-swift-object >= 1.8.0 +Requires : openstack-swift-proxy >= 1.8.0 %description -Gluster Unified File and Object Storage unifies NAS and object storage -technology. This provides a system for data storage that enables users to access -the same data as an object and as a file, simplifying management and controlling -storage costs. +Gluster-For-Swift (G4S, pronounced "gee-force") integrates GlusterFS as an +alternative back end for OpenStack Object Storage (Swift) leveraging the +existing front end OpenStack Swift code. Gluster volumes are used to store +objects in files, containers are maintained as top-level directories of volumes, +where accounts are mapped one-to-one to gluster volumes. %prep %setup -q @@ -68,7 +67,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root) %{python_sitelib}/gluster -%{python_sitelib}/gluster_swift_ufo-%{version}-*.egg-info +%{python_sitelib}/gluster_swift-%{version}-*.egg-info %{_bindir}/gluster-swift-gen-builders %dir %{_confdir} %config %{_confdir}/account-server/1.conf-gluster diff --git a/ufo/gluster/__init__.py b/gluster/__init__.py similarity index 100% rename from ufo/gluster/__init__.py rename to gluster/__init__.py diff --git a/ufo/gluster/swift/__init__.py b/gluster/swift/__init__.py similarity index 100% rename from ufo/gluster/swift/__init__.py rename to gluster/swift/__init__.py diff --git a/ufo/gluster/swift/account/__init__.py b/gluster/swift/account/__init__.py similarity index 100% rename from ufo/gluster/swift/account/__init__.py rename to gluster/swift/account/__init__.py diff --git a/ufo/gluster/swift/account/server.py b/gluster/swift/account/server.py similarity index 100% rename from ufo/gluster/swift/account/server.py rename to gluster/swift/account/server.py diff --git a/ufo/gluster/swift/common/DiskDir.py b/gluster/swift/common/DiskDir.py similarity index 100% rename from ufo/gluster/swift/common/DiskDir.py rename to gluster/swift/common/DiskDir.py diff --git a/ufo/gluster/swift/common/DiskFile.py b/gluster/swift/common/DiskFile.py similarity index 100% rename from ufo/gluster/swift/common/DiskFile.py rename to gluster/swift/common/DiskFile.py diff --git a/ufo/gluster/swift/common/Glusterfs.py b/gluster/swift/common/Glusterfs.py similarity index 100% rename from ufo/gluster/swift/common/Glusterfs.py rename to gluster/swift/common/Glusterfs.py diff --git a/ufo/gluster/swift/common/__init__.py b/gluster/swift/common/__init__.py similarity index 100% rename from ufo/gluster/swift/common/__init__.py rename to gluster/swift/common/__init__.py diff --git a/ufo/gluster/swift/common/constraints.py b/gluster/swift/common/constraints.py similarity index 100% rename from ufo/gluster/swift/common/constraints.py rename to gluster/swift/common/constraints.py diff --git a/ufo/gluster/swift/common/exceptions.py b/gluster/swift/common/exceptions.py similarity index 100% rename from ufo/gluster/swift/common/exceptions.py rename to gluster/swift/common/exceptions.py diff --git a/ufo/gluster/swift/common/fs_utils.py b/gluster/swift/common/fs_utils.py similarity index 100% rename from ufo/gluster/swift/common/fs_utils.py rename to gluster/swift/common/fs_utils.py diff --git a/ufo/gluster/swift/common/middleware/__init__.py b/gluster/swift/common/middleware/__init__.py similarity index 100% rename from ufo/gluster/swift/common/middleware/__init__.py rename to gluster/swift/common/middleware/__init__.py diff --git a/ufo/gluster/swift/common/middleware/gluster.py b/gluster/swift/common/middleware/gluster.py similarity index 100% rename from ufo/gluster/swift/common/middleware/gluster.py rename to gluster/swift/common/middleware/gluster.py diff --git a/ufo/gluster/swift/common/ring.py b/gluster/swift/common/ring.py similarity index 100% rename from ufo/gluster/swift/common/ring.py rename to gluster/swift/common/ring.py diff --git a/ufo/gluster/swift/common/utils.py b/gluster/swift/common/utils.py similarity index 100% rename from ufo/gluster/swift/common/utils.py rename to gluster/swift/common/utils.py diff --git a/ufo/gluster/swift/container/__init__.py b/gluster/swift/container/__init__.py similarity index 100% rename from ufo/gluster/swift/container/__init__.py rename to gluster/swift/container/__init__.py diff --git a/ufo/gluster/swift/container/server.py b/gluster/swift/container/server.py similarity index 100% rename from ufo/gluster/swift/container/server.py rename to gluster/swift/container/server.py diff --git a/ufo/gluster/swift/obj/__init__.py b/gluster/swift/obj/__init__.py similarity index 100% rename from ufo/gluster/swift/obj/__init__.py rename to gluster/swift/obj/__init__.py diff --git a/ufo/gluster/swift/obj/server.py b/gluster/swift/obj/server.py similarity index 100% rename from ufo/gluster/swift/obj/server.py rename to gluster/swift/obj/server.py diff --git a/ufo/gluster/swift/proxy/__init__.py b/gluster/swift/proxy/__init__.py similarity index 100% rename from ufo/gluster/swift/proxy/__init__.py rename to gluster/swift/proxy/__init__.py diff --git a/ufo/gluster/swift/proxy/server.py b/gluster/swift/proxy/server.py similarity index 100% rename from ufo/gluster/swift/proxy/server.py rename to gluster/swift/proxy/server.py diff --git a/ufo/setup.py b/setup.py similarity index 94% rename from ufo/setup.py rename to setup.py index a483102..2da9353 100644 --- a/ufo/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright (c) 2012 Red Hat, Inc. +# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,13 +19,13 @@ from setuptools import setup, find_packages from gluster.swift import __canonical_version__ as version -name = 'gluster_swift_ufo' +name = 'gluster_swift' setup( name=name, version=version, - description='Gluster Swift/UFO', + description='Gluster For Swift', license='Apache License (2.0)', author='Red Hat, Inc.', author_email='gluster-users@gluster.org', diff --git a/ufo/test/__init__.py b/test/__init__.py similarity index 100% rename from ufo/test/__init__.py rename to test/__init__.py diff --git a/ufo/test/unit/__init__.py b/test/unit/__init__.py similarity index 100% rename from ufo/test/unit/__init__.py rename to test/unit/__init__.py diff --git a/ufo/test/unit/common/__init__.py b/test/unit/common/__init__.py similarity index 100% rename from ufo/test/unit/common/__init__.py rename to test/unit/common/__init__.py diff --git a/ufo/test/unit/common/data/README.rings b/test/unit/common/data/README.rings similarity index 100% rename from ufo/test/unit/common/data/README.rings rename to test/unit/common/data/README.rings diff --git a/ufo/test/unit/common/data/account.builder b/test/unit/common/data/account.builder similarity index 100% rename from ufo/test/unit/common/data/account.builder rename to test/unit/common/data/account.builder diff --git a/ufo/test/unit/common/data/account.ring.gz b/test/unit/common/data/account.ring.gz similarity index 100% rename from ufo/test/unit/common/data/account.ring.gz rename to test/unit/common/data/account.ring.gz diff --git a/ufo/test/unit/common/data/account_tree.tar.bz2 b/test/unit/common/data/account_tree.tar.bz2 similarity index 100% rename from ufo/test/unit/common/data/account_tree.tar.bz2 rename to test/unit/common/data/account_tree.tar.bz2 diff --git a/ufo/test/unit/common/data/backups/1365124498.account.builder b/test/unit/common/data/backups/1365124498.account.builder similarity index 100% rename from ufo/test/unit/common/data/backups/1365124498.account.builder rename to test/unit/common/data/backups/1365124498.account.builder diff --git a/ufo/test/unit/common/data/backups/1365124498.container.builder b/test/unit/common/data/backups/1365124498.container.builder similarity index 100% rename from ufo/test/unit/common/data/backups/1365124498.container.builder rename to test/unit/common/data/backups/1365124498.container.builder diff --git a/ufo/test/unit/common/data/backups/1365124498.object.builder b/test/unit/common/data/backups/1365124498.object.builder similarity index 100% rename from ufo/test/unit/common/data/backups/1365124498.object.builder rename to test/unit/common/data/backups/1365124498.object.builder diff --git a/ufo/test/unit/common/data/backups/1365124499.object.builder b/test/unit/common/data/backups/1365124499.object.builder similarity index 100% rename from ufo/test/unit/common/data/backups/1365124499.object.builder rename to test/unit/common/data/backups/1365124499.object.builder diff --git a/ufo/test/unit/common/data/container.builder b/test/unit/common/data/container.builder similarity index 100% rename from ufo/test/unit/common/data/container.builder rename to test/unit/common/data/container.builder diff --git a/ufo/test/unit/common/data/container.ring.gz b/test/unit/common/data/container.ring.gz similarity index 100% rename from ufo/test/unit/common/data/container.ring.gz rename to test/unit/common/data/container.ring.gz diff --git a/ufo/test/unit/common/data/container_tree.tar.bz2 b/test/unit/common/data/container_tree.tar.bz2 similarity index 100% rename from ufo/test/unit/common/data/container_tree.tar.bz2 rename to test/unit/common/data/container_tree.tar.bz2 diff --git a/ufo/test/unit/common/data/object.builder b/test/unit/common/data/object.builder similarity index 100% rename from ufo/test/unit/common/data/object.builder rename to test/unit/common/data/object.builder diff --git a/ufo/test/unit/common/data/object.ring.gz b/test/unit/common/data/object.ring.gz similarity index 100% rename from ufo/test/unit/common/data/object.ring.gz rename to test/unit/common/data/object.ring.gz diff --git a/ufo/test/unit/common/test_Glusterfs.py b/test/unit/common/test_Glusterfs.py similarity index 100% rename from ufo/test/unit/common/test_Glusterfs.py rename to test/unit/common/test_Glusterfs.py diff --git a/ufo/test/unit/common/test_diskfile.py b/test/unit/common/test_diskfile.py similarity index 100% rename from ufo/test/unit/common/test_diskfile.py rename to test/unit/common/test_diskfile.py diff --git a/ufo/test/unit/common/test_fs_utils.py b/test/unit/common/test_fs_utils.py similarity index 100% rename from ufo/test/unit/common/test_fs_utils.py rename to test/unit/common/test_fs_utils.py diff --git a/ufo/test/unit/common/test_ring.py b/test/unit/common/test_ring.py similarity index 100% rename from ufo/test/unit/common/test_ring.py rename to test/unit/common/test_ring.py diff --git a/ufo/test/unit/common/test_utils.py b/test/unit/common/test_utils.py similarity index 100% rename from ufo/test/unit/common/test_utils.py rename to test/unit/common/test_utils.py diff --git a/ufo/tools/test-requires b/tools/test-requires similarity index 100% rename from ufo/tools/test-requires rename to tools/test-requires diff --git a/ufo/tox.ini b/tox.ini similarity index 100% rename from ufo/tox.ini rename to tox.ini diff --git a/ufo/README b/ufo/README deleted file mode 100644 index 9efd918..0000000 --- a/ufo/README +++ /dev/null @@ -1,16 +0,0 @@ -Gluster Unified File and Object Storage allows files and directories created -via gluster-native/nfs mount to be accessed as containers and objects. It is -a plugin for OpenStack Swift project. - -Install - * TBD - -Once this is done, you can access the GlusterFS volumes as Swift accounts. -Add the Volume names with the user-name and its corresponding password to the -/etc/swift/proxy-server.conf (follow the syntax used in the sample conf file). - -Command to start the servers (TBD) - swift-init main start - -Command to stop the servers (TBD) - swift-init main stop diff --git a/ufo/unittests.sh b/unittests.sh similarity index 100% rename from ufo/unittests.sh rename to unittests.sh