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>
This commit is contained in:
Peter Portante 2013-04-29 23:04:06 -04:00 committed by Peter Portante
parent f534d66a4a
commit 3a75da67cb
58 changed files with 207 additions and 38 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
.tox
gluster_swift.egg-info
test/unit/.coverage
build

160
HISTORY Normal file
View File

@ -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://<user>@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

22
README Normal file
View File

@ -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

View File

@ -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

View File

@ -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',

View File

@ -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