Compare commits

...
Sign in to create a new pull request.

346 commits

Author SHA1 Message Date
Python Maint
2bff6285ef Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 12:19:17 +02:00
Python Maint
a40663631b Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 12:49:27 +02:00
Fedora Release Engineering
77fdb97a93 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 22:36:04 +00:00
Benson Muite
08fdd39e4a Update to 11.2 2025-07-03 19:35:41 +03:00
Python Maint
e6d8514877 Rebuilt for Python 3.14 2025-06-03 14:29:07 +02:00
Zbigniew Jędrzejewski-Szmek
9e2d1bd99e Add sysusers.d config file to allow rpm to create users/groups automatically
See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers.
2025-02-11 15:35:18 +01:00
Fedora Release Engineering
0a794949c8 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 22:29:07 +00:00
Zbigniew Jędrzejewski-Szmek
c1384a450c Rebuilt for the bin-sbin merge (2nd attempt)
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2025-01-12 14:29:11 +01:00
Fedora Release Engineering
a6cf2b2e3a Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 02:48:16 +00:00
Zbigniew Jędrzejewski-Szmek
267721b2de Rebuilt for the bin-sbin merge
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2024-07-09 13:15:48 +02:00
Python Maint
7b20f7a7b6 Rebuilt for Python 3.13 2024-06-07 22:23:55 +02:00
Zbigniew Jędrzejewski-Szmek
56c87a0f0d Move installed files to %{_sbindir}
This implements https://pagure.io/packaging-committee/pull-request/1355,
i.e. changes the file path known to rpm to the actual location on
disk.
2024-04-18 18:47:29 +02:00
Zbigniew Jędrzejewski-Szmek
ce098d50ee Add compat sbin Provides
In preparation for https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin.
libvirt-daemon-driver-storage-gluster requires /usr/sbin/gluster.
2024-04-14 14:14:59 +02:00
Fedora Release Engineering
49171be524 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 15:18:52 +00:00
Kaleb S. KEITHLEY
a950cb4a3d rebuild with gcc-14
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2024-01-19 11:16:46 -05:00
Kaleb S. KEITHLEY
15d0720b6c glusterfs 11.1 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2023-11-06 13:16:55 -05:00
Kaleb S. KEITHLEY
4b286a508f glusterfs 11, build in side tag f40-build-side-74974
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2023-10-05 12:52:49 -04:00
Kaleb S. KEITHLEY
b9a2e4c9cf glusterfs 11, /usr/lib/ocf/resource-agents.d -> resource-agents
rhbz#2229910

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2023-08-22 13:05:54 -04:00
Fedora Release Engineering
ec3e9277a3 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 23:25:27 +00:00
Kaleb S. KEITHLEY
b084205cb3 Rebuilt for Python 3.12
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2023-06-16 11:54:52 -04:00
Kaleb S. KEITHLEY
0582b110e0 Rebuilt for Python 3.12
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2023-06-16 11:34:32 -04:00
Python Maint
682b027783 Rebuilt for Python 3.12 2023-06-15 18:54:50 +02:00
Kaleb S. KEITHLEY
ff98697d2e glusterfs 11, remove unnecessary BR for ldconfig, i.e. glibc, also
rhbz#1731689

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2023-05-04 08:29:45 -04:00
Adam Williamson
42e2ce2602 Fix a mistake in the libglusterd0 obsolete 2023-02-10 15:38:23 -08:00
Kaleb S. KEITHLEY
83291bffe3 glusterfs 11 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2023-02-07 08:58:40 -05:00
Fedora Release Engineering
7a2b9c5621 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 05:17:43 +00:00
Kaleb S. KEITHLEY
da34ccc84b SPDX migration
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2022-11-11 11:36:03 -05:00
Frédéric Moulins
eb1c3d0d74 bash-completion: remove executable permission
bash-completion scripts are sourced.
2022-10-03 19:55:29 +02:00
Frédéric Moulins
3526946a41 bash-completion: use bash_completions_dir macro
Install the completion script with the `%{bash_completions_dir}` macro.
By default, it will be `/usr/share/bash-completion/completions`
from which the script will be dynamically sourced on use.
2022-10-03 19:54:51 +02:00
Kaleb S. KEITHLEY
e2863d1636 10.3 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2022-09-20 08:49:14 -04:00
Fedora Release Engineering
22aa83da5c Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 06:38:58 +00:00
Python Maint
3095ec1be8 Rebuilt for Python 3.11 2022-06-13 21:14:06 +02:00
Kaleb S. KEITHLEY
79e015868c 10.2 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2022-05-13 07:47:37 -04:00
Kaleb S. KEITHLEY
fd742dbb76 10.2 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2022-05-13 07:47:12 -04:00
Kaleb S. KEITHLEY
80373ba83a 10.1, w/ modern linker, this time for real
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2022-01-31 11:13:08 -05:00
Kaleb S. KEITHLEY
1d45a598d9 10.1, w/ modern linker (mold)
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2022-01-26 16:37:38 -05:00
Kaleb S. KEITHLEY
d401b60136 10.1, w/ modern linker (mold)
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2022-01-26 16:36:23 -05:00
Fedora Release Engineering
faf97fd4e3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 06:24:24 +00:00
Kaleb S. KEITHLEY
1793958937 10.1 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2022-01-19 07:59:13 -05:00
Kaleb S. KEITHLEY
391116f33a rebuild with gcc-12
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2022-01-15 08:56:44 -05:00
Kaleb S. KEITHLEY
f2c7a01f53 10.0 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-11-02 07:38:41 -04:00
Kaleb S. KEITHLEY
41e85331ab 10.0 RC0, without_tcmalloc, rhbz#2018439
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-10-29 09:34:09 -04:00
Kaleb S. KEITHLEY
3d10f66c48 10.0 RC0, without_tcmalloc, rhbz#2018439
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-10-29 07:49:48 -04:00
Kaleb S. KEITHLEY
8e29421e26 10.0 RC0, armv7hl
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-10-28 11:13:00 -04:00
Kaleb S. KEITHLEY
09db540e35 10.0 RC0
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-10-19 11:59:16 -04:00
Kaleb S. KEITHLEY
80badd1442 10.0 RC0
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-10-19 11:27:05 -04:00
Kaleb S. KEITHLEY
fecd290418 9.4 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-10-04 07:56:58 -04:00
Kaleb S. KEITHLEY
03346a40c0 9.4 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-10-04 07:56:02 -04:00
Sahana Prasad
3865754255 Rebuilt with OpenSSL 3.0.0 2021-09-14 19:03:23 +02:00
Fedora Release Engineering
1475629782 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 02:00:35 +00:00
Kaleb S. KEITHLEY
fa60d94daa 9.3 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-06-29 07:50:15 -04:00
Kaleb S. KEITHLEY
6cbd94e3c1 Rebuilt for userspace-rcu-0.13 again
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-06-22 09:03:30 -04:00
Kaleb S. KEITHLEY
465e00eeba https://src.fedoraproject.org/rpms/glusterfs/pull-request/7
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-06-11 10:58:42 -04:00
Kaleb S. KEITHLEY
17fe09e28a Rebuilt for userspace-rcu-0.13
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-06-08 15:12:25 -04:00
Python Maint
2916fdc71b Rebuilt for Python 3.10 2021-06-04 20:05:34 +02:00
Kaleb S. KEITHLEY
173820a67e 9.2 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2021-05-09 10:10:40 -04:00
Richard W.M. Jones
978a5fb92b Rebuild for updated liburing. 2021-04-14 10:22:43 +01:00
Kaleb S KEITHLEY
b9f277a618 9.1 GA
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
2021-03-30 08:05:40 -04:00
Zbigniew Jędrzejewski-Szmek
9090e9784d Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-03-02 16:13:43 +01:00
Kaleb S KEITHLEY
5230caa4d0 9.0, w/ liburing
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
2021-01-27 08:03:03 -05:00
Fedora Release Engineering
e819fbe826 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 08:27:21 +00:00
Kaleb S KEITHLEY
3dc7156fad 9.0 GA
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
2021-01-19 07:59:04 -05:00
Kaleb S KEITHLEY
1601bef457 9.0 RC0, fuse3
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
2021-01-07 08:27:56 -05:00
Kaleb S KEITHLEY
634903cc7a 9.0 RC0
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
2021-01-06 11:32:38 -05:00
Kaleb S KEITHLEY
4ef17a069a 8.3 GA
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
2020-12-01 10:56:21 -05:00
Kaleb S. KEITHLEY
aa94a08b5e 8.2, rdma
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-11-05 09:36:53 -05:00
Kaleb S. KEITHLEY
219b74fe83 8.2 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-09-17 07:07:20 -04:00
Kaleb S. KEITHLEY
f36b853ea3 8.1 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-08-25 10:17:12 -04:00
Fedora Release Engineering
5acb75d3e0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 20:26:07 +00:00
Kaleb S. KEITHLEY
ec1c3d7ac7 eliminate contrib/sunrpc/xdr_sizeof.c
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-07-22 08:28:06 -04:00
Kaleb S. KEITHLEY
b513261e97 use /usr/bin/make install DESTDIR=/home/kkeithle/rpmbuild/BUILDROOT/glusterfs-8.0-4.fc33.x86_64 INSTALL="/usr/bin/install -p" macro
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-07-20 17:07:45 -04:00
Kaleb S. KEITHLEY
39a3707ff2 thin-arbiter, w/o libglusterfs0
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-07-08 07:30:38 -04:00
Kaleb S. KEITHLEY
9c80d2d404 thin-arbiter, w/o libglusterfs0
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-07-07 07:26:50 -04:00
Kaleb S. KEITHLEY
68e20559d8 8.0, thin-arbiter
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-07-07 06:47:54 -04:00
Kaleb S. KEITHLEY
1a0a222ee2 8.0 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-07-06 08:20:56 -04:00
Kaleb S. KEITHLEY
a2a88a7c6e 8.0 fix symbol versions, enable LTO
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-07-04 08:09:47 -04:00
Jeff Law
4186cb9be2 Disable LTO 2020-07-01 12:26:32 -06:00
Kaleb S. KEITHLEY
1a06b53cf6 8.0 RC0
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-06-01 08:10:40 -04:00
Miro Hrončok
3737e32052 Rebuilt for Python 3.9 2020-05-26 02:46:43 +02:00
Kaleb S. KEITHLEY
eb07bdf9c0 7.6 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-05-18 17:18:17 -04:00
Kaleb S. KEITHLEY
2e0259eaf6 7.5 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-04-16 07:23:41 -04:00
Kaleb S. KEITHLEY
7d209ed114 7.4 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-03-18 10:20:55 -04:00
Kaleb S. KEITHLEY
3f1fa241c8 7.3 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-02-17 08:15:05 -05:00
Fedora Release Engineering
ab2ac21499 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 22:29:22 +00:00
Kaleb S. KEITHLEY
f9153ccd81 7.2, gcc-10 fix
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-01-22 13:42:27 -05:00
Kaleb S. KEITHLEY
618a66b189 7.2 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2020-01-15 13:28:34 -05:00
Kaleb S. KEITHLEY
ebdd1b76cb 7.1 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-12-23 07:58:35 -05:00
Kaleb S. KEITHLEY
4e87734e63 7.0 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-10-15 09:14:59 -04:00
Kaleb S. KEITHLEY
3987d5f247 bd xlator was removed in glusterfs-6
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-10-10 07:56:25 -04:00
Kaleb S. KEITHLEY
121656e62d f31+ --without-bd
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-10-09 10:17:44 -04:00
Kaleb S. KEITHLEY
d5545d0c66 7.0 RC3 (note, rc2 was tagged but not released)
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-10-01 07:19:42 -04:00
Kaleb S. KEITHLEY
4b75c6dfc9 disable gnfs by default
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-09-16 12:49:47 -04:00
Kaleb S. KEITHLEY
bbae6ba75c disable gnfs by default
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-09-16 11:38:49 -04:00
Kaleb S. KEITHLEY
76308eab06 7.0 RC1
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-09-16 08:18:22 -04:00
Kaleb S. KEITHLEY
379fc60f04 python3-requests, el-8
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-08-28 13:45:08 -04:00
Kaleb S. KEITHLEY
0c4f3f7242 7.0 RC0
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-08-22 08:02:10 -04:00
Kaleb S. KEITHLEY
cc64a2befd Rebuilt for Python 3.8, again
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-08-19 11:19:00 -04:00
Miro Hrončok
e766c1f8d2 Rebuilt for Python 3.8 2019-08-19 16:42:55 +02:00
Kaleb S. KEITHLEY
2c697f5ce4 Rebuilt for Python 3.8, again
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-08-19 09:55:22 -04:00
Miro Hrončok
fb215b652a Rebuilt for Python 3.8 2019-08-19 10:14:56 +02:00
Kaleb S. KEITHLEY
365e930bba 6.5 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-08-07 08:06:10 -04:00
Kaleb S. KEITHLEY
334e4ddc87 restore i686
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-08-01 15:31:45 -04:00
Kaleb S. KEITHLEY
f2eb7b6403 temporarily exclude i686 pending firewalld resolution
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-08-01 07:25:27 -04:00
Fedora Release Engineering
face7bb1d8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 03:58:18 +00:00
Kaleb S. KEITHLEY
8df5809743 6.4 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-07-17 08:00:45 -04:00
Kaleb S. KEITHLEY
0e7456ecf4 6.3 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-06-11 09:59:15 -04:00
Kaleb S. KEITHLEY
57717b9df9 6.2 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-05-24 09:06:51 -04:00
Kaleb S. KEITHLEY
ce08bc2201 6.1 GA, glusterfs-thin-arbiter Requires: glusterfs-libs
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-04-22 11:02:16 -04:00
Kaleb S. KEITHLEY
67c0a3bce4 6.1 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-04-18 06:59:08 -04:00
Kaleb S. KEITHLEY
110a05d88b 6.0 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-03-20 00:03:09 -04:00
Kaleb S. KEITHLEY
b59e6efcf2 6.0 RC1
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-03-13 08:14:52 -04:00
Kaleb S. KEITHLEY
c09fc157b9 6.0 RC0
restore s390x rdma
 remove obsolete scripts from
  https://src.fedoraproject.org/rpms/glusterfs/pull-request/5

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-03-06 08:08:50 -05:00
Kaleb S. KEITHLEY
b598b104d5 6.0 RC0, s390x, armv7hl no rdma
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-03-01 09:01:38 -05:00
Kaleb S. KEITHLEY
188860a17f 6.0 RC0
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-02-22 11:38:52 -05:00
Kaleb S. KEITHLEY
3bfdc85542 re-rebuild for f31/rawhide
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-02-20 10:35:53 -05:00
Kaleb S. KEITHLEY
d7bf19145a rebuild for f31/rawhide
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-02-20 09:55:11 -05:00
Igor Gnatenko
cc997d2c7a Rebuild for readline 8.0 2019-02-17 09:30:51 +01:00
Kaleb S. KEITHLEY
d03e52a059 Re-rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-02-14 08:51:53 -05:00
Fedora Release Engineering
06830c2e70 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 22:57:27 +00:00
Kaleb S. KEITHLEY
48abd2568d 5.3 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-01-17 07:12:55 -05:00
Kaleb S. KEITHLEY
19700a7e5f 5.2 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-12-13 07:38:54 -05:00
Miro Hrončok
5738ffb966 https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 2018-11-15 12:53:55 +01:00
Kaleb S. KEITHLEY
229c739e5b 5.1 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-11-14 13:22:40 -05:00
Kaleb S. KEITHLEY
fad240f71e 5.0 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-10-18 10:31:04 -04:00
Kaleb S. KEITHLEY
0b39dfc7f5 remove rhel5 fuse module
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-10-14 07:48:59 -04:00
Kaleb S. KEITHLEY
3f1032a6fa 5.0 RC1
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-10-05 14:02:04 -04:00
Kaleb S. KEITHLEY
2ff76cf9f3 5.0 RC1
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-10-05 13:20:02 -04:00
Kaleb S. KEITHLEY
25c167f12a 5.0 RC0, unbork python shebangs
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-25 06:55:56 -04:00
Kaleb S. KEITHLEY
7c1761e92e 5.0 RC0, unbork python shebangs
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-25 06:52:26 -04:00
Kaleb S. KEITHLEY
f014efdf53 5.0 RC0
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-20 09:35:23 -04:00
Kaleb S. KEITHLEY
68233240eb 5.0 RC0
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-18 07:35:21 -04:00
Kaleb S. KEITHLEY
4526f13f80 4.1.4 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-06 13:39:28 -04:00
Kaleb S. KEITHLEY
85ce4a1da6 missing /run/gluster/metrics, see bz#1624006
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-04 07:16:16 -04:00
Kaleb S. KEITHLEY
a7dfa968c6 --with-ipv6-default
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-04 07:04:30 -04:00
Kaleb S. KEITHLEY
f1c3e1ab5f 4.1.3 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-08-27 09:46:20 -04:00
Kaleb S. KEITHLEY
6727d5244d 4.1.2, again
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-07-25 10:32:55 -04:00
Kaleb S. KEITHLEY
bf7716b0cc 4.1.2, gsyncd.conf /usr/local/sbin
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-07-24 15:31:42 -04:00
Kaleb S. KEITHLEY
139ee9d390 4.1.2 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-07-24 09:57:02 -04:00
Fedora Release Engineering
05c09e5c26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 02:45:55 +00:00
Kaleb S. KEITHLEY
b05ab73fc9 missed python->python2 in shebang
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-07-11 09:57:26 -04:00
Kaleb S. KEITHLEY
b9d82b8a44 4.1.0 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-06-25 23:46:02 -04:00
Kaleb S. KEITHLEY
76e44828a5 4.1.0 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-06-12 13:36:06 -04:00
Igor Gnatenko
e99c7abbb9 Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-05-07 09:39:18 +02:00
Igor Gnatenko
f0511a2a17 Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-05-07 09:39:18 +02:00
Niels de Vos
e114b0a9d2 4.0.2 GA
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2018-04-24 20:21:22 +02:00
Kaleb S. KEITHLEY
df17b7b7d0 4.0.1, restore python->python2 -prettytable
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-04-19 15:27:23 -04:00
Kaleb S. KEITHLEY
9ab8bcb85e 4.0.1 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-03-21 11:21:14 -04:00
Dan Horák
476b98d21e all platform provide the RDMA stack 2018-03-20 14:19:57 +01:00
Kaleb S. KEITHLEY
97c4e2fb04 4.0.0 GA (v4.0.0-2)
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-03-12 07:31:40 -04:00
Kaleb S. KEITHLEY
bef36a0b9d 4.0.0 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-03-06 11:11:10 -05:00
Kaleb S. KEITHLEY
2853f8d923 4.0.0 RC1, python2-prettytable, .../rpms/glusterfs/pull-request/3
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-03-01 07:58:23 -05:00
Kaleb S. KEITHLEY
06620abb6e 4.0.0 RC1
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-02-27 08:58:41 -05:00
Kaleb S. KEITHLEY
3f0b929183 shared lib scriptlets, ldconfig
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-02-15 12:18:17 -05:00
Kaleb S. KEITHLEY
4708c093f7 shared lib scriptlets, ldconfig
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-02-15 12:15:21 -05:00
Igor Gnatenko
662178f0dd
Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 07:13:56 +01:00
Igor Gnatenko
c24be22e5c Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-13 23:26:43 +01:00
Fedora Release Engineering
b2d4e49cd8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 13:09:02 +00:00
Kaleb S. KEITHLEY
1b91ec82ec 3.13.2 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-01-20 08:46:50 -05:00
Kaleb S. KEITHLEY
3a9e8490b7 glibc in Fedora 28 has removed rpc headers and rpcgen, use libtirpc
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-01-18 12:45:53 -05:00
Kaleb S. KEITHLEY
a39583ebb7 Group: is deprecated, as seen in another unrelated package review 2018-01-12 09:41:42 -05:00
Niels de Vos
b2dc9600e4 Fedora 28 has renamed pyxattr
BUG: 1528975
URL: https://review.gluster.org/19074
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2017-12-25 15:15:31 +01:00
Kaleb S. KEITHLEY
e241395b7e 3.13.1 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2017-12-21 06:28:27 -05:00
Kaleb S. KEITHLEY
db63cf2cb8 Merge branch 'master' of ssh://pkgs.fedoraproject.org/rpms/glusterfs 2017-12-02 06:57:07 -05:00
Kaleb S. KEITHLEY
60eece97e7 3.13.0 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2017-12-02 06:55:45 -05:00
Kaleb S. KEITHLEY
d55dd499ba Merge #2 Add README from upstream 2017-11-28 13:53:42 +00:00
Kaleb S. KEITHLEY
cf8cb02885 3.12.3 GA 2017-11-13 10:30:44 -05:00
Kaleb S. KEITHLEY
202c34e682 3.12.2, bz #1504256 2017-10-23 09:51:44 -04:00
Kaleb S. KEITHLEY
a0a907a7d6 3.12.2 GA 2017-10-13 08:19:55 -04:00
Kaleb S. KEITHLEY
1fb1541133 3.12.2 GA 2017-10-13 08:13:58 -04:00
Kaleb S. KEITHLEY
e9d8bde8fe 3.12.1 bz 1495858 2017-09-28 11:32:34 -04:00
Anoop C S
d042eba182 Add README from upstream 2017-09-13 17:40:13 +05:30
Kaleb S. KEITHLEY
b03a4df06f 3.12.1 GA 2017-09-11 13:44:42 -04:00
Kaleb S. KEITHLEY
8d7270b3d4 3.12.0 GA 2017-08-30 10:01:16 -04:00
Adam Williamson
7d3834b71c Use %{arm} macro rather than just armv7hl 2017-08-23 12:04:52 -07:00
Adam Williamson
e8d4f08502 Merge branch 'master' into f27 2017-08-23 12:02:29 -07:00
Kaleb S. KEITHLEY
0c05a6df7d 3.11.3 libibverbs-devel, librdmacm-devel -> rdma-core-devel 2017-08-22 09:06:50 -04:00
Kaleb S. KEITHLEY
03fdb92c9c 3.11.3 libibverbs-devel, librdmacm-devel -> rdma-core-devel 2017-08-22 08:36:06 -04:00
Kaleb S. KEITHLEY
81a5d672fc 3.11.3 GA 2017-08-21 11:31:27 -04:00
Kaleb S. KEITHLEY
69821efcd6 3.11.3 GA 2017-08-21 11:00:54 -04:00
Fedora Release Engineering
231c60bd0a - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 21:56:36 +00:00
Fedora Release Engineering
cb3c8223c5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 10:33:14 +00:00
Kaleb S. KEITHLEY
34353f2c46 3.11.2 GA 2017-07-21 14:51:25 -04:00
Igor Gnatenko
cf719a5584 Rebuild due to bug in RPM (RHBZ #1468476)
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-07-07 12:16:56 +02:00
Kaleb S. KEITHLEY
762498f85f 3.11.1 GA 2017-06-28 08:44:51 -04:00
Kaleb S. KEITHLEY
569b380bd8 Merge branch 'master' of ssh://pkgs.fedoraproject.org/rpms/glusterfs 2017-06-25 18:48:24 -04:00
Kaleb S. KEITHLEY
e9fccb0003 rebuild with userspace-rcu-0.10.0 (liburcu-bp.so.6) 2017-06-25 18:47:29 -04:00
Anoop C S
92fa91449e Remove obsolete glusterd service file
We use the service file available with upstream tarball.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
2017-06-12 18:47:07 +05:30
Kaleb S. KEITHLEY
306fed24e2 3.11.0 GA 2017-05-30 09:56:19 -04:00
Kaleb S. KEITHLEY
e0a04e8c04 3.11.0 RC1 2017-05-23 06:36:27 -04:00
Kaleb S. KEITHLEY
fede34f901 Enable gnfs subpackage 2017-05-09 07:40:36 -04:00
Niels de Vos
6bd56d6b07 Remove conflicting _localstatedir_/run/gluster
The two RPMs 'glusterfs' and 'glusterfs-server' have
_localstatedir_/run/gluster in their %files section. Because these are
not equal, the installation of 'glusterfs-server' fails (as it pulls in
'glusterfs' too):

DEBUG util.py:439:  Dependencies resolved.
DEBUG util.py:439:  ================================================================================
DEBUG util.py:439:   Package                         Arch     Version                 Repository
DEBUG util.py:439:                                                                             Size
DEBUG util.py:439:  ================================================================================
DEBUG util.py:439:  Installing:
...
DEBUG util.py:439:   glusterfs                       x86_64   3.11.0-0.1.rc0.fc27     build   575 k
DEBUG util.py:439:   glusterfs-api                   x86_64   3.11.0-0.1.rc0.fc27     build    99 k
DEBUG util.py:439:   glusterfs-api-devel             x86_64   3.11.0-0.1.rc0.fc27     build    44 k
DEBUG util.py:439:   glusterfs-cli                   x86_64   3.11.0-0.1.rc0.fc27     build   204 k
DEBUG util.py:439:   glusterfs-client-xlators        x86_64   3.11.0-0.1.rc0.fc27     build   844 k
DEBUG util.py:439:   glusterfs-devel                 x86_64   3.11.0-0.1.rc0.fc27     build   183 k
DEBUG util.py:439:   glusterfs-extra-xlators         x86_64   3.11.0-0.1.rc0.fc27     build    95 k
DEBUG util.py:439:   glusterfs-fuse                  x86_64   3.11.0-0.1.rc0.fc27     build   144 k
DEBUG util.py:439:   glusterfs-libs                  x86_64   3.11.0-0.1.rc0.fc27     build   389 k
DEBUG util.py:439:   glusterfs-server                x86_64   3.11.0-0.1.rc0.fc27     build   1.3 M
...
DEBUG util.py:439:  Running transaction test
DEBUG util.py:439:  Error: Transaction check error:
DEBUG util.py:439:    file /var/run/gluster conflicts between attempted installs of glusterfs-server-3.11.0-0.1.rc0.fc27.x86_64 and glusterfs-3.11.0-0.1.rc0.fc27.x86_64

Koshei reported this while rebuilding glusterfs-coreutils:
- https://apps.fedoraproject.org/koschei/package/glusterfs-coreutils?collection=f27
- https://koji.fedoraproject.org/koji/taskinfo?taskID=19461192

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2017-05-09 10:08:32 +02:00
Kaleb S. KEITHLEY
94a3248f29 3.11.0 RC0 2017-05-08 15:22:56 -04:00
Kaleb S. KEITHLEY
92c089099d 3.10.1 GA 2017-03-30 15:19:37 -04:00
Kaleb S. KEITHLEY
4d77409de0 3.10.0 GA 2017-02-24 15:19:01 -05:00
Kaleb S. KEITHLEY
52721583d1 3.10.0 GA 2017-02-23 22:02:01 -05:00
Kaleb S. KEITHLEY
f770f0cd9c 3.10.0 RC1 2017-02-21 22:39:08 -05:00
Kaleb S. KEITHLEY
9e47677bc9 3.10.0 RC0 2017-02-07 07:58:35 -05:00
Kaleb S. KEITHLEY
3ea46bf5c2 delete obsolete patches 2017-01-18 09:00:21 -05:00
Kaleb S. KEITHLEY
980cc825b7 3.9.1 GA 2017-01-17 14:47:13 -05:00
Kaleb S. KEITHLEY
45216c5be6 firewalld nit 2017-01-16 07:20:10 -05:00
Igor Gnatenko
039e3afba4 Rebuild for readline 7.x
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-01-12 17:30:29 +01:00
Anoop C S
d37017bea7 Remove older patch files
Signed-off-by: Anoop C S <anoopcs@redhat.com>
2017-01-11 17:04:29 +05:30
Kaleb S. KEITHLEY
c1dc434dbb firewalld fixes 2017-01-06 12:57:26 -05:00
Kaleb S. KEITHLEY
222bc9ec95 3.9.0 GA
-  w/ glfs_free(), needed for nfs-ganesha-2.4.1 w/ patched FSAL_GLUSTER
2016-11-15 10:51:00 -05:00
Kaleb S. KEITHLEY
f27878dc50 glfs_free(), needed for nfs-ganesha-2.4.1 w/ patched FSAL_GLUSTER 2016-10-31 08:51:31 -04:00
Kaleb S. KEITHLEY
efe2e85190 portblock RA (1389293) 2016-10-27 11:52:58 -04:00
Kaleb S. KEITHLEY
f78d93315a 3.9.0rc2 2016-10-26 12:49:55 -04:00
Kaleb S. KEITHLEY
f7c808dc05 3.8.5 GA 2016-10-13 08:11:58 -04:00
Kaleb S. KEITHLEY
7330480682 3.8.5 GA 2016-10-13 08:08:35 -04:00
Zbigniew Jędrzejewski-Szmek
3115c11ea8 Use --quiet with firewall-cmd
Otherwise it prints "success" in the dnf cleanup phase.
2016-10-03 10:49:26 -04:00
Kaleb S. KEITHLEY
efd051180f 3.8.4 GA, remove python-ctypes in rawhide per cstratak at redhat.com 2016-09-21 13:41:34 -04:00
Kaleb S. KEITHLEY
dfbfed3499 3.8.4 GA 2016-09-10 12:08:18 -04:00
Kaleb S. KEITHLEY
039a0b3b85 3.8.3 GA 2016-08-22 08:55:08 -04:00
Kaleb S. KEITHLEY
2444c5dc9e 3.8.2 GA 2016-08-10 11:11:37 -04:00
Kaleb S. KEITHLEY
6b7922b2d6 https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages 2016-07-26 10:53:51 -04:00
Fedora Release Engineering
40617ad802 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages 2016-07-19 07:13:29 +00:00
Kaleb S KEITHLEY
7f0c4b4b18 3.8.1 GA 2016-07-08 12:44:29 -04:00
Kaleb S KEITHLEY
8ea67ac2c9 3.8.0 GA, http://review.gluster.org/#/c/14779/ 2016-06-27 08:55:16 -04:00
Kaleb S KEITHLEY
d3513ee46c 3.8.0 GA, rebuild after userspace-rcu SONAME bump 2016-06-22 07:15:00 -04:00
Kaleb S KEITHLEY
f5e2ac87e4 3.8.0 GA 2016-06-14 12:17:04 -04:00
Kaleb S KEITHLEY
94615c1aba 3.8.0 RC2 2016-05-25 09:07:45 -04:00
Kaleb S KEITHLEY
db8ed6acee 3.8.0 RC1 2016-05-16 11:28:12 -04:00
Kaleb S KEITHLEY
96ba93c771 fix dates in %change 2016-04-27 10:03:17 -04:00
Kaleb S KEITHLEY
cdd60bb03d %postun libs on RHEL6 w/o firewalld 2016-04-27 10:01:52 -04:00
Kaleb S KEITHLEY
07bb35fd47 GlusterFS 3.7.11 GA 2016-04-18 08:14:43 -04:00
Kaleb S KEITHLEY
5681a31eec GlusterFS 3.7.10 GA 2016-04-01 07:52:50 -04:00
Kaleb S KEITHLEY
3b5a3fa479 glusterfs-ganesha requires cman, pacemaker, corosync on RHEL6 2016-03-31 07:24:38 -04:00
Kaleb S KEITHLEY
0a03de21f1 GlusterFS 3.7.9 GA 2016-03-19 12:50:50 -04:00
Kaleb S KEITHLEY
4baf64249a %post, %pre -p /sbin/ldconfig handling (1312374, 1315024) 2016-03-08 15:27:45 -05:00
Kaleb S KEITHLEY
04588ed835 Requires /bin/dbus -> dbus
- quiet %post server (1312897)
- syslog dependency (1310437)
2016-03-04 20:07:40 -05:00
Niels de Vos
e7aefb6900 run /sbin/ldconfig without arguments, not as interpreter
Resolves: rhbz#1312374
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2016-02-26 17:40:49 +01:00
Kaleb S KEITHLEY
d5269c8483 GlusterFS 3.7.8 GA 2016-02-08 15:26:08 -05:00
Dennis Gilmore
ba694c754b - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 22:16:21 +00:00
Kaleb S KEITHLEY
c981dfd1df GlusterFS 3.7.7 GA 2016-02-01 10:14:58 -05:00
Kaleb S KEITHLEY
7937fd3816 GlusterFS 3.7.7 GA 2016-02-01 10:02:33 -05:00
Kaleb S KEITHLEY
de5643ac50 glusterfs-server Requires: glusterfs-api
- s/%define/%global/
2016-01-08 11:17:07 -05:00
Kaleb S KEITHLEY
1ed259f27b glusterfs-server Requires: glusterfs-api = %{version}-%{release} 2016-01-08 11:04:03 -05:00
Kaleb S KEITHLEY
a8c94297a9 glusterfs-server Requires: glusterfs-api = %{version}-%{release} 2016-01-08 11:03:12 -05:00
Kaleb S KEITHLEY
b0dbd8a747 s/%define/%global/ 2015-12-24 16:41:50 -05:00
Kaleb S KEITHLEY
4b94bf439e cleanup some RHEL5isms 2015-11-23 11:42:43 -05:00
Kaleb S KEITHLEY
d87ebcfe7c gfind_missing_files belong in geo-rep 2015-11-13 12:46:05 -05:00
Kaleb S KEITHLEY
6f04bf355c GlusterFS 3.7.6 GA 2015-11-09 09:25:14 -05:00
Kaleb S. KEITHLEY
cb5bc97a3c GlusterFS 3.7.5 GA 2015-10-07 11:12:41 -04:00
Kaleb S. KEITHLEY
b331f80b9e GlusterFS 3.7.4 cpio mkdir /var/lib/glusterd/hooks/1/delete/post error 2015-09-01 11:42:16 -04:00
Kaleb S. KEITHLEY
08a994702c GlusterFS 3.7.4 cpio mkdir /var/lib/glusterd/hooks/1/delete/post error 2015-09-01 11:41:28 -04:00
Kaleb S. KEITHLEY
961663827b GlusterFS 3.7.4 GA 2015-08-31 13:50:25 -04:00
Kaleb S. KEITHLEY
c0f24d8fa2 GlusterFS 3.7.3 GA 2015-07-28 10:04:20 -04:00
Kaleb S. KEITHLEY
719bed34fd revised workaround for %ghost issue 2015-06-23 07:41:40 -04:00
Kaleb S. KEITHLEY
4064a38db7 workaround for %ghost %{_sharedstatedir}/glusterd/hooks/1/delete/post
pending correct fix that also packages the .pyc and .pyo files.
2015-06-22 15:39:15 -04:00
Kaleb S. KEITHLEY
951f25adb4 GlusterFS 3.7.2 GA 2015-06-19 10:05:39 -04:00
Dennis Gilmore
29d4a4ad0c - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 08:42:47 +00:00
Kaleb S. KEITHLEY
c12fb1372c GlusterFS 3.7.1 GA 2015-06-01 13:16:02 -04:00
Kaleb S. KEITHLEY
90020d16da GlusterFS 3.7.0, move lib{gfdb,gfchangelog}.pc from -api-devel to -devel 2015-05-20 08:50:58 -04:00
Kaleb S. KEITHLEY
be556769cd el6 nits, glusterfsd.init and %license 2015-05-15 14:03:11 -04:00
Kaleb S. KEITHLEY
6d8ca7cfb2 GlusterFS 3.7.0 GA 2015-05-15 08:11:09 -04:00
Kaleb S. KEITHLEY
dcf72a38bf GlusterFS 3.7.0beta2 2015-05-13 09:07:21 -04:00
Kaleb S. KEITHLEY
b36e8c8b34 GlusterFS 3.7.0beta2, extra-xlators requires python-gluster 2015-05-12 05:26:36 -04:00
Kaleb S. KEITHLEY
05e1605d5d GlusterFS 3.7.0beta2, noarch python-gluster 2015-05-12 05:08:03 -04:00
Kaleb S. KEITHLEY
b666ad6bc8 GlusterFS 3.7.0beta2 2015-05-12 04:55:28 -04:00
Kaleb S. KEITHLEY
844877fb35 GlusterFS 3.7.0beta1, BZ 1195947, 1218440 2015-05-08 08:17:24 -04:00
Kaleb S. KEITHLEY
3d7b48d76e GlusterFS 3.7.0beta1, BZ 1218442 2015-05-05 09:19:39 -04:00
Kaleb S. KEITHLEY
b6a0a86106 GlusterFS 3.7.0beta1, BZ 1218359 2015-05-05 08:19:31 -04:00
Kaleb S. KEITHLEY
dab0202469 GlusterFS 3.7.0beta1 2015-04-29 09:00:51 -04:00
Kaleb S. KEITHLEY
2b56692727 GlusterFS 3.6.3 GA 2015-04-24 11:20:35 -04:00
Kaleb S. KEITHLEY
6a783fef31 preliminary for 3.7.0alpha 2015-04-20 08:46:05 -04:00
hchiramm
12a7daa1e0 GlusterFS 3.6.3beta2 release. 2015-04-01 15:37:10 +05:30
hchiramm
5dbed49fb3 GlusterFS 3.6.3beta1 release. 2015-02-13 12:13:44 +05:30
Kaleb S. KEITHLEY
0e459037d2 Ownership of /usr/lib/python2.7/site-packages/gluster, BZ 1190832
- N.B. gfapi.py was removed in 3.6 (to resurface another day?)
2015-02-10 10:07:15 -05:00
Lalatendu Mohanty
ed5e70dfbb GlusterFS 3.6.2-2 2015-02-02 22:41:18 +01:00
Kaleb S. KEITHLEY
4029a850a5 glusterfs-fuse Requires: attr, see BZ 1184626, 1184627 2015-01-28 10:17:46 -05:00
Lalatendu Mohanty
56b2672b3d GlusterFS 3.6.2 GA 2015-01-22 17:58:01 +05:30
Lalatendu Mohanty
e2563ee9e3 GlusterFS 3.6.2beta2 2015-01-15 14:53:38 +05:30
Lalatendu Mohanty
a34c2f113a GlusterFS 3.6.2beta1 and Fixing #1169005 (upstream)
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
2014-12-19 21:03:25 +05:30
Lalatendu Mohanty
48d9d9a5dd Fix build on el5 (upstream bug 1169004) 2014-11-29 01:33:00 +05:30
Niels de Vos
858ffb7e45 Fix version in gluster-api.pc so other packages can get rebuild
Samba (and others?) fail to rebuild because gluster-api.pc has a lower
version than it used to. This has been introduced by the symbol
versioning changes. An updated version of GlusterFS should get the
correct version in the gluster-api.pc file. Further details can be found
in http://review.gluster.org/9154.

Related: 1166232
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2014-11-20 17:03:59 +01:00
Lalatendu Mohanty
5de4161ab1 Changes to remove regression-tests RPM from Fedora 2014-11-19 20:58:19 +05:30
Lalatendu Mohanty
c91de78e68 GlusterFS 3.6.1 GA 2014-11-07 20:36:45 +05:30
hchiramm
67eb6ffa04 GlusterFs 3.6.0 beta3 release 2014-10-01 18:41:16 +05:30
Lalatenud Mohanty
ef0ff32ea3 Fixes ldconfig issue #1145992 2014-09-25 13:37:14 -04:00
Kaleb S. KEITHLEY
b963eff4a6 see previous 2014-09-25 12:23:48 -04:00
Kaleb S. KEITHLEY
112f23db7b add smarter logic for restarting glusterd in %post server 2014-09-25 11:29:59 -04:00
Kaleb S. KEITHLEY
46e49863dc add smarter logic for restarting glusterd in %post server 2014-09-25 11:29:18 -04:00
Kaleb S. KEITHLEY
45b19d1ab0 add Requires: psmisc to -server 2014-09-25 08:52:08 -04:00
Kaleb S. KEITHLEY
ac19e6ebd9 synch a couple minor diffs with upstream in prep for next beta 2014-09-25 07:42:46 -04:00
Kaleb S. KEITHLEY
9460531047 oops, add a changelog entry 2014-09-25 07:13:50 -04:00
Kaleb S. KEITHLEY
bf55b497ca glusterfs-3.6.0beta2.tar.gz to look-aside cache 2014-09-25 07:11:14 -04:00
Humble Chirammal
fd4b18e9f1 More make fedora master glusterfs spec compatible with upstream GlusterFS 3.6 spec 2014-09-24 16:41:50 +05:30
Lalatendu Mohanty
f49b86e741 Changed the description as "GlusterFS a distributed filesystem" 2014-09-16 23:29:55 +05:30
Peter Robinson
6864301910 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-16 17:24:14 +00:00
Kaleb S. KEITHLEY
7445b8c7a5 use upstream logrotate files exclusively (#1126788) 2014-08-05 08:40:27 -04:00
Lalatendu Mohanty
1474004c5d GlusterFS 3.5.2 GA 2014-07-31 23:43:44 +05:30
Lalatendu Mohanty
117ae4f966 GlusterFS 3.5.2 beta1 2014-07-22 00:22:46 +05:30
Kaleb S. KEITHLEY
4289dab879 glusterd.init, BZ 1073217 2014-07-09 07:26:44 -04:00
Kaleb S. KEITHLEY
04451c08dd glusterd init script: fix glusterfsd stop() not running at system
shutdown or reboot. RHBZ 1073217
2014-07-08 06:38:40 -04:00
Lalatendu Mohanty
552921b9c2 GlusterFS 3.5.1 GA 2014-06-24 20:07:27 +05:30
hchiramm
18fdedc976 GlusterFS 3.5.1 beta2 2014-06-11 11:17:30 +05:30
Dennis Gilmore
28dc0974dd - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 11:46:59 -05:00
Kaleb S. KEITHLEY
732a753f87 GlusterFS 3.5.1 beta1 2014-05-26 10:42:32 -04:00
Kaleb S. KEITHLEY
73879ff2e4 GlusterFS 3.5.1 beta1 2014-05-26 10:33:15 -04:00
Kaleb S. KEITHLEY
02481185b6 GlusterFS 3.5.1 beta1 2014-05-26 10:22:25 -04:00
Kaleb S. KEITHLEY
658ac97ef3 GlusterFS 3.5.1 beta1 2014-05-26 10:12:07 -04:00
Kaleb S. KEITHLEY
f7d186df20 syslog deprecated in Fedora20 BZ #1093318 2014-05-01 07:47:04 -04:00
Kaleb S. KEITHLEY
373c16e966 sync with upstream glusterfs.spec.in BZ #1091392 2014-04-28 07:25:48 -04:00
Kaleb S. KEITHLEY
0cd8f5ac00 sync with upstream glusterfs.spec.in BZ #1091392 2014-04-25 09:52:49 -04:00
Kaleb S. KEITHLEY
5bd720eb47 GlusterFS 3.5.0 GA, glusterfs-3.5.0-2, glusterfs.spec nits 2014-04-23 08:30:30 -04:00
Kaleb S. KEITHLEY
5cbf40d990 GlusterFS 3.5.0 GA 2014-04-17 13:13:07 -04:00
Kaleb S. KEITHLEY
71fcafd50d GlusterFS 3.4.3-3, patch xlators/nfs/server/src/nlm4.c 2014-04-14 17:32:41 -04:00
Kaleb S. KEITHLEY
40fe609cdf GlusterFS 3.5.0 beta5 2014-04-04 14:10:21 -04:00
Kaleb S. KEITHLEY
e0f9420dbe GlusterFS 3.4.3-2 2014-04-03 11:48:56 -04:00
Kaleb S. KEITHLEY
d0f531c17c GlusterFS 3.4.3 GA 2014-04-02 15:17:46 -04:00
Kaleb S. KEITHLEY
15cab6a44a 3.4.3-0.3beta2 2014-03-26 14:57:14 -04:00
Kaleb S. KEITHLEY
726e6ff9bb GlusterFS 3.4.3 beta1 2014-03-13 12:08:53 -04:00
Kaleb S. KEITHLEY
1d0cf40a3c GlusterFS 3.5.0 beta4 2014-03-08 13:38:01 -05:00
Kaleb S. KEITHLEY
61583609de GlusterFS 3.4.3 alpha1 2014-02-13 09:43:50 -05:00
Kaleb S. KEITHLEY
3999326517 GlusterFS 3.5.0 beta3 , glusterfs-3.5.0-0.5beta3 2014-02-11 14:58:38 -05:00
Kaleb S. KEITHLEY
50d21bff1f 3.5.0-0.4beta2 for el5 2014-01-27 16:15:40 -05:00
Kaleb S. KEITHLEY
6faf05e47b glusterfs-3.5.0-0.4beta2
with %changelog entry
2014-01-27 13:36:08 -05:00
Kaleb S. KEITHLEY
3c8b7fb140 glusterfs-3.5.0-0.4beta2 2014-01-27 13:32:50 -05:00
Kaleb S. KEITHLEY
6b1c8097a1 epel-7 fix 2014-01-16 18:46:07 -05:00
Kaleb S. KEITHLEY
b690634d06 glusterfs-3.5.0-0.3.beta1 2014-01-16 17:18:15 -05:00
Kaleb S. KEITHLEY
ce33d530cc Merge remote-tracking branch 'origin' into kk-el5 2014-01-16 16:07:14 -05:00
Ville Skyttä
d609738e98 Drop unnecessary ldconfig calls, do remaining ones without shell.
- Drop INSTALL from docs.
2014-01-16 22:19:51 +02:00
Kaleb S. KEITHLEY
117bd8afcb Merge remote-tracking branch 'origin' into kk-el5 2014-01-15 14:03:16 -05:00
Kaleb S. KEITHLEY
76eae69de8 glusterfs-3.5.0-0.1beta1
N.B. still using download.gluster.org for Source0 because I had to
respin the tarball with a small tweak to configure.ac (instead of a
patch). For GA we will switch to bits.gluster.org as the canonical
source.
2014-01-15 10:26:34 -05:00
Niels de Vos
678080bc0e The main glusterfs package should not provide glusterfs-libs
Because of this incorrect provides, there is no requirement to update
glusterfs-libs. Most users will get a newer glusterfs-libs when updating
anyway, but users that manually select RPMs for updating my skip the
package, which will break their system.

Resolves: 1048489
2014-01-04 17:40:09 +01:00
Kaleb S. KEITHLEY
584822f488 Merge remote-tracking branch 'origin' into kk-el5 2014-01-03 07:32:10 -05:00
Kaleb S. KEITHLEY
d38e826d1c GlusterFS 3.4.2 GA (glusterfs-3.4.2-1) 2014-01-03 07:22:49 -05:00
Niels de Vos
1ccb4ba84a Merge branch 'master' into kk-el5 2013-12-25 15:59:41 +01:00
Niels de Vos
b609dc6b9e add glusterfs-3.4.2qa5.tar.gz to the sources file 2013-12-25 15:58:16 +01:00
Niels de Vos
c2f197f328 Merge branch 'master' into kk-el5 2013-12-25 15:54:06 +01:00
Niels de Vos
21f73d00a7 GlusterFS 3.4.2 QA5, glusterfs-3.4.2-0.1qa5
Moving the download location of the tarball from download.gluster,org to
bits.gluster.org. bits.gluster.org is still/currently used for automatic
releases triggered from Jenkins.

Also correcting some of the build issues that were caused by the
previous commit. The Python gfapi.py module was not included in previous
source tarballs and could not be tested.
2013-12-25 15:42:23 +01:00
Niels de Vos
9b53e576b1 Include .../site-packages/gluster/gfapi.py in glusterfs-api
The current plan is to wait with merging these changes to the other
branches. glusterfs-3.4.2 is expected to be released early next week, we
will need to provide new builds with that release anyway.
2013-12-20 09:13:07 +01:00
Niels de Vos
a1e5e997b2 Include .../gluster/__init__.py in Fedora builds (not EL-6+ only)
Resolves: 1045123
2013-12-19 19:58:19 +01:00
Kaleb S. KEITHLEY
b9985b9d2d Merge remote-tracking branch 'origin' into kk-el5 2013-12-17 12:10:32 -05:00
Kaleb S. KEITHLEY
8c76f93f79 3.4.2qa4 2013-12-17 11:48:58 -05:00
Kaleb S. KEITHLEY
50f0ee1701 Merge remote-tracking branch 'origin' into kk-el5 2013-12-06 12:40:01 -05:00
Kaleb S. KEITHLEY
896530983b Merge branch 'master' of ssh://pkgs.fedoraproject.org/glusterfs 2013-12-06 12:28:40 -05:00
Kaleb S. KEITHLEY
0cdb934900 GlusterFS 3.5.0-0.1.qa3 2013-12-06 12:27:52 -05:00
Kaleb S. KEITHLEY
9c4f918d06 GlusterFS 3.4.0-0.1.qa3 2013-12-06 12:17:32 -05:00
Kaleb S. KEITHLEY
4062de4706 Merge remote-tracking branch 'origin/master' into kk-el5
Conflicts:
	glusterfs.spec
2013-11-06 14:16:54 -05:00
Kaleb S. KEITHLEY
43f3a1f020 various fixes for the next build. see %change 2013-11-06 14:10:39 -05:00
Niels de Vos
a9739ec316 fix "warning: File listed twice: .../glusterd.info" while building
In upstream/master: http://review.gluster.org/5836
In upstream/release-3.4: http://review.gluster.org/6149
2013-10-27 14:06:59 +01:00
Niels de Vos
ba4470a022 Improve glusterfsd.service to start and stop successfully
Resolves: 1022542
2013-10-27 13:55:24 +01:00
Niels de Vos
475b6a9a87 Improve glusterfsd.service to start and stop successfully
Resolves: 1022542
2013-10-27 12:31:18 +01:00
Niels de Vos
81a6a069c4 Add option to specify a different base-port
Resolves: 1023653
2013-10-27 12:31:17 +01:00
Kaleb S. KEITHLEY
6608ef7144 minor change to sync with upstream 2013-10-25 11:08:17 -04:00
75 changed files with 2616 additions and 5080 deletions

View file

@ -1,351 +0,0 @@
From c0619bd0c5eeb3d2f8af8b37575e11847664272c Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@suse.com>
Date: Thu, 21 Jun 2012 14:37:41 +0200
Subject: [PATCH] Do not use pickle for serialization in memcache, but JSON
We don't want to use pickle as it can execute arbitrary code. JSON is
safer. However, note that it supports serialization for only some
specific subset of object types; this should be enough for what we need,
though.
To avoid issues on upgrades (unability to read pickled values, and cache
poisoning for old servers not understanding JSON), we add a
memcache_serialization_support configuration option, with the following
values:
0 = older, insecure pickle serialization (compatible, default in this release)
1 = json serialization but pickles can still be read (still insecure)
2 = json serialization only (secure, suggested, and the future default)
To avoid an instant full cache flush, existing installations should
upgrade with 0, then set to 1 and reload, then after some time (24
hours) set to 2 and reload. Support for 0 and 1 will be removed in
future versions.
Part of bug 1006414.
Patch Set 2: Added Vincent Untz <vuntz@suse.com> to AUTHORS
Change-Id: Id7d6d547b103b4f23ebf5be98b88f09ec6027ce4
---
doc/manpages/proxy-server.conf.5 | 15 ++++++++
etc/memcache.conf-sample | 10 +++++
etc/proxy-server.conf-sample | 12 ++++++
swift/common/memcached.py | 48 +++++++++++++++++++++-----
swift/common/middleware/memcache.py | 30 ++++++++++++----
test/unit/common/middleware/test_memcache.py | 5 ++-
test/unit/common/test_memcached.py | 22 ++++++++++++
7 files changed, 125 insertions(+), 17 deletions(-)
diff --git a/doc/manpages/proxy-server.conf.5 b/doc/manpages/proxy-server.conf.5
index 4979e4d..5cf5a7e 100644
--- a/doc/manpages/proxy-server.conf.5
+++ b/doc/manpages/proxy-server.conf.5
@@ -205,6 +205,21 @@ Enables the ability to log request headers. The default is False.
.IP \fBmemcache_servers\fR
The memcache servers that are available. This can be a list separated by commas. The default
is 127.0.0.1:11211.
+.IP \fBmemcache_serialization_support\fR
+This sets how memcache values are serialized and deserialized:
+.RE
+
+.PD 0
+.RS 10
+.IP "0 = older, insecure pickle serialization (default)"
+.IP "1 = json serialization but pickles can still be read (still insecure)"
+.IP "2 = json serialization only (secure)"
+.RE
+
+.RS 10
+To avoid an instant full cache flush, existing installations should upgrade with 0, then set to 1 and reload, then after some time (24 hours) set to 2 and reload. In the future, the ability to use pickle serialization will be removed.
+
+If not set in the configuration file, the value for memcache_serialization_support will be read from /etc/swift/memcache.conf if it exists (see memcache.conf-sample). Otherwise, the default value as indicated above will be used.
.RE
diff --git a/etc/memcache.conf-sample b/etc/memcache.conf-sample
index 580d94a..cedfc19 100644
--- a/etc/memcache.conf-sample
+++ b/etc/memcache.conf-sample
@@ -3,3 +3,13 @@
# several other conf files under [filter:cache] for example. You can specify
# multiple servers separated with commas, as in: 10.1.2.3:11211,10.1.2.4:11211
# memcache_servers = 127.0.0.1:11211
+#
+# Sets how memcache values are serialized and deserialized:
+# 0 = older, insecure pickle serialization (compatible, default in this release)
+# 1 = json serialization but pickles can still be read (still insecure)
+# 2 = json serialization only (secure, suggested, and the future default)
+# To avoid an instant full cache flush, existing installations should
+# upgrade with 0, then set to 1 and reload, then after some time (24 hours)
+# set to 2 and reload.
+# In the future, the ability to use pickle serialization will be removed.
+# memcache_serialization_support = 0
diff --git a/etc/proxy-server.conf-sample b/etc/proxy-server.conf-sample
index 148616b..18f711a 100644
--- a/etc/proxy-server.conf-sample
+++ b/etc/proxy-server.conf-sample
@@ -122,6 +122,18 @@ use = egg:swift#memcache
# default to the value below. You can specify multiple servers separated with
# commas, as in: 10.1.2.3:11211,10.1.2.4:11211
# memcache_servers = 127.0.0.1:11211
+#
+# Sets how memcache values are serialized and deserialized:
+# 0 = older, insecure pickle serialization (compatible, default in this release)
+# 1 = json serialization but pickles can still be read (still insecure)
+# 2 = json serialization only (secure, suggested, and the future default)
+# If not set here, the value for memcache_serialization_support will be read
+# from /etc/swift/memcache.conf (see memcache.conf-sample).
+# To avoid an instant full cache flush, existing installations should
+# upgrade with 0, then set to 1 and reload, then after some time (24 hours)
+# set to 2 and reload.
+# In the future, the ability to use pickle serialization will be removed.
+# memcache_serialization_support = 0
[filter:ratelimit]
use = egg:swift#ratelimit
diff --git a/swift/common/memcached.py b/swift/common/memcached.py
index ecd9332..82ebb7a 100644
--- a/swift/common/memcached.py
+++ b/swift/common/memcached.py
@@ -27,11 +27,17 @@ import time
from bisect import bisect
from hashlib import md5
+try:
+ import simplejson as json
+except ImportError:
+ import json
+
DEFAULT_MEMCACHED_PORT = 11211
CONN_TIMEOUT = 0.3
IO_TIMEOUT = 2.0
PICKLE_FLAG = 1
+JSON_FLAG = 2
NODE_WEIGHT = 50
PICKLE_PROTOCOL = 2
TRY_COUNT = 3
@@ -57,7 +63,8 @@ class MemcacheRing(object):
"""
def __init__(self, servers, connect_timeout=CONN_TIMEOUT,
- io_timeout=IO_TIMEOUT, tries=TRY_COUNT):
+ io_timeout=IO_TIMEOUT, tries=TRY_COUNT,
+ allow_pickle=False, allow_unpickle=False):
self._ring = {}
self._errors = dict(((serv, []) for serv in servers))
self._error_limited = dict(((serv, 0) for serv in servers))
@@ -69,6 +76,8 @@ class MemcacheRing(object):
self._client_cache = dict(((server, []) for server in servers))
self._connect_timeout = connect_timeout
self._io_timeout = io_timeout
+ self._allow_pickle = allow_pickle
+ self._allow_unpickle = allow_unpickle or allow_pickle
def _exception_occurred(self, server, e, action='talking'):
if isinstance(e, socket.timeout):
@@ -130,16 +139,21 @@ class MemcacheRing(object):
:param key: key
:param value: value
- :param serialize: if True, value is pickled before sending to memcache
+ :param serialize: if True, value is serialized with JSON before sending
+ to memcache, or with pickle if configured to use
+ pickle instead of JSON (to avoid cache poisoning)
:param timeout: ttl in memcache
"""
key = md5hash(key)
if timeout > 0:
timeout += time.time()
flags = 0
- if serialize:
+ if serialize and self._allow_pickle:
value = pickle.dumps(value, PICKLE_PROTOCOL)
flags |= PICKLE_FLAG
+ elif serialize:
+ value = json.dumps(value)
+ flags |= JSON_FLAG
for (server, fp, sock) in self._get_conns(key):
try:
sock.sendall('set %s %d %d %s noreply\r\n%s\r\n' % \
@@ -151,8 +165,9 @@ class MemcacheRing(object):
def get(self, key):
"""
- Gets the object specified by key. It will also unpickle the object
- before returning if it is pickled in memcache.
+ Gets the object specified by key. It will also unserialize the object
+ before returning if it is serialized in memcache with JSON, or if it
+ is pickled and unpickling is allowed.
:param key: key
:returns: value of the key in memcache
@@ -168,7 +183,12 @@ class MemcacheRing(object):
size = int(line[3])
value = fp.read(size)
if int(line[2]) & PICKLE_FLAG:
- value = pickle.loads(value)
+ if self._allow_unpickle:
+ value = pickle.loads(value)
+ else:
+ value = None
+ elif int(line[2]) & JSON_FLAG:
+ value = json.loads(value)
fp.readline()
line = fp.readline().strip().split()
self._return_conn(server, fp, sock)
@@ -258,7 +278,9 @@ class MemcacheRing(object):
:param mapping: dictonary of keys and values to be set in memcache
:param servery_key: key to use in determining which server in the ring
is used
- :param serialize: if True, value is pickled before sending to memcache
+ :param serialize: if True, value is serialized with JSON before sending
+ to memcache, or with pickle if configured to use
+ pickle instead of JSON (to avoid cache poisoning)
:param timeout: ttl for memcache
"""
server_key = md5hash(server_key)
@@ -268,9 +290,12 @@ class MemcacheRing(object):
for key, value in mapping.iteritems():
key = md5hash(key)
flags = 0
- if serialize:
+ if serialize and self._allow_pickle:
value = pickle.dumps(value, PICKLE_PROTOCOL)
flags |= PICKLE_FLAG
+ elif serialize:
+ value = json.dumps(value)
+ flags |= JSON_FLAG
msg += ('set %s %d %d %s noreply\r\n%s\r\n' %
(key, flags, timeout, len(value), value))
for (server, fp, sock) in self._get_conns(server_key):
@@ -302,7 +327,12 @@ class MemcacheRing(object):
size = int(line[3])
value = fp.read(size)
if int(line[2]) & PICKLE_FLAG:
- value = pickle.loads(value)
+ if self._allow_unpickle:
+ value = pickle.loads(value)
+ else:
+ value = None
+ elif int(line[2]) & JSON_FLAG:
+ value = json.loads(value)
responses[line[1]] = value
fp.readline()
line = fp.readline().strip().split()
diff --git a/swift/common/middleware/memcache.py b/swift/common/middleware/memcache.py
index eb988bd..20121c9 100644
--- a/swift/common/middleware/memcache.py
+++ b/swift/common/middleware/memcache.py
@@ -27,20 +27,36 @@ class MemcacheMiddleware(object):
def __init__(self, app, conf):
self.app = app
self.memcache_servers = conf.get('memcache_servers')
- if not self.memcache_servers:
+ serialization_format = conf.get('memcache_serialization_support')
+
+ if not self.memcache_servers or serialization_format is None:
path = os.path.join(conf.get('swift_dir', '/etc/swift'),
'memcache.conf')
memcache_conf = ConfigParser()
if memcache_conf.read(path):
- try:
- self.memcache_servers = \
- memcache_conf.get('memcache', 'memcache_servers')
- except (NoSectionError, NoOptionError):
- pass
+ if not self.memcache_servers:
+ try:
+ self.memcache_servers = \
+ memcache_conf.get('memcache', 'memcache_servers')
+ except (NoSectionError, NoOptionError):
+ pass
+ if serialization_format is None:
+ try:
+ serialization_format = \
+ memcache_conf.get('memcache',
+ 'memcache_serialization_support')
+ except (NoSectionError, NoOptionError):
+ pass
+
if not self.memcache_servers:
self.memcache_servers = '127.0.0.1:11211'
+ if serialization_format is None:
+ serialization_format = 0
+
self.memcache = MemcacheRing(
- [s.strip() for s in self.memcache_servers.split(',') if s.strip()])
+ [s.strip() for s in self.memcache_servers.split(',') if s.strip()],
+ allow_pickle=(serialization_format == 0),
+ allow_unpickle=(serialization_format <= 1))
def __call__(self, env, start_response):
env['swift.cache'] = self.memcache
diff --git a/test/unit/common/middleware/test_memcache.py b/test/unit/common/middleware/test_memcache.py
index 6b94bd1..e217a96 100644
--- a/test/unit/common/middleware/test_memcache.py
+++ b/test/unit/common/middleware/test_memcache.py
@@ -47,6 +47,8 @@ class SetConfigParser(object):
if section == 'memcache':
if option == 'memcache_servers':
return '1.2.3.4:5'
+ elif option == 'memcache_serialization_support':
+ return '2'
else:
raise NoOptionError(option)
else:
@@ -86,7 +88,8 @@ class TestCacheMiddleware(unittest.TestCase):
exc = None
try:
app = memcache.MemcacheMiddleware(
- FakeApp(), {'memcache_servers': '1.2.3.4:5'})
+ FakeApp(), {'memcache_servers': '1.2.3.4:5',
+ 'memcache_serialization_support': '2'})
except Exception, err:
exc = err
finally:
diff --git a/test/unit/common/test_memcached.py b/test/unit/common/test_memcached.py
index dff6e80..3016d10 100644
--- a/test/unit/common/test_memcached.py
+++ b/test/unit/common/test_memcached.py
@@ -1,3 +1,4 @@
+ # -*- coding: utf8 -*-
# Copyright (c) 2010-2012 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -166,6 +167,9 @@ class TestMemcached(unittest.TestCase):
self.assertEquals(memcache_client.get('some_key'), [1, 2, 3])
memcache_client.set('some_key', [4, 5, 6])
self.assertEquals(memcache_client.get('some_key'), [4, 5, 6])
+ memcache_client.set('some_key', ['simple str', 'utf8 str éà'])
+ # As per http://wiki.openstack.org/encoding, we should expect to have unicode
+ self.assertEquals(memcache_client.get('some_key'), ['simple str', u'utf8 str éà'])
self.assert_(float(mock.cache.values()[0][1]) == 0)
esttimeout = time.time() + 10
memcache_client.set('some_key', [1, 2, 3], timeout=10)
@@ -244,6 +248,24 @@ class TestMemcached(unittest.TestCase):
self.assertEquals(memcache_client.get_multi(('some_key2', 'some_key1',
'not_exists'), 'multi_key'), [[4, 5, 6], [1, 2, 3], None])
+ def test_serialization(self):
+ memcache_client = memcached.MemcacheRing(['1.2.3.4:11211'],
+ allow_pickle=True)
+ mock = MockMemcached()
+ memcache_client._client_cache['1.2.3.4:11211'] = [(mock, mock)] * 2
+ memcache_client.set('some_key', [1, 2, 3])
+ self.assertEquals(memcache_client.get('some_key'), [1, 2, 3])
+ memcache_client._allow_pickle = False
+ memcache_client._allow_unpickle = True
+ self.assertEquals(memcache_client.get('some_key'), [1, 2, 3])
+ memcache_client._allow_unpickle = False
+ self.assertEquals(memcache_client.get('some_key'), None)
+ memcache_client.set('some_key', [1, 2, 3])
+ self.assertEquals(memcache_client.get('some_key'), [1, 2, 3])
+ memcache_client._allow_unpickle = True
+ self.assertEquals(memcache_client.get('some_key'), [1, 2, 3])
+ memcache_client._allow_pickle = True
+ self.assertEquals(memcache_client.get('some_key'), [1, 2, 3])
if __name__ == '__main__':
unittest.main()

View file

@ -1,53 +0,0 @@
From 43e8681d5cbd6c919e379fe25cccc189827e2d60 Mon Sep 17 00:00:00 2001
From: Alan Pevec <apevec@redhat.com>
Date: Wed, 4 Jan 2012 00:15:05 +0100
Subject: [PATCH] Use updated parallel install versions of epel package
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Use WebOb >= 1.0
and depend on the EPEL parallel installable versions of the package
to satisfy those requirements.
Based on Nova/Glance EPEL patch by Pádraig Brady <P@draigBrady.com>
---
swift/__init__.py | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/swift/__init__.py b/swift/__init__.py
index 9065801..9600d1e 100644
--- a/swift/__init__.py
+++ b/swift/__init__.py
@@ -1,3 +1,32 @@
+import sys
+import pkg_resources
+
+# If there is a conflicting non egg module,
+# i.e. an older standard system module installed,
+# then replace it with this requirement
+def replace_dist(requirement):
+ try:
+ return pkg_resources.require(requirement)
+ except pkg_resources.VersionConflict:
+ e = sys.exc_info()[1]
+ dist=e.args[0]
+ req=e.args[1]
+ if dist.key == req.key and not dist.location.endswith('.egg'):
+ del pkg_resources.working_set.by_key[dist.key]
+ # We assume there is no need to adjust sys.path
+ # and the associated pkg_resources.working_set.entries
+ return pkg_resources.require(requirement)
+
+replace_dist("WebOb >= 1.0")
+
+replace_dist("PasteDeploy >= 1.5.0")
+# This hack is needed because replace_dist() results in
+# the standard paste module path being at the start of __path__.
+# TODO: See can we get pkg_resources to do the right thing directly
+import paste
+paste.__path__.insert(0, paste.__path__.pop(-1))
+
+
import gettext

11
0001-configure.ac.patch Normal file
View file

@ -0,0 +1,11 @@
--- glusterfs-11.0/configure.ac.orig 2023-02-07 08:27:06.663310072 -0500
+++ glusterfs-11.0/configure.ac 2023-02-07 08:27:56.012452316 -0500
@@ -1319,7 +1319,7 @@
fi
GF_HOST_OS=""
-GF_LDFLAGS="${GF_LDFLAGS} -rdynamic"
+GF_LDFLAGS="${GF_LDFLAGS} -rdynamic -fuse-ld=mold"
dnl see --with-libtirpc option check above, libtirpc(-devel) is required for
dnl ipv6-default

View file

@ -1,37 +0,0 @@
From 7df10fb14d27e35faa590770594ea1b05552576f Mon Sep 17 00:00:00 2001
From: Alan Pevec <apevec@redhat.com>
Date: Thu, 5 Jan 2012 00:03:00 +0100
Subject: [PATCH] Add fixes for building the doc package
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Don't access the net and always reference
the swift module from the package we're building
Based on Nova/Glance EPEL patch by Pádraig Brady <P@draigBrady.com>
---
doc/source/conf.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/source/conf.py b/doc/source/conf.py
index e6a43b0..3734cd4 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -33,14 +33,14 @@ import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.append([os.path.abspath('../swift'), os.path.abspath('..'),
- os.path.abspath('../bin')])
+sys.path.extend([os.path.abspath('../../swift'), os.path.abspath('../..'),
+ os.path.abspath('../../bin')])
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx',
+extensions = ['sphinx.ext.autodoc',
'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath',
'sphinx.ext.ifconfig']
todo_include_todos = True

View file

@ -1,37 +0,0 @@
From 7df10fb14d27e35faa590770594ea1b05552576f Mon Sep 17 00:00:00 2001
From: Alan Pevec <apevec@redhat.com>
Date: Thu, 5 Jan 2012 00:03:00 +0100
Subject: [PATCH] Add fixes for building the doc package
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Don't access the net and always reference
the swift module from the package we're building
Based on Nova/Glance EPEL patch by Pádraig Brady <P@draigBrady.com>
---
doc/source/conf.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/source/conf.py b/doc/source/conf.py
index e6a43b0..3734cd4 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -20,14 +20,14 @@ import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.extend([os.path.abspath('../swift'), os.path.abspath('..'),
- os.path.abspath('../bin')])
+sys.path.extend([os.path.abspath('../../swift'), os.path.abspath('../..'),
+ os.path.abspath('../../bin')])
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx',
+extensions = ['sphinx.ext.autodoc',
'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath',
'sphinx.ext.ifconfig']
todo_include_todos = True

View file

@ -1,70 +0,0 @@
From c38568f026853f64f2669f03bd56441b007f13be Mon Sep 17 00:00:00 2001
From: gholt <z-launchpad@brim.net>
Date: Tue, 18 Sep 2012 18:24:47 +0000
Subject: [PATCH] Fix bug where serialization_format is ignored
Change-Id: I5a5ac8b5f18e077105ab12e9b1f0ccafac3983f7
---
swift/common/middleware/memcache.py | 2 ++
test/unit/common/middleware/test_memcache.py | 12 ++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/swift/common/middleware/memcache.py b/swift/common/middleware/memcache.py
index 20121c9..06678c4 100644
--- a/swift/common/middleware/memcache.py
+++ b/swift/common/middleware/memcache.py
@@ -52,6 +52,8 @@ class MemcacheMiddleware(object):
self.memcache_servers = '127.0.0.1:11211'
if serialization_format is None:
serialization_format = 0
+ else:
+ serialization_format = int(serialization_format)
self.memcache = MemcacheRing(
[s.strip() for s in self.memcache_servers.split(',') if s.strip()],
diff --git a/test/unit/common/middleware/test_memcache.py b/test/unit/common/middleware/test_memcache.py
index e217a96..28c7b13 100644
--- a/test/unit/common/middleware/test_memcache.py
+++ b/test/unit/common/middleware/test_memcache.py
@@ -48,7 +48,7 @@ class SetConfigParser(object):
if option == 'memcache_servers':
return '1.2.3.4:5'
elif option == 'memcache_serialization_support':
- return '2'
+ return '1'
else:
raise NoOptionError(option)
else:
@@ -104,6 +104,8 @@ class TestCacheMiddleware(unittest.TestCase):
finally:
memcache.ConfigParser = orig_parser
self.assertEquals(app.memcache_servers, '127.0.0.1:11211')
+ self.assertEquals(app.memcache._allow_pickle, True)
+ self.assertEquals(app.memcache._allow_unpickle, True)
def test_conf_from_extra_conf(self):
orig_parser = memcache.ConfigParser
@@ -113,16 +115,22 @@ class TestCacheMiddleware(unittest.TestCase):
finally:
memcache.ConfigParser = orig_parser
self.assertEquals(app.memcache_servers, '1.2.3.4:5')
+ self.assertEquals(app.memcache._allow_pickle, False)
+ self.assertEquals(app.memcache._allow_unpickle, True)
def test_conf_from_inline_conf(self):
orig_parser = memcache.ConfigParser
memcache.ConfigParser = SetConfigParser
try:
app = memcache.MemcacheMiddleware(
- FakeApp(), {'memcache_servers': '6.7.8.9:10'})
+ FakeApp(),
+ {'memcache_servers': '6.7.8.9:10',
+ 'serialization_format': '0'})
finally:
memcache.ConfigParser = orig_parser
self.assertEquals(app.memcache_servers, '6.7.8.9:10')
+ self.assertEquals(app.memcache._allow_pickle, False)
+ self.assertEquals(app.memcache._allow_unpickle, True)
if __name__ == '__main__':

View file

@ -0,0 +1,212 @@
--- glusterfs-11.0/contrib/aclocal/python.m4.orig 2023-06-16 11:18:03.550994174 -0400
+++ glusterfs-11.0/contrib/aclocal/python.m4 2023-06-16 11:18:47.875238947 -0400
@@ -1,209 +1 @@
-## ------------------------ -*- Autoconf -*-
-## Python file handling
-## From Andrew Dalke
-## Updated by James Henstridge
## ------------------------
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# ---------------------------------------------------------------------------
-# Adds support for distributing Python modules and packages. To
-# install modules, copy them to $(pythondir), using the python_PYTHON
-# automake variable. To install a package with the same name as the
-# automake package, install to $(pkgpythondir), or use the
-# pkgpython_PYTHON automake variable.
-#
-# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
-# locations to install python extension modules (shared libraries).
-# Another macro is required to find the appropriate flags to compile
-# extension modules.
-#
-# If your package is configured with a different prefix to python,
-# users will have to add the install directory to the PYTHONPATH
-# environment variable, or create a .pth file (see the python
-# documentation for details).
-#
-# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
-# cause an error if the version of python installed on the system
-# doesn't meet the requirement. MINIMUM-VERSION should consist of
-# numbers and dots only.
-AC_DEFUN([AM_PATH_PYTHON],
- [
- dnl Find a Python interpreter. Python versions prior to 2.0 are not
- dnl supported. (2.0 was released on October 16, 2000).
- m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
- [python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 dnl
-python2.1 python2.0])
-
- m4_if([$1],[],[
- dnl No version check is needed.
- # Find any Python interpreter.
- if test -z "$PYTHON"; then
- AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
- fi
- am_display_PYTHON=python
- ], [
- dnl A version check is needed.
- if test -n "$PYTHON"; then
- # If the user set $PYTHON, use it and don't search something else.
- AC_MSG_CHECKING([whether $PYTHON version >= $1])
- AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
- [AC_MSG_RESULT(yes)],
- [AC_MSG_ERROR(too old)])
- am_display_PYTHON=$PYTHON
- else
- # Otherwise, try each interpreter until we find one that satisfies
- # VERSION.
- AC_CACHE_CHECK([for a Python interpreter with version >= $1],
- [am_cv_pathless_PYTHON],[
- for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
- test "$am_cv_pathless_PYTHON" = none && break
- AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
- done])
- # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
- if test "$am_cv_pathless_PYTHON" = none; then
- PYTHON=:
- else
- AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
- fi
- am_display_PYTHON=$am_cv_pathless_PYTHON
- fi
- ])
-
- if test "$PYTHON" = :; then
- dnl Run any user-specified action, or abort.
- m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
- else
-
- dnl Query Python for its version number. Getting [:3] seems to be
- dnl the best way to do this; it's what "site.py" does in the standard
- dnl library.
-
- AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
- [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
- AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
-
- dnl Use the values of $prefix and $exec_prefix for the corresponding
- dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
- dnl distinct variables so they can be overridden if need be. However,
- dnl general consensus is that you shouldn't need this ability.
-
- AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
- AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
-
- dnl At times (like when building shared libraries) you may want
- dnl to know which OS platform Python thinks this is.
-
- AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
- [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
- AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
-
-
- dnl Set up 4 directories:
-
- dnl pythondir -- where to install python scripts. This is the
- dnl site-packages directory, not the python standard library
- dnl directory like in previous automake betas. This behavior
- dnl is more consistent with lispdir.m4 for example.
- dnl Query distutils for this directory. distutils does not exist in
- dnl Python 1.5, so we fall back to the hardcoded directory if it
- dnl doesn't work.
- AC_CACHE_CHECK([for $am_display_PYTHON script directory],
- [am_cv_python_pythondir],
- [if test "x$prefix" = xNONE
- then
- am_py_prefix=$ac_default_prefix
- else
- am_py_prefix=$prefix
- fi
- am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
- echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
- case $am_cv_python_pythondir in
- $am_py_prefix*)
- am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
- am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
- ;;
- *)
- case $am_py_prefix in
- /usr|/System*) ;;
- *)
- am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
- ;;
- esac
- ;;
- esac
- ])
- AC_SUBST([pythondir], [$am_cv_python_pythondir])
-
- dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
- dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
- dnl more consistent with the rest of automake.
-
- AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
-
- dnl pyexecdir -- directory for installing python extension modules
- dnl (shared libraries)
- dnl Query distutils for this directory. distutils does not exist in
- dnl Python 1.5, so we fall back to the hardcoded directory if it
- dnl doesn't work.
- AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
- [am_cv_python_pyexecdir],
- [if test "x$exec_prefix" = xNONE
- then
- am_py_exec_prefix=$am_py_prefix
- else
- am_py_exec_prefix=$exec_prefix
- fi
- am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
- echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
- case $am_cv_python_pyexecdir in
- $am_py_exec_prefix*)
- am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
- am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
- ;;
- *)
- case $am_py_exec_prefix in
- /usr|/System*) ;;
- *)
- am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
- ;;
- esac
- ;;
- esac
- ])
- AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
-
- dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
-
- AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
-
- dnl Run any user-specified action.
- $2
- fi
-
-])
-
-
-# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
-# ---------------------------------------------------------------------------
-# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
-# Run ACTION-IF-FALSE otherwise.
-# This test uses sys.hexversion instead of the string equivalent (first
-# word of sys.version), in order to cope with versions such as 2.2c1.
-# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
-AC_DEFUN([AM_PYTHON_CHECK_VERSION],
- [prog="import sys
-# split strings by '.' and convert to numeric. Append some zeros
-# because we need at least 4 digits for the hex conversion.
-# map returns an iterator in Python 3.0 and a list in 2.x
-minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
-minverhex = 0
-# xrange is not present in Python 3.0 and range returns an iterator
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
-sys.exit(sys.hexversion < minverhex)"
- AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])

View file

@ -0,0 +1,126 @@
diff -ruN glusterfs-11.2/api/examples/Makefile.am glusterfs-11.2-mod/api/examples/Makefile.am
--- glusterfs-11.2/api/examples/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/api/examples/Makefile.am 2025-07-02 12:31:15.002167956 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
# The bits needed for glfsxmp
EXTRA_PROGRAMS = glfsxmp
glfsxmp_SOURCES = glfsxmp.c
diff -ruN glusterfs-11.2/contrib/fuse-util/Makefile.am glusterfs-11.2-mod/contrib/fuse-util/Makefile.am
--- glusterfs-11.2/contrib/fuse-util/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/contrib/fuse-util/Makefile.am 2025-07-02 12:31:32.290546271 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
bin_PROGRAMS = fusermount-glusterfs
fusermount_glusterfs_SOURCES = fusermount.c mount_util.c $(CONTRIBDIR)/fuse-lib/mount-common.c
diff -ruN glusterfs-11.2/libglusterfs/src/Makefile.am glusterfs-11.2-mod/libglusterfs/src/Makefile.am
--- glusterfs-11.2/libglusterfs/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/libglusterfs/src/Makefile.am 2025-07-02 12:26:47.776161392 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
noinst_PYTHON = generator.py gen-defaults.py $(top_srcdir)/events/eventskeygen.py
libglusterfs_la_CFLAGS = $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS) \
diff -ruN glusterfs-11.2/xlators/cluster/afr/src/Makefile.am glusterfs-11.2-mod/xlators/cluster/afr/src/Makefile.am
--- glusterfs-11.2/xlators/cluster/afr/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/xlators/cluster/afr/src/Makefile.am 2025-07-02 12:26:21.567940962 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
xlator_LTLIBRARIES = afr.la
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/cluster
diff -ruN glusterfs-11.2/xlators/cluster/dht/src/Makefile.am glusterfs-11.2-mod/xlators/cluster/dht/src/Makefile.am
--- glusterfs-11.2/xlators/cluster/dht/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/xlators/cluster/dht/src/Makefile.am 2025-07-02 12:26:07.943843179 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
xlator_LTLIBRARIES = dht.la nufa.la switch.la
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff -ruN glusterfs-11.2/xlators/cluster/ec/src/Makefile.am glusterfs-11.2-mod/xlators/cluster/ec/src/Makefile.am
--- glusterfs-11.2/xlators/cluster/ec/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/xlators/cluster/ec/src/Makefile.am 2025-07-02 12:25:45.287655225 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
xlator_LTLIBRARIES = ec.la
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/cluster
diff -ruN glusterfs-11.2/xlators/features/changelog/lib/src/Makefile.am glusterfs-11.2-mod/xlators/features/changelog/lib/src/Makefile.am
--- glusterfs-11.2/xlators/features/changelog/lib/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/xlators/features/changelog/lib/src/Makefile.am 2025-07-02 12:25:15.015401482 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
libgfchangelog_la_CFLAGS = -Wall $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS) \
-DDATADIR=\"$(localstatedir)\"
diff -ruN glusterfs-11.2/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am glusterfs-11.2-mod/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am
--- glusterfs-11.2/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile.am 2025-07-02 12:24:16.783001896 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
csp_LTLIBRARIES = cloudsyncs3.la
cspdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/cloudsync-plugins
diff -ruN glusterfs-11.2/xlators/features/cloudsync/src/cloudsync-plugins/src/cvlt/src/Makefile.am glusterfs-11.2-mod/xlators/features/cloudsync/src/cloudsync-plugins/src/cvlt/src/Makefile.am
--- glusterfs-11.2/xlators/features/cloudsync/src/cloudsync-plugins/src/cvlt/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/xlators/features/cloudsync/src/cloudsync-plugins/src/cvlt/src/Makefile.am 2025-07-02 12:24:00.726984102 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
csp_LTLIBRARIES = cloudsynccvlt.la
cspdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/cloudsync-plugins
diff -ruN glusterfs-11.2/xlators/features/cloudsync/src/Makefile.am glusterfs-11.2-mod/xlators/features/cloudsync/src/Makefile.am
--- glusterfs-11.2/xlators/features/cloudsync/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/xlators/features/cloudsync/src/Makefile.am 2025-07-02 12:24:45.054966491 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
SUBDIRS = cloudsync-plugins
xlator_LTLIBRARIES = cloudsync.la
diff -ruN glusterfs-11.2/xlators/features/thin-arbiter/src/Makefile.am glusterfs-11.2-mod/xlators/features/thin-arbiter/src/Makefile.am
--- glusterfs-11.2/xlators/features/thin-arbiter/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/xlators/features/thin-arbiter/src/Makefile.am 2025-07-02 12:22:10.366019070 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
xlator_LTLIBRARIES = thin-arbiter.la
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
diff -ruN glusterfs-11.2/xlators/features/utime/src/Makefile.am glusterfs-11.2-mod/xlators/features/utime/src/Makefile.am
--- glusterfs-11.2/xlators/features/utime/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/xlators/features/utime/src/Makefile.am 2025-07-02 12:21:54.421923762 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
xlator_LTLIBRARIES = utime.la
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
diff -ruN glusterfs-11.2/xlators/mgmt/glusterd/src/Makefile.am glusterfs-11.2-mod/xlators/mgmt/glusterd/src/Makefile.am
--- glusterfs-11.2/xlators/mgmt/glusterd/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/xlators/mgmt/glusterd/src/Makefile.am 2025-07-02 12:20:49.141466838 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
if WITH_SERVER
xlator_LTLIBRARIES = glusterd.la
endif
diff -ruN glusterfs-11.2/xlators/mount/fuse/src/Makefile.am glusterfs-11.2-mod/xlators/mount/fuse/src/Makefile.am
--- glusterfs-11.2/xlators/mount/fuse/src/Makefile.am 2025-06-10 16:27:14.000000000 +0300
+++ glusterfs-11.2-mod/xlators/mount/fuse/src/Makefile.am 2025-07-02 12:19:50.029047303 +0300
@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
noinst_HEADERS_linux = $(CONTRIBDIR)/fuse-include/fuse_kernel.h\
$(CONTRIBDIR)/fuse-include/mount_util.h\
$(CONTRIBDIR)/fuse-lib/mount-gluster-compat.h

21
README.md Normal file
View file

@ -0,0 +1,21 @@
# Gluster
Gluster is a software defined distributed storage that can scale to several
petabytes. It provides interfaces for object, block and file storage.
## Development
Contributions to gluster in the form of patches and new feature additions can
be made by following steps outlined at [Developers Guide](https://gluster.readthedocs.io/en/latest/Developer-guide/Developers-Index/#contributing-to-the-gluster-community).
## Documentation
The Gluster documentation can be found at [Gluster Docs](http://gluster.readthedocs.io/en/latest).
## Deployment
Quick instructions to build and install can be found in [INSTALL](INSTALL) file.
## Maintainers
The list of Gluster maintainers is available in [MAINTAINERS](MAINTAINERS) file.
## License
Gluster is dual licensed under [GPLV2](COPYING-GPLV2) and [LGPLV3+](COPYING-LGPLV3).
Please visit the [Gluster Home Page](http://www.gluster.org/) to find out more about Gluster.

View file

@ -1,16 +0,0 @@
[DEFAULT]
bind_ip = 127.0.0.1
bind_port = 6012
workers = 2
[pipeline:main]
pipeline = account-server
[app:account-server]
use = egg:swift#account
[account-replicator]
[account-auditor]
[account-reaper]

View file

@ -1,18 +0,0 @@
[DEFAULT]
bind_ip = 127.0.0.1
bind_port = 6011
workers = 2
[pipeline:main]
pipeline = container-server
[app:container-server]
use = egg:swift#container
[container-replicator]
[container-updater]
[container-auditor]
[container-sync]

View file

@ -1,12 +0,0 @@
# After network.target just because.
[Unit]
Description=OpenStack Object Storage (swift) - Account Auditor
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-account-auditor /etc/swift/account-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Account Auditor instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-account-auditor /etc/swift/account-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Account Reaper
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-account-reaper /etc/swift/account-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Account Reaper instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-account-reaper /etc/swift/account-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,12 +0,0 @@
# After network.target just so replicator can talk to other nodes.
[Unit]
Description=OpenStack Object Storage (swift) - Account Replicator
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-account-replicator /etc/swift/account-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Account Replicator instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-account-replicator /etc/swift/account-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,78 +0,0 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: gluster-swift-account
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Stop: 0 1 6
# Short-Description: Swift account server
# Description: Account server for swift.
### END INIT INFO
# gluster-swift-account: swift account server
#
# chkconfig: - 20 80
# description: Account server for swift.
. /etc/rc.d/init.d/functions
. /usr/share/gluster-swift/functions
name="account"
[ -e "/etc/sysconfig/gluster-swift-$name" ] && . "/etc/sysconfig/gluster-swift-$name"
lockfile="/var/lock/subsys/gluster-swift-account"
start() {
swift_action "$name" start
retval=$?
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
swift_action "$name" stop
retval=$?
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
rh_status() {
swift_action "$name" status
}
rh_status_q() {
rh_status &> /dev/null
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart}"
exit 2
esac
exit $?

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Account Server
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-account-server /etc/swift/account-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Account Server instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-account-server /etc/swift/account-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Container Auditor
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-container-auditor /etc/swift/container-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Container Auditor instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-container-auditor /etc/swift/container-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,12 +0,0 @@
# After network.target just so replicator can talk to other nodes.
[Unit]
Description=OpenStack Object Storage (swift) - Container Replicator
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-container-replicator /etc/swift/container-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Container Replicator instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-container-replicator /etc/swift/container-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Container Updater
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-container-updater /etc/swift/container-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Container Updater instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-container-updater /etc/swift/container-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,78 +0,0 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: gluster-swift-container
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Stop: 0 1 6
# Short-Description: Swift container server
# Description: Container server for swift.
### END INIT INFO
# gluster-swift-container: swift container server
#
# chkconfig: - 20 80
# description: Container server for swift.
. /etc/rc.d/init.d/functions
. /usr/share/gluster-swift/functions
name="container"
[ -e "/etc/sysconfig/gluster-swift-$name" ] && . "/etc/sysconfig/gluster-swift-$name"
lockfile="/var/lock/subsys/gluster-swift-container"
start() {
swift_action "$name" start
retval=$?
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
swift_action "$name" stop
retval=$?
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
rh_status() {
swift_action "$name" status
}
rh_status_q() {
rh_status &> /dev/null
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart}"
exit 2
esac
exit $?

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Container Server
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-container-server /etc/swift/container-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Container Server instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-container-server /etc/swift/container-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,64 +0,0 @@
# vim: filetype=sh
. /etc/rc.d/init.d/functions
swift_action() {
retval=0
server="$1"
call="swift_$2"
if [[ -f "/etc/swift/$server-server.conf" ]]; then
$call "$server" \
"/etc/swift/$server-server.conf" \
"/var/run/swift/$server-server.pid"
[ $? -ne 0 ] && retval=1
elif [[ -d "/etc/swift/$server-server/" ]]; then
declare -i count=0
mkdir -p /var/run/swift/$server-server
for name in $( ls "/etc/swift/$server-server/" ); do
$call "$server" \
"/etc/swift/$server-server/$name" \
"/var/run/swift/$server-server/$count.pid"
[ $? -ne 0 ] && retval=1
count=$count+1
done
fi
return $retval
}
swift_start() {
name="$1"
long_name="$name-server"
conf_file="$2"
pid_file="$3"
ulimit -n ${SWIFT_MAX_FILES-32768}
echo -n "Starting swift-$long_name: "
daemon --pidfile $pid_file \
"/usr/bin/swift-$long_name $conf_file &>/var/log/swift-startup.log & echo \$! > $pid_file"
retval=$?
echo
return $retval
}
swift_stop() {
name="$1"
long_name="$name-server"
conf_name="$2"
pid_file="$3"
echo -n "Stopping swift-$long_name: "
killproc -p $pid_file -d ${SWIFT_STOP_DELAY-15} $long_name
retval=$?
echo
return $retval
}
swift_status() {
name="$1"
long_name="$name-server"
conf_name="$2"
pid_file="$3"
status -p $pid_file $long_name
}

View file

@ -1,12 +0,0 @@
# After network.target just because.
[Unit]
Description=OpenStack Object Storage (swift) - Object Auditor
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-object-auditor /etc/swift/object-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Object Auditor instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-object-auditor /etc/swift/object-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Object Expirer
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-object-expirer /etc/swift/object-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Object Expirer instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-object-expirer /etc/swift/object-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,12 +0,0 @@
# After network.target just so replicator can talk to other nodes.
[Unit]
Description=OpenStack Object Storage (swift) - Object Replicator
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-object-replicator /etc/swift/object-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Object Replicator instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-object-replicator /etc/swift/object-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Object Updater
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-object-updater /etc/swift/object-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Object Updater instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-object-updater /etc/swift/object-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,79 +0,0 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: gluster-swift-object
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Stop: 0 1 6
# Short-Description: Swift object server
# Description: Object server for swift.
### END INIT INFO
# gluster-swift-object: swift object server
#
# chkconfig: - 20 80
# description: Object server for swift.
. /etc/rc.d/init.d/functions
. /usr/share/gluster-swift/functions
name="object"
[ -e "/etc/sysconfig/gluster-swift-$name" ] && . "/etc/sysconfig/gluster-swift-$name"
lockfile="/var/lock/subsys/gluster-swift-object"
start() {
swift_action "$name" start
retval=$?
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
swift_action "$name" stop
retval=$?
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
rh_status() {
swift_action "$name" status
}
rh_status_q() {
rh_status &> /dev/null
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart}"
exit 2
esac
exit $?

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Object Server
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-object-server /etc/swift/object-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Object Server instance %I
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-object-server /etc/swift/object-server/%i.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,79 +0,0 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: gluster-swift-proxy
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Stop: 0 1 6
# Short-Description: Swift proxy server
# Description: Account server for swift.
### END INIT INFO
# gluster-swift-proxy: swift proxy server
#
# chkconfig: - 20 80
# description: Proxy server for swift.
. /etc/rc.d/init.d/functions
. /usr/share/gluster-swift/functions
name="proxy"
[ -e "/etc/sysconfig/gluster-swift-$name" ] && . "/etc/sysconfig/gluster-swift-$name"
lockfile="/var/lock/subsys/gluster-swift-proxy"
start() {
swift_action "$name" start
retval=$?
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
swift_action "$name" stop
retval=$?
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
rh_status() {
swift_action "$name" status
}
rh_status_q() {
rh_status &> /dev/null
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart}"
exit 2
esac
exit $?

View file

@ -1,11 +0,0 @@
[Unit]
Description=OpenStack Object Storage (swift) - Proxy Server
After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-proxy-server /etc/swift/proxy-server.conf
[Install]
WantedBy=multi-user.target

View file

@ -1,6 +0,0 @@
# swift needs a couple of directories in /var/run
d /var/run/swift 0755 swift root
d /var/run/swift/account-server 0755 swift root
d /var/run/swift/container-server 0755 swift root
d /var/run/swift/object-server 0755 swift root
d /var/run/swift/proxy-server 0755 swift root

View file

@ -1,109 +0,0 @@
#!/bin/sh
#
# glusterd Startup script for the glusterfs server
#
# chkconfig: - 20 80
# description: Clustered file-system server
### BEGIN INIT INFO
# Provides: glusterd
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Should-Start:
# Should-Stop:
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: glusterfs server
# Description: Clustered file-system server
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
exe="/usr/sbin/glusterd"
prog="glusterd"
# Fedora File System Layout dictates /run
[ -e /run ] && RUNDIR="/run"
pidf="${RUNDIR:-/var/run}/$prog.pid"
# Set defaults, then source config for eventual overrides
GLUSTERD_NOFILE="65536"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/subsys/$prog
start() {
[ -x $exe ] || exit 5
ulimit -n $GLUSTERD_NOFILE
echo -n $"Starting $prog: "
daemon $exe${GLUSTERD_LOGFILE+" -l $GLUSTERD_LOGFILE"}${GLUSTERD_LOGLEVEL+" -L $GLUSTERD_LOGLEVEL"} -p $pidf
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
status $prog
}
rh_status_q() {
rh_status &>/dev/null
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?

View file

@ -1,6 +0,0 @@
/var/log/glusterfs/*glusterd.vol.log {
missingok
postrotate
/bin/kill -HUP `cat /var/run/glusterd.pid 2>/dev/null` 2>/dev/null || true
endscript
}

View file

@ -1,13 +0,0 @@
[Unit]
Description=GlusterFS an clustered file-system server
Wants=glusterfsd.service
After=network.target rpcbind.service
[Service]
Type=forking
PIDFile=/run/glusterd.pid
LimitNOFILE=65536
ExecStart=/usr/sbin/glusterd -p /run/glusterd.pid
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
--- configure.ac.orig 2012-01-16 13:38:53.020000114 -0500
+++ configure.ac 2012-01-16 13:39:29.177000589 -0500
@@ -431,7 +431,7 @@
linux*)
dnl GF_LINUX_HOST_OS=1
GF_HOST_OS="GF_LINUX_HOST_OS"
- GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -O0"
+ GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -O2"
GF_GLUSTERFS_CFLAGS="${GF_CFLAGS}"
GF_LDADD="${ARGP_STANDALONE_LDADD}"
GF_FUSE_CFLAGS="-DFUSERMOUNT_DIR=\\\"\$(bindir)\\\""

View file

@ -1,23 +0,0 @@
--- libglusterfs/src/Makefile.am.orig 2011-11-23 14:04:41.810001717 -0500
+++ libglusterfs/src/Makefile.am 2011-11-23 14:30:49.940000394 -0500
@@ -16,6 +16,7 @@
$(LEX) -t $(srcdir)/graph.l > $@
y.tab.c y.tab.h: graph.y
- $(YACC) -d $(srcdir)/graph.y
+ $(YACC) -d -b foo $(srcdir)/graph.y
+ mv foo.tab.h y.tab.h && mv foo.tab.c y.tab.c
CLEANFILES = graph.lex.c y.tab.c y.tab.h
--- libglusterfs/src/Makefile.in.orig 2011-11-23 14:04:35.995001451 -0500
+++ libglusterfs/src/Makefile.in 2011-11-23 14:31:01.730999353 -0500
@@ -866,7 +866,8 @@
$(LEX) -t $(srcdir)/graph.l > $@
y.tab.c y.tab.h: graph.y
- $(YACC) -d $(srcdir)/graph.y
+ $(YACC) -d -b foo $(srcdir)/graph.y
+ mv foo.tab.h y.tab.h && mv foo.tab.c y.tab.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,474 +0,0 @@
--- xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -51,9 +51,26 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
int32_t op_errno, rpcsvc_request_t *req,
void *op_ctx, char *op_errstr)
{
- int32_t ret = -1;
- gd_serialize_t sfunc = NULL;
- void *cli_rsp = NULL;
+ union {
+ gf1_cli_create_vol_rsp createv_rsp;
+ gf1_cli_start_vol_rsp startv_rsp;
+ gf1_cli_stop_vol_rsp stopv_rsp;
+ gf1_cli_delete_vol_rsp delv_rsp;
+ gf1_cli_defrag_vol_rsp defragv_rsp;
+ gf1_cli_set_vol_rsp setv_rsp;
+ gf1_cli_reset_vol_rsp resetv_rsp;
+ gf1_cli_sync_volume_rsp syncv_rsp;
+ gf1_cli_stats_volume_rsp statsv_rsp;
+ gf1_cli_add_brick_rsp addb_rsp;
+ gf1_cli_remove_brick_rsp rmb_rsp;
+ gf1_cli_replace_brick_rsp replb_rsp;
+ gf1_cli_log_filename_rsp logfn_rsp;
+ gf1_cli_log_rotate_rsp logrot_rsp;
+ gf1_cli_gsync_set_rsp gsyncs_rsp;
+ gf1_cli_quota_rsp quota_rsp;
+ } cli_rsp;
+ int32_t ret = -1;
+ gd_serialize_t sfunc = NULL;
dict_t *ctx = NULL;
char *free_ptr = NULL;
glusterd_conf_t *conf = NULL;
@@ -67,145 +84,103 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
switch (op) {
case GD_OP_CREATE_VOLUME:
{
- gf1_cli_create_vol_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- rsp.volname = "";
- if (op_errstr)
- rsp.op_errstr = op_errstr;
- else
- rsp.op_errstr = "";
- cli_rsp = &rsp;
+ cli_rsp.createv_rsp.op_ret = op_ret;
+ cli_rsp.createv_rsp.op_errno = op_errno;
+ cli_rsp.createv_rsp.volname = "";
+ cli_rsp.createv_rsp.op_errstr = op_errstr ? op_errstr : "";
sfunc = gf_xdr_serialize_cli_create_vol_rsp;
break;
}
case GD_OP_START_VOLUME:
{
- gf1_cli_start_vol_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- rsp.volname = "";
- if (op_errstr)
- rsp.op_errstr = op_errstr;
- else
- rsp.op_errstr = "";
- cli_rsp = &rsp;
+ cli_rsp.startv_rsp.op_ret = op_ret;
+ cli_rsp.startv_rsp.op_errno = op_errno;
+ cli_rsp.startv_rsp.volname = "";
+ cli_rsp.startv_rsp.op_errstr = op_errstr ? op_errstr : "";
sfunc = gf_xdr_serialize_cli_start_vol_rsp;
break;
}
case GD_OP_STOP_VOLUME:
{
- gf1_cli_stop_vol_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- rsp.volname = "";
- if (op_errstr)
- rsp.op_errstr = op_errstr;
- else
- rsp.op_errstr = "";
- cli_rsp = &rsp;
+ cli_rsp.stopv_rsp.op_ret = op_ret;
+ cli_rsp.stopv_rsp.op_errno = op_errno;
+ cli_rsp.stopv_rsp.volname = "";
+ cli_rsp.stopv_rsp.op_errstr = op_errstr ? op_errstr : "";
sfunc = gf_xdr_serialize_cli_stop_vol_rsp;
break;
}
case GD_OP_DELETE_VOLUME:
{
- gf1_cli_delete_vol_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- rsp.volname = "";
- if (op_errstr)
- rsp.op_errstr = op_errstr;
- else
- rsp.op_errstr = "";
- cli_rsp = &rsp;
+ cli_rsp.delv_rsp.op_ret = op_ret;
+ cli_rsp.delv_rsp.op_errno = op_errno;
+ cli_rsp.delv_rsp.volname = "";
+ cli_rsp.delv_rsp.op_errstr = op_errstr ? op_errstr : "";
sfunc = gf_xdr_serialize_cli_delete_vol_rsp;
break;
}
case GD_OP_DEFRAG_VOLUME:
{
- gf1_cli_defrag_vol_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- //rsp.volname = "";
- cli_rsp = &rsp;
+ cli_rsp.defragv_rsp.op_ret = op_ret;
+ cli_rsp.defragv_rsp.op_errno = op_errno;
+ //cli_rsp.defragv_rsp.volname = "";
sfunc = gf_xdr_serialize_cli_defrag_vol_rsp;
break;
}
case GD_OP_ADD_BRICK:
{
- gf1_cli_add_brick_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- rsp.volname = "";
- if (op_errstr)
- rsp.op_errstr = op_errstr;
- else
- rsp.op_errstr = "";
- cli_rsp = &rsp;
+ cli_rsp.addb_rsp.op_ret = op_ret;
+ cli_rsp.addb_rsp.op_errno = op_errno;
+ cli_rsp.addb_rsp.volname = "";
+ cli_rsp.addb_rsp.op_errstr = op_errstr ? op_errstr : "";
sfunc = gf_xdr_serialize_cli_add_brick_rsp;
break;
}
case GD_OP_REMOVE_BRICK:
{
- gf1_cli_remove_brick_rsp rsp = {0,};
ctx = op_ctx;
if (ctx &&
- dict_get_str (ctx, "errstr", &rsp.op_errstr))
- rsp.op_errstr = "";
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- rsp.volname = "";
- cli_rsp = &rsp;
+ dict_get_str (ctx, "errstr", &cli_rsp.rmb_rsp.op_errstr))
+ cli_rsp.rmb_rsp.op_errstr = "";
+ cli_rsp.rmb_rsp.op_ret = op_ret;
+ cli_rsp.rmb_rsp.op_errno = op_errno;
+ cli_rsp.rmb_rsp.volname = "";
sfunc = gf_xdr_serialize_cli_remove_brick_rsp;
break;
}
case GD_OP_REPLACE_BRICK:
{
- gf1_cli_replace_brick_rsp rsp = {0,};
ctx = op_ctx;
if (ctx &&
- dict_get_str (ctx, "status-reply", &rsp.status))
- rsp.status = "";
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- if (op_errstr)
- rsp.op_errstr = op_errstr;
- else
- rsp.op_errstr = "";
- rsp.volname = "";
- cli_rsp = &rsp;
+ dict_get_str (ctx, "status-reply", &cli_rsp.replb_rsp.status))
+ cli_rsp.replb_rsp.status = "";
+ cli_rsp.replb_rsp.op_ret = op_ret;
+ cli_rsp.replb_rsp.op_errno = op_errno;
+ cli_rsp.replb_rsp.volname = "";
+ cli_rsp.replb_rsp.op_errstr = op_errstr ? op_errstr : "";
sfunc = gf_xdr_serialize_cli_replace_brick_rsp;
break;
}
case GD_OP_SET_VOLUME:
{
- gf1_cli_set_vol_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- rsp.volname = "";
ctx = op_ctx;
-
- if (op_errstr)
- rsp.op_errstr = op_errstr;
- else
- rsp.op_errstr = "";
if (ctx) {
ret = dict_allocate_and_serialize (ctx,
- &rsp.dict.dict_val,
- (size_t*)&rsp.dict.dict_len);
+ &cli_rsp.setv_rsp.dict.dict_val,
+ (size_t*)&cli_rsp.setv_rsp.dict.dict_len);
if (ret == 0)
- free_ptr = rsp.dict.dict_val;
+ free_ptr = cli_rsp.setv_rsp.dict.dict_val;
}
-
- cli_rsp = &rsp;
+ cli_rsp.setv_rsp.op_errno = op_errno;
+ cli_rsp.setv_rsp.volname = "";
+ cli_rsp.setv_rsp.op_errstr = op_errstr ? op_errstr : "";
sfunc = gf_xdr_serialize_cli_set_vol_rsp;
break;
}
@@ -213,55 +188,35 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
case GD_OP_RESET_VOLUME:
{
gf_log ("", GF_LOG_DEBUG, "Return value to CLI");
- gf1_cli_reset_vol_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = 1;
- rsp.volname = "";
- if (op_errstr)
- rsp.op_errstr = op_errstr;
- else
- rsp.op_errstr = "Error while resetting options";
- cli_rsp = &rsp;
+ cli_rsp.resetv_rsp.op_ret = op_ret;
+ cli_rsp.resetv_rsp.op_errno = 1;
+ cli_rsp.resetv_rsp.volname = "";
+ cli_rsp.resetv_rsp.op_errstr = op_errstr ? op_errstr : "Error while resetting options";
sfunc = gf_xdr_serialize_cli_reset_vol_rsp;
break;
}
case GD_OP_LOG_FILENAME:
{
- gf1_cli_log_filename_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- if (op_errstr)
- rsp.errstr = op_errstr;
- else
- rsp.errstr = "";
- cli_rsp = &rsp;
+ cli_rsp.logfn_rsp.op_ret = op_ret;
+ cli_rsp.logfn_rsp.op_errno = op_errno;
+ cli_rsp.logfn_rsp.errstr = op_errstr ? op_errstr : "";
sfunc = gf_xdr_serialize_cli_log_filename_rsp;
break;
}
case GD_OP_LOG_ROTATE:
{
- gf1_cli_log_rotate_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- if (op_errstr)
- rsp.errstr = op_errstr;
- else
- rsp.errstr = "";
- cli_rsp = &rsp;
+ cli_rsp.logrot_rsp.op_ret = op_ret;
+ cli_rsp.logrot_rsp.op_errno = op_errno;
+ cli_rsp.logrot_rsp.errstr = op_errstr ? op_errstr : "";
sfunc = gf_xdr_serialize_cli_log_rotate_rsp;
break;
}
case GD_OP_SYNC_VOLUME:
{
- gf1_cli_sync_volume_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- if (op_errstr)
- rsp.op_errstr = op_errstr;
- else
- rsp.op_errstr = "";
- cli_rsp = &rsp;
+ cli_rsp.syncv_rsp.op_ret = op_ret;
+ cli_rsp.syncv_rsp.op_errno = op_errno;
+ cli_rsp.syncv_rsp.op_errstr = op_errstr ? op_errstr : "";
sfunc = gf_xdr_from_cli_sync_volume_rsp;
break;
}
@@ -273,72 +228,56 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
char *slave = NULL;
char *op_name = NULL;
char *subop = NULL;
- gf1_cli_gsync_set_rsp rsp = {0,};
+ cli_rsp.gsyncs_rsp.op_ret = op_ret;
+ cli_rsp.gsyncs_rsp.op_errno = op_errno;
+ cli_rsp.gsyncs_rsp.op_errstr = op_errstr ? op_errstr : "";
+ cli_rsp.gsyncs_rsp.op_name = "";
+ cli_rsp.gsyncs_rsp.subop = "";
+ cli_rsp.gsyncs_rsp.master = "";
+ cli_rsp.gsyncs_rsp.slave = "";
+ cli_rsp.gsyncs_rsp.glusterd_workdir = conf->workdir;
+ cli_rsp.gsyncs_rsp.gsync_prefix = GSYNCD_PREFIX;
ctx = op_ctx;
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- rsp.op_errstr = "";
- rsp.op_name = "";
- rsp.subop = "";
- rsp.master = "";
- rsp.slave = "";
- rsp.glusterd_workdir = conf->workdir;
- rsp.gsync_prefix = GSYNCD_PREFIX;
if (ctx) {
ret = dict_get_str (ctx, "errstr", &str);
if (ret == 0)
- rsp.op_errstr = str;
+ cli_rsp.gsyncs_rsp.op_errstr = str;
ret = dict_get_int32 (ctx, "type", &type);
if (ret == 0)
- rsp.type = type;
+ cli_rsp.gsyncs_rsp.type = type;
ret = dict_get_str (ctx, "master", &master);
if (ret == 0)
- rsp.master = master;
+ cli_rsp.gsyncs_rsp.master = master;
ret = dict_get_str (ctx, "slave", &slave);
if (ret == 0)
- rsp.slave = slave;
+ cli_rsp.gsyncs_rsp.slave = slave;
if (type == GF_GSYNC_OPTION_TYPE_CONFIG) {
if (dict_get_str (ctx, "op_name", &op_name) == 0)
- rsp.op_name = op_name;
+ cli_rsp.gsyncs_rsp.op_name = op_name;
if (dict_get_str (ctx, "subop", &subop) == 0)
- rsp.subop = subop;
+ cli_rsp.gsyncs_rsp.subop = subop;
}
ret = dict_allocate_and_serialize (ctx,
- &rsp.status_dict.status_dict_val,
- (size_t*)&rsp.status_dict.status_dict_len);
+ &cli_rsp.gsyncs_rsp.status_dict.status_dict_val,
+ (size_t*)&cli_rsp.gsyncs_rsp.status_dict.status_dict_len);
if (ret == 0)
- free_ptr = rsp.status_dict.status_dict_val;
+ free_ptr = cli_rsp.gsyncs_rsp.status_dict.status_dict_val;
}
- if (op_errstr)
- rsp.op_errstr = op_errstr;
- cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_gsync_set_rsp;
break;
}
- case GD_OP_RENAME_VOLUME:
- case GD_OP_START_BRICK:
- case GD_OP_STOP_BRICK:
- case GD_OP_LOG_LOCATE:
- {
- gf_log ("", GF_LOG_DEBUG, "not supported op %d", op);
- break;
- }
case GD_OP_PROFILE_VOLUME:
{
- gf1_cli_stats_volume_rsp rsp = {0,};
int32_t count = 0;
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- if (op_errstr)
- rsp.op_errstr = op_errstr;
- else
- rsp.op_errstr = "";
+ cli_rsp.statsv_rsp.op_ret = op_ret;
+ cli_rsp.statsv_rsp.op_errno = op_errno;
+ cli_rsp.statsv_rsp.op_errstr = op_errstr ? op_errstr : "";
ctx = op_ctx;
if (dict_get_int32 (ctx, "count", &count)) {
ret = dict_set_int32 (ctx, "count", 0);
@@ -347,10 +286,9 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
"to set brick count.");
}
dict_allocate_and_serialize (ctx,
- &rsp.stats_info.stats_info_val,
- (size_t*)&rsp.stats_info.stats_info_len);
- free_ptr = rsp.stats_info.stats_info_val;
- cli_rsp = &rsp;
+ &cli_rsp.statsv_rsp.stats_info.stats_info_val,
+ (size_t*)&cli_rsp.statsv_rsp.stats_info.stats_info_len);
+ free_ptr = cli_rsp.statsv_rsp.stats_info.stats_info_val;
sfunc = gf_xdr_from_cli_stats_volume_rsp;
break;
}
@@ -360,49 +298,56 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
int32_t type;
char *str = NULL;
char *errstr = NULL;
- gf1_cli_quota_rsp rsp = {0,};
- rsp.op_ret = op_ret;
- rsp.op_errno = op_errno;
- rsp.volname = "";
+ cli_rsp.quota_rsp.op_ret = op_ret;
+ cli_rsp.quota_rsp.op_errno = op_errno;
+ cli_rsp.quota_rsp.volname = "";
ctx = op_ctx;
if (op_errstr)
- rsp.op_errstr = op_errstr;
+ cli_rsp.quota_rsp.op_errstr = op_errstr;
else {
ret = dict_get_str (ctx, "errstr", &errstr);
if (ret == 0)
- rsp.op_errstr = errstr;
+ cli_rsp.quota_rsp.op_errstr = errstr;
else
- rsp.op_errstr = "";
+ cli_rsp.quota_rsp.op_errstr = "";
}
- rsp.limit_list = "";
+ cli_rsp.quota_rsp.limit_list = "";
if (op_ret == 0 && ctx) {
ret = dict_get_str (ctx, "volname", &str);
if (ret == 0)
- rsp.volname = str;
+ cli_rsp.quota_rsp.volname = str;
ret = dict_get_int32 (ctx, "type", &type);
if (ret == 0)
- rsp.type = type;
+ cli_rsp.quota_rsp.type = type;
else
- rsp.type = 0;
+ cli_rsp.quota_rsp.type = 0;
if (type == GF_QUOTA_OPTION_TYPE_LIST) {
ret = dict_get_str (ctx,"limit_list", &str);
if (ret == 0)
- rsp.limit_list = str;
+ cli_rsp.quota_rsp.limit_list = str;
}
}
- cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_quota_rsp;
break;
}
+ case GD_OP_RENAME_VOLUME:
+ case GD_OP_START_BRICK:
+ case GD_OP_STOP_BRICK:
+ case GD_OP_LOG_LOCATE:
+ {
+ gf_log ("", GF_LOG_DEBUG, "not supported op %d", op);
+ break;
+ }
+
case GD_OP_NONE:
case GD_OP_MAX:
{
@@ -411,7 +356,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
}
}
- ret = glusterd_submit_reply (req, cli_rsp, NULL, 0, NULL,
+ ret = glusterd_submit_reply (req, &cli_rsp, NULL, 0, NULL,
sfunc);
if (free_ptr)

View file

@ -1,20 +0,0 @@
*** cli/src/cli-rpc-ops.c.orig 2012-07-18 13:16:43.720998232 -0400
--- cli/src/cli-rpc-ops.c 2012-07-18 13:19:52.463999495 -0400
***************
*** 5832,5838 ****
if (!time) {
cli_out ("%s", path);
} else {
! tm = localtime ((time_t*)(&time));
strftime (timestr, sizeof (timestr),
"%Y-%m-%d %H:%M:%S", tm);
if (i ==0) {
--- 5832,5839 ----
if (!time) {
cli_out ("%s", path);
} else {
! time_t hack = time;
! tm = localtime (&hack);
strftime (timestr, sizeof (timestr),
"%Y-%m-%d %H:%M:%S", tm);
if (i ==0) {

View file

@ -1,24 +0,0 @@
--- libglusterfs/src/Makefile.am.orig 2012-05-17 12:30:57.000000000 -0400
+++ libglusterfs/src/Makefile.am 2012-05-18 08:52:55.469998306 -0400
@@ -44,7 +44,8 @@
$(LEX) -t $(srcdir)/graph.l > $@
y.tab.h: graph.y
- $(YACC) -d $(srcdir)/graph.y
+ $(YACC) -d -b foo $(srcdir)/graph.y
+ mv foo.tab.h y.tab.h && mv foo.tab.c y.tab.c
CLEANFILES = graph.lex.c y.tab.c y.tab.h
CONFIG_CLEAN_FILES = $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
--- libglusterfs/src/Makefile.in.orig 2012-05-17 12:31:12.000000000 -0400
+++ libglusterfs/src/Makefile.in 2012-05-18 09:02:31.108002281 -0400
@@ -941,7 +941,8 @@
$(LEX) -t $(srcdir)/graph.l > $@
y.tab.h: graph.y
- $(YACC) -d $(srcdir)/graph.y
+ $(YACC) -d -b foo $(srcdir)/graph.y
+ mv foo.tab.h y.tab.h && mv foo.tab.c y.tab.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,797 +0,0 @@
diff --git a/setup.py b/setup.py
index d195d34..b5b5ca2 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,6 @@
#!/usr/bin/python
# Copyright (c) 2010-2012 OpenStack, LLC.
+# Copyright (c) 2011 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.
@@ -94,6 +95,7 @@ setup(
'tempurl=swift.common.middleware.tempurl:filter_factory',
'formpost=swift.common.middleware.formpost:filter_factory',
'name_check=swift.common.middleware.name_check:filter_factory',
+ 'gluster=swift.common.middleware.gluster:filter_factory',
],
},
)
diff --git a/swift/account/server.py b/swift/account/server.py
index 800b3c0..cb17970 100644
--- a/swift/account/server.py
+++ b/swift/account/server.py
@@ -1,4 +1,5 @@
# Copyright (c) 2010-2012 OpenStack, LLC.
+# Copyright (c) 2011 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.
@@ -31,7 +32,7 @@ import simplejson
from swift.common.db import AccountBroker
from swift.common.utils import get_logger, get_param, hash_path, \
- normalize_timestamp, split_path, storage_directory
+ normalize_timestamp, split_path, storage_directory, plugin_enabled
from swift.common.constraints import ACCOUNT_LISTING_LIMIT, \
check_mount, check_float, check_utf8
from swift.common.db_replicator import ReplicatorRpc
@@ -39,6 +40,8 @@ from swift.common.db_replicator import ReplicatorRpc
DATADIR = 'accounts'
+if plugin_enabled():
+ from swift.plugins.DiskDir import DiskAccount
class AccountController(object):
"""WSGI controller for the account server."""
@@ -52,8 +55,12 @@ class AccountController(object):
self.mount_check, logger=self.logger)
self.auto_create_account_prefix = \
conf.get('auto_create_account_prefix') or '.'
+ self.fs_object = None
def _get_account_broker(self, drive, part, account):
+ if self.fs_object:
+ return DiskAccount(self.root, account, self.fs_object);
+
hsh = hash_path(account)
db_dir = storage_directory(DATADIR, part, hsh)
db_path = os.path.join(self.root, drive, db_dir, hsh + '.db')
@@ -121,9 +128,15 @@ class AccountController(object):
if broker.is_deleted():
return HTTPConflict(request=req)
metadata = {}
- metadata.update((key, (value, timestamp))
- for key, value in req.headers.iteritems()
- if key.lower().startswith('x-account-meta-'))
+ if not self.fs_object:
+ metadata.update((key, (value, timestamp))
+ for key, value in req.headers.iteritems()
+ if key.lower().startswith('x-account-meta-'))
+ else:
+ metadata.update((key, value)
+ for key, value in req.headers.iteritems()
+ if key.lower().startswith('x-account-meta-'))
+
if metadata:
broker.update_metadata(metadata)
if created:
@@ -153,6 +166,9 @@ class AccountController(object):
broker.stale_reads_ok = True
if broker.is_deleted():
return HTTPNotFound(request=req)
+ if self.fs_object and not self.fs_object.object_only:
+ broker.list_containers_iter(None, None,None,
+ None, None)
info = broker.get_info()
headers = {
'X-Account-Container-Count': info['container_count'],
@@ -164,9 +180,16 @@ class AccountController(object):
container_ts = broker.get_container_timestamp(container)
if container_ts is not None:
headers['X-Container-Timestamp'] = container_ts
- headers.update((key, value)
- for key, (value, timestamp) in broker.metadata.iteritems()
- if value != '')
+ if not self.fs_object:
+ headers.update((key, value)
+ for key, (value, timestamp) in broker.metadata.iteritems()
+ if value != '')
+ else:
+ headers.update((key, value)
+ for key, value in broker.metadata.iteritems()
+ if value != '')
+
+
return HTTPNoContent(request=req, headers=headers)
def GET(self, req):
@@ -190,9 +213,15 @@ class AccountController(object):
'X-Account-Bytes-Used': info['bytes_used'],
'X-Timestamp': info['created_at'],
'X-PUT-Timestamp': info['put_timestamp']}
- resp_headers.update((key, value)
- for key, (value, timestamp) in broker.metadata.iteritems()
- if value != '')
+ if not self.fs_object:
+ resp_headers.update((key, value)
+ for key, (value, timestamp) in broker.metadata.iteritems()
+ if value != '')
+ else:
+ resp_headers.update((key, value)
+ for key, value in broker.metadata.iteritems()
+ if value != '')
+
try:
prefix = get_param(req, 'prefix')
delimiter = get_param(req, 'delimiter')
@@ -224,6 +253,7 @@ class AccountController(object):
content_type='text/plain', request=req)
account_list = broker.list_containers_iter(limit, marker, end_marker,
prefix, delimiter)
+
if out_content_type == 'application/json':
json_pattern = ['"name":%s', '"count":%s', '"bytes":%s']
json_pattern = '{' + ','.join(json_pattern) + '}'
@@ -298,15 +328,29 @@ class AccountController(object):
return HTTPNotFound(request=req)
timestamp = normalize_timestamp(req.headers['x-timestamp'])
metadata = {}
- metadata.update((key, (value, timestamp))
- for key, value in req.headers.iteritems()
- if key.lower().startswith('x-account-meta-'))
+ if not self.fs_object:
+ metadata.update((key, (value, timestamp))
+ for key, value in req.headers.iteritems()
+ if key.lower().startswith('x-account-meta-'))
+ else:
+ metadata.update((key, value)
+ for key, value in req.headers.iteritems()
+ if key.lower().startswith('x-account-meta-'))
if metadata:
broker.update_metadata(metadata)
return HTTPNoContent(request=req)
+ def plugin(self, env):
+ if env.get('Gluster_enabled', False):
+ self.fs_object = env.get('fs_object')
+ self.root = env.get('root')
+ self.mount_check = False
+ else:
+ self.fs_object = None
+
def __call__(self, env, start_response):
start_time = time.time()
+ self.plugin(env)
req = Request(env)
self.logger.txn_id = req.headers.get('x-trans-id', None)
if not check_utf8(req.path_info):
diff --git a/swift/common/middleware/gluster.py b/swift/common/middleware/gluster.py
new file mode 100644
index 0000000..341285d
--- /dev/null
+++ b/swift/common/middleware/gluster.py
@@ -0,0 +1,55 @@
+# Copyright (c) 2011 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.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from swift.common.utils import get_logger, plugin_enabled
+from swift import plugins
+from ConfigParser import ConfigParser
+
+class Gluster_plugin(object):
+ """
+ Update the environment with keys that reflect Gluster_plugin enabled
+ """
+
+ def __init__(self, app, conf):
+ self.app = app
+ self.conf = conf
+ self.fs_name = 'Glusterfs'
+ self.logger = get_logger(conf, log_route='gluster')
+
+ def __call__(self, env, start_response):
+ if not plugin_enabled():
+ return self.app(env, start_response)
+ env['Gluster_enabled'] =True
+ fs_object = getattr(plugins, self.fs_name, False)
+ if not fs_object:
+ raise Exception('%s plugin not found', self.fs_name)
+
+ env['fs_object'] = fs_object()
+ fs_conf = ConfigParser()
+ if fs_conf.read('/etc/swift/fs.conf'):
+ try:
+ env['root'] = fs_conf.get ('DEFAULT', 'mount_path')
+ except NoSectionError, NoOptionError:
+ self.logger.exception(_('ERROR mount_path not present'))
+ return self.app(env, start_response)
+
+def filter_factory(global_conf, **local_conf):
+ """Returns a WSGI filter app for use with paste.deploy."""
+ conf = global_conf.copy()
+ conf.update(local_conf)
+
+ def gluster_filter(app):
+ return Gluster_plugin(app, conf)
+ return gluster_filter
diff --git a/swift/common/utils.py b/swift/common/utils.py
index 47edce8..03701ce 100644
--- a/swift/common/utils.py
+++ b/swift/common/utils.py
@@ -1,4 +1,5 @@
# Copyright (c) 2010-2012 OpenStack, LLC.
+# Copyright (c) 2011 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.
@@ -1138,3 +1139,11 @@ def streq_const_time(s1, s2):
for (a, b) in zip(s1, s2):
result |= ord(a) ^ ord(b)
return result == 0
+
+def plugin_enabled():
+ swift_conf = ConfigParser()
+ swift_conf.read(os.path.join('/etc/swift', 'swift.conf'))
+ try:
+ return swift_conf.get('DEFAULT', 'Enable_plugin', 'no') in TRUE_VALUES
+ except NoOptionError, NoSectionError:
+ return False
diff --git a/swift/container/server.py b/swift/container/server.py
index 8a18cfd..93943a3 100644
--- a/swift/container/server.py
+++ b/swift/container/server.py
@@ -1,4 +1,5 @@
# Copyright (c) 2010-2012 OpenStack, LLC.
+# Copyright (c) 2011 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.
@@ -31,7 +32,8 @@ from webob.exc import HTTPAccepted, HTTPBadRequest, HTTPConflict, \
from swift.common.db import ContainerBroker
from swift.common.utils import get_logger, get_param, hash_path, \
- normalize_timestamp, storage_directory, split_path, validate_sync_to
+ normalize_timestamp, storage_directory, split_path, validate_sync_to, \
+ plugin_enabled
from swift.common.constraints import CONTAINER_LISTING_LIMIT, \
check_mount, check_float, check_utf8
from swift.common.bufferedhttp import http_connect
@@ -40,6 +42,9 @@ from swift.common.db_replicator import ReplicatorRpc
DATADIR = 'containers'
+if plugin_enabled():
+ from swift.plugins.DiskDir import DiskDir
+
class ContainerController(object):
"""WSGI Controller for the container server."""
@@ -62,6 +67,7 @@ class ContainerController(object):
ContainerBroker, self.mount_check, logger=self.logger)
self.auto_create_account_prefix = \
conf.get('auto_create_account_prefix') or '.'
+ self.fs_object = None
def _get_container_broker(self, drive, part, account, container):
"""
@@ -73,6 +79,11 @@ class ContainerController(object):
:param container: container name
:returns: ContainerBroker object
"""
+ if self.fs_object:
+ return DiskDir(self.root, drive, part, account,
+ container, self.logger,
+ fs_object = self.fs_object)
+
hsh = hash_path(account, container)
db_dir = storage_directory(DATADIR, part, hsh)
db_path = os.path.join(self.root, drive, db_dir, hsh + '.db')
@@ -211,10 +222,18 @@ class ContainerController(object):
if broker.is_deleted():
return HTTPConflict(request=req)
metadata = {}
- metadata.update((key, (value, timestamp))
- for key, value in req.headers.iteritems()
- if key.lower() in self.save_headers or
- key.lower().startswith('x-container-meta-'))
+ #Note: check the structure of req.headers
+ if not self.fs_object:
+ metadata.update((key, (value, timestamp))
+ for key, value in req.headers.iteritems()
+ if key.lower() in self.save_headers or
+ key.lower().startswith('x-container-meta-'))
+ else:
+ metadata.update((key, value)
+ for key, value in req.headers.iteritems()
+ if key.lower() in self.save_headers or
+ key.lower().startswith('x-container-meta-'))
+
if metadata:
if 'X-Container-Sync-To' in metadata:
if 'X-Container-Sync-To' not in broker.metadata or \
@@ -222,6 +241,7 @@ class ContainerController(object):
broker.metadata['X-Container-Sync-To'][0]:
broker.set_x_container_sync_points(-1, -1)
broker.update_metadata(metadata)
+
resp = self.account_update(req, account, container, broker)
if resp:
return resp
@@ -245,6 +265,11 @@ class ContainerController(object):
broker.stale_reads_ok = True
if broker.is_deleted():
return HTTPNotFound(request=req)
+
+ if self.fs_object and not self.fs_object.object_only:
+ broker.list_objects_iter(None, None, None, None,
+ None, None)
+
info = broker.get_info()
headers = {
'X-Container-Object-Count': info['object_count'],
@@ -252,10 +277,17 @@ class ContainerController(object):
'X-Timestamp': info['created_at'],
'X-PUT-Timestamp': info['put_timestamp'],
}
- headers.update((key, value)
- for key, (value, timestamp) in broker.metadata.iteritems()
- if value != '' and (key.lower() in self.save_headers or
- key.lower().startswith('x-container-meta-')))
+ if not self.fs_object:
+ headers.update((key, value)
+ for key, (value, timestamp) in broker.metadata.iteritems()
+ if value != '' and (key.lower() in self.save_headers or
+ key.lower().startswith('x-container-meta-')))
+ else:
+ headers.update((key, value)
+ for key, value in broker.metadata.iteritems()
+ if value != '' and (key.lower() in self.save_headers or
+ key.lower().startswith('x-container-meta-')))
+
return HTTPNoContent(request=req, headers=headers)
def GET(self, req):
@@ -268,6 +300,7 @@ class ContainerController(object):
request=req)
if self.mount_check and not check_mount(self.root, drive):
return Response(status='507 %s is not mounted' % drive)
+
broker = self._get_container_broker(drive, part, account, container)
broker.pending_timeout = 0.1
broker.stale_reads_ok = True
@@ -280,10 +313,17 @@ class ContainerController(object):
'X-Timestamp': info['created_at'],
'X-PUT-Timestamp': info['put_timestamp'],
}
- resp_headers.update((key, value)
- for key, (value, timestamp) in broker.metadata.iteritems()
- if value != '' and (key.lower() in self.save_headers or
- key.lower().startswith('x-container-meta-')))
+ if not self.fs_object:
+ resp_headers.update((key, value)
+ for key, (value, timestamp) in broker.metadata.iteritems()
+ if value != '' and (key.lower() in self.save_headers or
+ key.lower().startswith('x-container-meta-')))
+ else:
+ resp_headers.update((key, value)
+ for key, value in broker.metadata.iteritems()
+ if value != '' and (key.lower() in self.save_headers or
+ key.lower().startswith('x-container-meta-')))
+
try:
path = get_param(req, 'path')
prefix = get_param(req, 'prefix')
@@ -414,10 +454,17 @@ class ContainerController(object):
return HTTPNotFound(request=req)
timestamp = normalize_timestamp(req.headers['x-timestamp'])
metadata = {}
- metadata.update((key, (value, timestamp))
- for key, value in req.headers.iteritems()
- if key.lower() in self.save_headers or
- key.lower().startswith('x-container-meta-'))
+ if not self.fs_object:
+ metadata.update((key, (value, timestamp))
+ for key, value in req.headers.iteritems()
+ if key.lower() in self.save_headers or
+ key.lower().startswith('x-container-meta-'))
+ else:
+ metadata.update((key, value)
+ for key, value in req.headers.iteritems()
+ if key.lower() in self.save_headers or
+ key.lower().startswith('x-container-meta-'))
+
if metadata:
if 'X-Container-Sync-To' in metadata:
if 'X-Container-Sync-To' not in broker.metadata or \
@@ -427,8 +474,19 @@ class ContainerController(object):
broker.update_metadata(metadata)
return HTTPNoContent(request=req)
+ def plugin(self, env):
+ if env.get('Gluster_enabled', False):
+ self.fs_object = env.get('fs_object')
+ if not self.fs_object:
+ raise NoneTypeError
+ self.root = env.get('root')
+ self.mount_check = False
+ else:
+ self.fs_object = None
+
def __call__(self, env, start_response):
start_time = time.time()
+ self.plugin(env)
req = Request(env)
self.logger.txn_id = req.headers.get('x-trans-id', None)
if not check_utf8(req.path_info):
diff --git a/swift/obj/server.py b/swift/obj/server.py
index 9cca16b..a45daff 100644
--- a/swift/obj/server.py
+++ b/swift/obj/server.py
@@ -1,4 +1,5 @@
# Copyright (c) 2010-2012 OpenStack, LLC.
+# Copyright (c) 2011 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.
@@ -26,6 +27,7 @@ from hashlib import md5
from tempfile import mkstemp
from urllib import unquote
from contextlib import contextmanager
+from ConfigParser import ConfigParser
from webob import Request, Response, UTC
from webob.exc import HTTPAccepted, HTTPBadRequest, HTTPCreated, \
@@ -37,16 +39,23 @@ from eventlet import sleep, Timeout, tpool
from swift.common.utils import mkdirs, normalize_timestamp, \
storage_directory, hash_path, renamer, fallocate, \
- split_path, drop_buffer_cache, get_logger, write_pickle
+ split_path, drop_buffer_cache, get_logger, write_pickle, \
+ plugin_enabled
from swift.common.bufferedhttp import http_connect
-from swift.common.constraints import check_object_creation, check_mount, \
- check_float, check_utf8
+if plugin_enabled():
+ from swift.plugins.constraints import check_object_creation
+ from swift.plugins.utils import X_TYPE, X_OBJECT_TYPE, FILE, DIR, MARKER_DIR, \
+ OBJECT, DIR_TYPE, FILE_TYPE
+else:
+ from swift.common.constraints import check_object_creation
+
+from swift.common.constraints import check_mount, check_float, check_utf8
+
from swift.common.exceptions import ConnectionTimeout, DiskFileError, \
DiskFileNotExist
from swift.obj.replicator import tpooled_get_hashes, invalidate_hash, \
quarantine_renamer
-
DATADIR = 'objects'
ASYNCDIR = 'async_pending'
PICKLE_PROTOCOL = 2
@@ -339,6 +348,9 @@ class DiskFile(object):
raise
raise DiskFileNotExist('Data File does not exist.')
+if plugin_enabled():
+ from swift.plugins.DiskFile import Gluster_DiskFile
+
class ObjectController(object):
"""Implements the WSGI application for the Swift Object Server."""
@@ -377,6 +389,17 @@ class ObjectController(object):
'expiring_objects'
self.expiring_objects_container_divisor = \
int(conf.get('expiring_objects_container_divisor') or 86400)
+ self.fs_object = None
+
+ def get_DiskFile_obj(self, path, device, partition, account, container, obj,
+ logger, keep_data_fp=False, disk_chunk_size=65536):
+ if self.fs_object:
+ return Gluster_DiskFile(path, device, partition, account, container,
+ obj, logger, keep_data_fp,
+ disk_chunk_size, fs_object = self.fs_object);
+ else:
+ return DiskFile(path, device, partition, account, container,
+ obj, logger, keep_data_fp, disk_chunk_size)
def async_update(self, op, account, container, obj, host, partition,
contdevice, headers_out, objdevice):
@@ -493,7 +516,7 @@ class ObjectController(object):
content_type='text/plain')
if self.mount_check and not check_mount(self.devices, device):
return Response(status='507 %s is not mounted' % device)
- file = DiskFile(self.devices, device, partition, account, container,
+ file = self.get_DiskFile_obj(self.devices, device, partition, account, container,
obj, self.logger, disk_chunk_size=self.disk_chunk_size)
if 'X-Delete-At' in file.metadata and \
@@ -548,7 +571,7 @@ class ObjectController(object):
if new_delete_at and new_delete_at < time.time():
return HTTPBadRequest(body='X-Delete-At in past', request=request,
content_type='text/plain')
- file = DiskFile(self.devices, device, partition, account, container,
+ file = self.get_DiskFile_obj(self.devices, device, partition, account, container,
obj, self.logger, disk_chunk_size=self.disk_chunk_size)
orig_timestamp = file.metadata.get('X-Timestamp')
upload_expiration = time.time() + self.max_upload_time
@@ -580,12 +603,29 @@ class ObjectController(object):
if 'etag' in request.headers and \
request.headers['etag'].lower() != etag:
return HTTPUnprocessableEntity(request=request)
- metadata = {
- 'X-Timestamp': request.headers['x-timestamp'],
- 'Content-Type': request.headers['content-type'],
- 'ETag': etag,
- 'Content-Length': str(os.fstat(fd).st_size),
- }
+ content_type = request.headers['content-type']
+ if self.fs_object and not content_type:
+ content_type = FILE_TYPE
+ if not self.fs_object:
+ metadata = {
+ 'X-Timestamp': request.headers['x-timestamp'],
+ 'Content-Type': request.headers['content-type'],
+ 'ETag': etag,
+ 'Content-Length': str(os.fstat(fd).st_size),
+ }
+ else:
+ metadata = {
+ 'X-Timestamp': request.headers['x-timestamp'],
+ 'Content-Type': request.headers['content-type'],
+ 'ETag': etag,
+ 'Content-Length': str(os.fstat(fd).st_size),
+ X_TYPE: OBJECT,
+ X_OBJECT_TYPE: FILE,
+ }
+
+ if self.fs_object and \
+ request.headers['content-type'].lower() == DIR_TYPE:
+ metadata.update({X_OBJECT_TYPE: MARKER_DIR})
metadata.update(val for val in request.headers.iteritems()
if val[0].lower().startswith('x-object-meta-') and
len(val[0]) > 14)
@@ -612,7 +652,7 @@ class ObjectController(object):
'x-timestamp': file.metadata['X-Timestamp'],
'x-etag': file.metadata['ETag'],
'x-trans-id': request.headers.get('x-trans-id', '-')},
- device)
+ (self.fs_object and account) or device)
resp = HTTPCreated(request=request, etag=etag)
return resp
@@ -626,9 +666,9 @@ class ObjectController(object):
content_type='text/plain')
if self.mount_check and not check_mount(self.devices, device):
return Response(status='507 %s is not mounted' % device)
- file = DiskFile(self.devices, device, partition, account, container,
- obj, self.logger, keep_data_fp=True,
- disk_chunk_size=self.disk_chunk_size)
+ file = self.get_DiskFile_obj(self.devices, device, partition, account, container,
+ obj, self.logger, keep_data_fp=True,
+ disk_chunk_size=self.disk_chunk_size)
if file.is_deleted() or ('X-Delete-At' in file.metadata and
int(file.metadata['X-Delete-At']) <= time.time()):
if request.headers.get('if-match') == '*':
@@ -702,7 +742,7 @@ class ObjectController(object):
return resp
if self.mount_check and not check_mount(self.devices, device):
return Response(status='507 %s is not mounted' % device)
- file = DiskFile(self.devices, device, partition, account, container,
+ file = self.get_DiskFile_obj(self.devices, device, partition, account, container,
obj, self.logger, disk_chunk_size=self.disk_chunk_size)
if file.is_deleted() or ('X-Delete-At' in file.metadata and
int(file.metadata['X-Delete-At']) <= time.time()):
@@ -744,7 +784,7 @@ class ObjectController(object):
if self.mount_check and not check_mount(self.devices, device):
return Response(status='507 %s is not mounted' % device)
response_class = HTTPNoContent
- file = DiskFile(self.devices, device, partition, account, container,
+ file = self.get_DiskFile_obj(self.devices, device, partition, account, container,
obj, self.logger, disk_chunk_size=self.disk_chunk_size)
if 'x-if-delete-at' in request.headers and \
int(request.headers['x-if-delete-at']) != \
@@ -797,9 +837,18 @@ class ObjectController(object):
raise hashes
return Response(body=pickle.dumps(hashes))
+ def plugin(self, env):
+ if env.get('Gluster_enabled', False):
+ self.fs_object = env.get('fs_object')
+ self.devices = env.get('root')
+ self.mount_check = False
+ else:
+ self.fs_object = None
+
def __call__(self, env, start_response):
"""WSGI Application entry point for the Swift Object Server."""
start_time = time.time()
+ self.plugin(env)
req = Request(env)
self.logger.txn_id = req.headers.get('x-trans-id', None)
if not check_utf8(req.path_info):
diff --git a/swift/proxy/server.py b/swift/proxy/server.py
index 17613b8..d277d28 100644
--- a/swift/proxy/server.py
+++ b/swift/proxy/server.py
@@ -1,4 +1,5 @@
# Copyright (c) 2010-2012 OpenStack, LLC.
+# Copyright (c) 2011 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.
@@ -53,11 +54,20 @@ from webob import Request, Response
from swift.common.ring import Ring
from swift.common.utils import cache_from_env, ContextPool, get_logger, \
- get_remote_client, normalize_timestamp, split_path, TRUE_VALUES
+ get_remote_client, normalize_timestamp, split_path, TRUE_VALUES, \
+ plugin_enabled
from swift.common.bufferedhttp import http_connect
-from swift.common.constraints import check_metadata, check_object_creation, \
- check_utf8, CONTAINER_LISTING_LIMIT, MAX_ACCOUNT_NAME_LENGTH, \
- MAX_CONTAINER_NAME_LENGTH, MAX_FILE_SIZE
+
+if plugin_enabled():
+ from swift.plugins.constraints import check_object_creation, \
+ MAX_ACCOUNT_NAME_LENGTH, MAX_CONTAINER_NAME_LENGTH, MAX_FILE_SIZE
+else:
+ from swift.common.constraints import check_object_creation, \
+ MAX_ACCOUNT_NAME_LENGTH, MAX_CONTAINER_NAME_LENGTH, MAX_FILE_SIZE
+
+from swift.common.constraints import check_metadata, check_utf8, \
+ CONTAINER_LISTING_LIMIT
+
from swift.common.exceptions import ChunkReadTimeout, \
ChunkWriteTimeout, ConnectionTimeout
diff --git a/test/__init__.py b/test/__init__.py
index ef2ce31..363a051 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -6,8 +6,16 @@ import sys
import os
from ConfigParser import MissingSectionHeaderError
from StringIO import StringIO
-
from swift.common.utils import readconf
+from swift.common.utils import plugin_enabled
+if plugin_enabled():
+ from swift.plugins.constraints import MAX_OBJECT_NAME_LENGTH, \
+ MAX_CONTAINER_NAME_LENGTH, MAX_ACCOUNT_NAME_LENGTH, \
+ MAX_FILE_SIZE
+else:
+ from swift.common.constraints import MAX_OBJECT_NAME_LENGTH, \
+ MAX_CONTAINER_NAME_LENGTH, MAX_ACCOUNT_NAME_LENGTH, \
+ MAX_FILE_SIZE
setattr(__builtin__, '_', lambda x: x)
diff --git a/test/functional/tests.py b/test/functional/tests.py
index b25b4fd..8d12f58 100644
--- a/test/functional/tests.py
+++ b/test/functional/tests.py
@@ -31,6 +31,16 @@ import urllib
from test import get_config
from swift import Account, AuthenticationFailed, Connection, Container, \
File, ResponseError
+from test import plugin_enabled
+if plugin_enabled():
+ from test import MAX_OBJECT_NAME_LENGTH, \
+ MAX_CONTAINER_NAME_LENGTH, MAX_ACCOUNT_NAME_LENGTH, \
+ MAX_FILE_SIZE
+else:
+ from test import MAX_OBJECT_NAME_LENGTH, \
+ MAX_CONTAINER_NAME_LENGTH, MAX_ACCOUNT_NAME_LENGTH, \
+ MAX_FILE_SIZE
+
config = get_config()
@@ -361,7 +371,7 @@ class TestContainer(Base):
set_up = False
def testContainerNameLimit(self):
- limit = 256
+ limit = MAX_CONTAINER_NAME_LENGTH
for l in (limit-100, limit-10, limit-1, limit,
limit+1, limit+10, limit+100):
@@ -949,7 +959,7 @@ class TestFile(Base):
self.assert_status(404)
def testNameLimit(self):
- limit = 1024
+ limit = MAX_OBJECT_NAME_LENGTH
for l in (1, 10, limit/2, limit-1, limit, limit+1, limit*2):
file = self.env.container.file('a'*l)
@@ -1093,7 +1103,7 @@ class TestFile(Base):
self.assert_(file.read(hdrs={'Range': r}) == data[0:1000])
def testFileSizeLimit(self):
- limit = 5*2**30 + 2
+ limit = MAX_FILE_SIZE
tsecs = 3
for i in (limit-100, limit-10, limit-1, limit, limit+1, limit+10,
diff --git a/test/unit/obj/test_server.py b/test/unit/obj/test_server.py
index 075700e..5b6f32d 100644
--- a/test/unit/obj/test_server.py
+++ b/test/unit/obj/test_server.py
@@ -1355,7 +1355,7 @@ class TestObjectController(unittest.TestCase):
def test_max_object_name_length(self):
timestamp = normalize_timestamp(time())
- req = Request.blank('/sda1/p/a/c/' + ('1' * 1024),
+ req = Request.blank('/sda1/p/a/c/' + ('1' * MAX_OBJECT_NAME_LENGTH),
environ={'REQUEST_METHOD': 'PUT'},
headers={'X-Timestamp': timestamp,
'Content-Length': '4',
diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py
index 364370e..c17fe59 100644
--- a/test/unit/proxy/test_server.py
+++ b/test/unit/proxy/test_server.py
@@ -21,7 +21,6 @@ import os
import sys
import unittest
from nose import SkipTest
-from ConfigParser import ConfigParser
from contextlib import contextmanager
from cStringIO import StringIO
from gzip import GzipFile
@@ -44,8 +43,18 @@ from swift.account import server as account_server
from swift.container import server as container_server
from swift.obj import server as object_server
from swift.common import ring
-from swift.common.constraints import MAX_META_NAME_LENGTH, \
- MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, MAX_FILE_SIZE
+from swift.common.utils import plugin_enabled
+if plugin_enabled():
+ from swift.plugins.constraints import MAX_META_NAME_LENGTH, \
+ MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, \
+ MAX_FILE_SIZE, MAX_ACCOUNT_NAME_LENGTH, MAX_CONTAINER_NAME_LENGTH, \
+ MAX_OBJECT_NAME_LENGTH
+else:
+ from swift.plugins.constraints import MAX_META_NAME_LENGTH, \
+ MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, \
+ MAX_FILE_SIZE, MAX_ACCOUNT_NAME_LENGTH, MAX_CONTAINER_NAME_LENGTH, \
+ MAX_OBJECT_NAME_LENGTH
+
from swift.common.utils import mkdirs, normalize_timestamp, NullLogger
from swift.common.wsgi import monkey_patch_mimetools
@@ -3207,7 +3216,8 @@ class TestContainerController(unittest.TestCase):
def test_PUT_max_container_name_length(self):
with save_globals():
controller = proxy_server.ContainerController(self.app, 'account',
- '1' * 256)
+ '1' *
+ MAX_CONTAINER_NAME_LENGTH,)
self.assert_status_map(controller.PUT,
(200, 200, 200, 201, 201, 201), 201,
missing_container=True)
@@ -3813,7 +3823,8 @@ class TestAccountController(unittest.TestCase):
def test_PUT_max_account_name_length(self):
with save_globals():
self.app.allow_account_management = True
- controller = proxy_server.AccountController(self.app, '1' * 256)
+ controller = proxy_server.AccountController(self.app, '1' *
+ MAX_ACCOUNT_NAME_LENGTH)
self.assert_status_map(controller.PUT, (201, 201, 201), 201)
controller = proxy_server.AccountController(self.app, '2' * 257)
self.assert_status_map(controller.PUT, (201, 201, 201), 400)

View file

@ -1,76 +0,0 @@
--- xlators/mount/fuse/src/fuse-bridge.c.orig
+++ xlators/mount/fuse/src/fuse-bridge.c
@@ -4198,13 +4198,11 @@ fuse_thread_proc (void *data)
finh->uid == priv->uid_map_root)
finh->uid = 0;
-#ifdef GF_DARWIN_HOST_OS
if (finh->opcode >= FUSE_OP_HIGH)
/* turn down MacFUSE specific messages */
fuse_enosys (this, finh, msg);
else
-#endif
- fuse_ops[finh->opcode] (this, finh, msg);
+ fuse_ops[finh->opcode] (this, finh, msg);
iobuf_unref (iobuf);
continue;
@@ -4423,40 +4421,47 @@ mem_acct_init (xlator_t *this)
static fuse_handler_t *fuse_std_ops[FUSE_OP_HIGH] = {
- [FUSE_INIT] = fuse_init,
- [FUSE_DESTROY] = fuse_destroy,
[FUSE_LOOKUP] = fuse_lookup,
[FUSE_FORGET] = fuse_forget,
[FUSE_GETATTR] = fuse_getattr,
[FUSE_SETATTR] = fuse_setattr,
- [FUSE_OPENDIR] = fuse_opendir,
- [FUSE_READDIR] = fuse_readdir,
- [FUSE_RELEASEDIR] = fuse_releasedir,
- [FUSE_ACCESS] = fuse_access,
[FUSE_READLINK] = fuse_readlink,
+ [FUSE_SYMLINK] = fuse_symlink,
[FUSE_MKNOD] = fuse_mknod,
[FUSE_MKDIR] = fuse_mkdir,
[FUSE_UNLINK] = fuse_unlink,
[FUSE_RMDIR] = fuse_rmdir,
- [FUSE_SYMLINK] = fuse_symlink,
[FUSE_RENAME] = fuse_rename,
[FUSE_LINK] = fuse_link,
- [FUSE_CREATE] = fuse_create,
[FUSE_OPEN] = fuse_open,
[FUSE_READ] = fuse_readv,
[FUSE_WRITE] = fuse_write,
- [FUSE_FLUSH] = fuse_flush,
+ [FUSE_STATFS] = fuse_statfs,
[FUSE_RELEASE] = fuse_release,
[FUSE_FSYNC] = fuse_fsync,
- [FUSE_FSYNCDIR] = fuse_fsyncdir,
- [FUSE_STATFS] = fuse_statfs,
[FUSE_SETXATTR] = fuse_setxattr,
[FUSE_GETXATTR] = fuse_getxattr,
[FUSE_LISTXATTR] = fuse_listxattr,
[FUSE_REMOVEXATTR] = fuse_removexattr,
+ [FUSE_FLUSH] = fuse_flush,
+ [FUSE_INIT] = fuse_init,
+ [FUSE_OPENDIR] = fuse_opendir,
+ [FUSE_READDIR] = fuse_readdir,
+ [FUSE_RELEASEDIR] = fuse_releasedir,
+ [FUSE_FSYNCDIR] = fuse_fsyncdir,
[FUSE_GETLK] = fuse_getlk,
[FUSE_SETLK] = fuse_setlk,
[FUSE_SETLKW] = fuse_setlk,
+ [FUSE_ACCESS] = fuse_access,
+ [FUSE_CREATE] = fuse_create,
+ /* [FUSE_INTERRUPT] */
+ /* [FUSE_BMAP] */
+ [FUSE_DESTROY] = fuse_destroy,
+ /* [FUSE_IOCTL] */
+ /* [FUSE_POLL] */
+ /* [FUSE_NOTIFY_REPLY] */
+ /* [FUSE_BATCH_FORGET] */
+ /* [FUSE_FALLOCATE] */
};

View file

@ -1,11 +0,0 @@
--- a/rpc/rpc-transport/rdma/src/name.c 2012-10-11 13:38:22.000000000 -0400
+++ b/rpc/rpc-transport/rdma/src/name.c 2013-04-12 13:50:07.000000000 -0400
@@ -352,6 +352,8 @@
if (listen_port_data) {
listen_port = data_to_uint16 (listen_port_data);
} else {
+ listen_port = GF_DEFAULT_RDMA_LISTEN_PORT;
+
if (addr->sa_family == AF_INET6) {
struct sockaddr_in6 *in = (struct sockaddr_in6 *) addr;
in->sin6_addr = in6addr_any;

View file

@ -1,567 +0,0 @@
From 9ce581c9c548c6a843e682f79f9ae510121501ac Mon Sep 17 00:00:00 2001
From: Peter Portante <peter.portante@redhat.com>
Date: Thu, 4 Oct 2012 11:32:56 -0400
Subject: [PATCH] Backport commit a2ac5efaa64f57fbbe059066c6c4636dfd0715c2,
'swift constraints are now settable via config', excluding
PEP8 changes that did not involve the constraints.
---
etc/swift.conf-sample | 73 ++++++++++++++++++++++++++++++++++
swift/common/constraints.py | 29 +++++++++++++
swift/container/sync.py | 8 +++-
test/functional/tests.py | 63 ++++++++++++++++++++++++-----
test/sample.conf | 15 +++++++
test/unit/common/test_constraints.py | 9 +++-
test/unit/obj/test_server.py | 6 ++-
test/unit/proxy/test_server.py | 50 ++++++++++++++---------
8 files changed, 218 insertions(+), 35 deletions(-)
diff --git a/etc/swift.conf-sample b/etc/swift.conf-sample
index 7e1c31d..2f4192a 100644
--- a/etc/swift.conf-sample
+++ b/etc/swift.conf-sample
@@ -1,3 +1,76 @@
[swift-hash]
+
+# swift_hash_path_suffix is used as part of the hashing algorithm
+# when determining data placement in the cluster. This value should
+# remain secret and MUST NOT change once a cluster has been deployed.
+
swift_hash_path_suffix = changeme
+
+
+# The swift-constraints section sets the basic constraints on data
+# saved in the swift cluster.
+
+[swift-constraints]
+
+# max_file_size is the largest "normal" object that can be saved in
+# the cluster. This is also the limit on the size of each segment of
+# a "large" object when using the large object manifest support.
+# This value is set in bytes. Setting it to lower than 1MiB will cause
+# some tests to fail. It is STRONGLY recommended to leave this value at
+# the default (5 * 2**30 + 2).
+
+#max_file_size = 5368709122
+
+
+# max_meta_name_length is the max number of bytes in the utf8 encoding
+# of the name portion of a metadata header.
+
+#max_meta_name_length = 128
+
+
+# max_meta_value_length is the max number of bytes in the utf8 encoding
+# of a metadata value
+
+#max_meta_value_length = 256
+
+
+# max_meta_count is the max number of metadata keys that can be stored
+# on a single account, container, or object
+
+#max_meta_count = 90
+
+
+# max_meta_overall_size is the max number of bytes in the utf8 encoding
+# of the metadata (keys + values)
+
+#max_meta_overall_size = 4096
+
+
+# max_object_name_length is the max number of bytes in the utf8 encoding
+# of an object name
+
+#max_object_name_length = 1024
+
+
+# container_listing_limit is the default (and max) number of items
+# returned for a container listing request
+
+#container_listing_limit = 10000
+
+
+# account_listing_limit is the default (and max) number of items returned
+# for an account listing request
+#account_listing_limit = 10000
+
+
+# max_account_name_length is the max number of bytes in the utf8 encoding
+# of an account name
+
+#max_account_name_length = 256
+
+
+# max_container_name_length is the max number of bytes in the utf8 encoding
+# of a container name
+
+#max_container_name_length = 256
diff --git a/swift/common/constraints.py b/swift/common/constraints.py
index a797b8b..0083346 100644
--- a/swift/common/constraints.py
+++ b/swift/common/constraints.py
@@ -14,29 +14,58 @@
# limitations under the License.
import os
+from ConfigParser import ConfigParser, NoSectionError, NoOptionError, \
+ RawConfigParser
from webob.exc import HTTPBadRequest, HTTPLengthRequired, \
HTTPRequestEntityTooLarge
+constraints_conf = ConfigParser()
+constraints_conf.read('/etc/swift/swift.conf')
+
+
+def constraints_conf_int(name, default):
+ try:
+ return int(constraints_conf.get('swift-constraints', name))
+ except (NoSectionError, NoOptionError):
+ return default
+
#: Max file size allowed for objects
MAX_FILE_SIZE = 5 * 1024 * 1024 * 1024 + 2
+MAX_FILE_SIZE = constraints_conf_int('max_file_size',
+ 5368709122) # 5 * 1024 * 1024 * 1024 + 2
#: Max length of the name of a key for metadata
MAX_META_NAME_LENGTH = 128
+MAX_META_NAME_LENGTH = constraints_conf_int('max_meta_name_length', 128)
#: Max length of the value of a key for metadata
MAX_META_VALUE_LENGTH = 256
+MAX_META_VALUE_LENGTH = constraints_conf_int('max_meta_value_length', 256)
#: Max number of metadata items
MAX_META_COUNT = 90
+MAX_META_COUNT = constraints_conf_int('max_meta_count', 90)
#: Max overall size of metadata
MAX_META_OVERALL_SIZE = 4096
+MAX_META_OVERALL_SIZE = constraints_conf_int('max_meta_overall_size', 4096)
#: Max object name length
MAX_OBJECT_NAME_LENGTH = 1024
+MAX_OBJECT_NAME_LENGTH = constraints_conf_int('max_object_name_length', 1024)
#: Max object list length of a get request for a container
CONTAINER_LISTING_LIMIT = 10000
+CONTAINER_LISTING_LIMIT = constraints_conf_int('container_listing_limit',
+ 10000)
#: Max container list length of a get request for an account
ACCOUNT_LISTING_LIMIT = 10000
MAX_ACCOUNT_NAME_LENGTH = 256
MAX_CONTAINER_NAME_LENGTH = 256
+ACCOUNT_LISTING_LIMIT = constraints_conf_int('account_listing_limit', 10000)
+#: Max account name length
+MAX_ACCOUNT_NAME_LENGTH = constraints_conf_int('max_account_name_length', 256)
+#: Max container name length
+MAX_CONTAINER_NAME_LENGTH = constraints_conf_int('max_container_name_length',
+ 256)
+
+
#: Query string format= values to their corresponding content-type values
FORMAT2CONTENT_TYPE = {'plain': 'text/plain', 'json': 'application/json',
'xml': 'application/xml'}
diff --git a/swift/container/sync.py b/swift/container/sync.py
index d7152ac..472d33a 100644
--- a/swift/container/sync.py
+++ b/swift/container/sync.py
@@ -21,8 +21,12 @@ from eventlet import sleep, Timeout
import swift.common.db
from swift.container import server as container_server
-from swiftclient import ClientException, delete_object, put_object, \
- quote
+try:
+ from swiftclient import ClientException, delete_object, put_object, \
+ quote
+except:
+ import sys
+ raise Exception("\n".join(sys.path))
from swift.common.direct_client import direct_get_object
from swift.common.ring import Ring
from swift.common.db import ContainerBroker
diff --git a/test/functional/tests.py b/test/functional/tests.py
index a412f83..bcdd76f 100644
--- a/test/functional/tests.py
+++ b/test/functional/tests.py
@@ -15,6 +15,7 @@
# limitations under the License.
from datetime import datetime
+from ConfigParser import ConfigParser
import locale
import random
import StringIO
@@ -26,8 +27,50 @@ from nose import SkipTest
from test import get_config
from test.functional.swift import Account, Connection, File, ResponseError
-
+from swift.common.constraints import MAX_FILE_SIZE, MAX_META_NAME_LENGTH, \
+ MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, \
+ MAX_OBJECT_NAME_LENGTH, CONTAINER_LISTING_LIMIT, ACCOUNT_LISTING_LIMIT, \
+ MAX_ACCOUNT_NAME_LENGTH, MAX_CONTAINER_NAME_LENGTH
+
+default_constraints = dict((
+ ('max_file_size', MAX_FILE_SIZE),
+ ('max_meta_name_length', MAX_META_NAME_LENGTH),
+ ('max_meta_value_length', MAX_META_VALUE_LENGTH),
+ ('max_meta_count', MAX_META_COUNT),
+ ('max_meta_overall_size', MAX_META_OVERALL_SIZE),
+ ('max_object_name_length', MAX_OBJECT_NAME_LENGTH),
+ ('container_listing_limit', CONTAINER_LISTING_LIMIT),
+ ('account_listing_limit', ACCOUNT_LISTING_LIMIT),
+ ('max_account_name_length', MAX_ACCOUNT_NAME_LENGTH),
+ ('max_container_name_length', MAX_CONTAINER_NAME_LENGTH)))
+constraints_conf = ConfigParser()
+conf_exists = constraints_conf.read('/etc/swift/swift.conf')
+# Constraints are set first from the test config, then from
+# /etc/swift/swift.conf if it exists. If swift.conf doesn't exist,
+# then limit test coverage. This allows SAIO tests to work fine but
+# requires remote funtional testing to know something about the cluster
+# that is being tested.
config = get_config('func_test')
+for k in default_constraints:
+ if k in config:
+ # prefer what's in test.conf
+ config[k] = int(config[k])
+ elif conf_exists:
+ # swift.conf exists, so use what's defined there (or swift defaults)
+ # This normally happens when the test is running locally to the cluster
+ # as in a SAIO.
+ config[k] = default_constraints[k]
+ else:
+ # .functests don't know what the constraints of the tested cluster are,
+ # so the tests can't reliably pass or fail. Therefore, skip those
+ # tests.
+ config[k] = '%s constraint is not defined' % k
+
+def load_constraint(name):
+ c = config[name]
+ if not isinstance(c, int):
+ raise SkipTest(c)
+ return c
locale.setlocale(locale.LC_COLLATE, config.get('collate', 'C'))
@@ -225,8 +268,7 @@ class TestAccount(Base):
'application/xml; charset=utf-8')
def testListingLimit(self):
- limit = 10000
-
+ limit = load_constraint('account_listing_limit')
for l in (1, 100, limit/2, limit-1, limit, limit+1, limit*2):
p = {'limit':l}
@@ -353,7 +395,7 @@ class TestContainer(Base):
set_up = False
def testContainerNameLimit(self):
- limit = 256
+ limit = load_constraint('max_container_name_length')
for l in (limit-100, limit-10, limit-1, limit,
limit+1, limit+10, limit+100):
@@ -398,6 +440,7 @@ class TestContainer(Base):
self.assert_(cont.files(parms={'prefix': f}) == [f])
def testPrefixAndLimit(self):
+ load_constraint('container_listing_limit')
cont = self.env.account.container(Utils.create_name())
self.assert_(cont.create())
@@ -941,7 +984,7 @@ class TestFile(Base):
self.assert_status(404)
def testNameLimit(self):
- limit = 1024
+ limit = load_constraint('max_object_name_length')
for l in (1, 10, limit/2, limit-1, limit, limit+1, limit*2):
file = self.env.container.file('a'*l)
@@ -989,13 +1032,12 @@ class TestFile(Base):
self.assert_status(400)
def testMetadataNumberLimit(self):
- number_limit = 90
+ number_limit = load_constraint('max_meta_count')
+ size_limit = load_constraint('max_meta_overall_size')
for i in (number_limit-10, number_limit-1, number_limit,
number_limit+1, number_limit+10, number_limit+100):
- size_limit = 4096
-
j = size_limit/(i * 2)
size = 0
@@ -1096,7 +1138,7 @@ class TestFile(Base):
self.assert_(file.read(hdrs={'Range': r}) == data[0:1000])
def testFileSizeLimit(self):
- limit = 5*2**30 + 2
+ limit = load_constraint('max_file_size')
tsecs = 3
for i in (limit-100, limit-10, limit-1, limit, limit+1, limit+10,
@@ -1150,7 +1192,8 @@ class TestFile(Base):
self.assert_status(200)
def testMetadataLengthLimits(self):
- key_limit, value_limit = 128, 256
+ key_limit = load_constraint('max_meta_name_length')
+ value_limit = load_constraint('max_meta_value_length')
lengths = [[key_limit, value_limit], [key_limit, value_limit+1], \
[key_limit+1, value_limit], [key_limit, 0], \
[key_limit, value_limit*10], [key_limit*10, value_limit]]
diff --git a/test/sample.conf b/test/sample.conf
index 7594c02..d3eced0 100644
--- a/test/sample.conf
+++ b/test/sample.conf
@@ -19,6 +19,21 @@ password2 = testing2
username3 = tester3
password3 = testing3
+# Default constraints if not defined here, the test runner will try
+# to set them from /etc/swift/swift.conf. If that file isn't found,
+# the test runner will skip tests that depend on these values.
+# Note that the cluster must have "sane" values for the test suite to pass.
+#max_file_size = 5368709122
+#max_meta_name_length = 128
+#max_meta_value_length = 256
+#max_meta_count = 90
+#max_meta_overall_size = 4096
+#max_object_name_length = 1024
+#container_listing_limit = 10000
+#account_listing_limit = 10000
+#max_account_name_length = 256
+#max_container_name_length = 256
+
collate = C
[unit_test]
diff --git a/test/unit/common/test_constraints.py b/test/unit/common/test_constraints.py
index 37ed225..000a0b4 100644
--- a/test/unit/common/test_constraints.py
+++ b/test/unit/common/test_constraints.py
@@ -84,8 +84,13 @@ class TestConstraints(unittest.TestCase):
x += 1
self.assertEquals(constraints.check_metadata(Request.blank('/',
headers=headers), 'object'), None)
- headers['X-Object-Meta-9999%s' %
- ('a' * (constraints.MAX_META_NAME_LENGTH - 4))] = \
+ # add two more headers in case adding just one falls exactly on the
+ # limit (eg one header adds 1024 and the limit is 2048)
+ headers['X-Object-Meta-%04d%s' %
+ (x, 'a' * (constraints.MAX_META_NAME_LENGTH - 4))] = \
+ 'v' * constraints.MAX_META_VALUE_LENGTH
+ headers['X-Object-Meta-%04d%s' %
+ (x + 1, 'a' * (constraints.MAX_META_NAME_LENGTH - 4))] = \
'v' * constraints.MAX_META_VALUE_LENGTH
self.assert_(isinstance(constraints.check_metadata(Request.blank('/',
headers=headers), 'object'), HTTPBadRequest))
diff --git a/test/unit/obj/test_server.py b/test/unit/obj/test_server.py
index 0d94dba..f78baa1 100644
--- a/test/unit/obj/test_server.py
+++ b/test/unit/obj/test_server.py
@@ -35,6 +35,7 @@ from swift.common import utils
from swift.common.utils import hash_path, mkdirs, normalize_timestamp, \
NullLogger, storage_directory
from swift.common.exceptions import DiskFileNotExist
+from swift.common import constraints
from eventlet import tpool
@@ -1389,7 +1390,8 @@ class TestObjectController(unittest.TestCase):
def test_max_object_name_length(self):
timestamp = normalize_timestamp(time())
- req = Request.blank('/sda1/p/a/c/' + ('1' * 1024),
+ max_name_len = constraints.MAX_OBJECT_NAME_LENGTH
+ req = Request.blank('/sda1/p/a/c/' + ('1' * max_name_len),
environ={'REQUEST_METHOD': 'PUT'},
headers={'X-Timestamp': timestamp,
'Content-Length': '4',
@@ -1397,7 +1399,7 @@ class TestObjectController(unittest.TestCase):
req.body = 'DATA'
resp = self.object_controller.PUT(req)
self.assertEquals(resp.status_int, 201)
- req = Request.blank('/sda1/p/a/c/' + ('2' * 1025),
+ req = Request.blank('/sda1/p/a/c/' + ('2' * (max_name_len + 1)),
environ={'REQUEST_METHOD': 'PUT'},
headers={'X-Timestamp': timestamp,
'Content-Length': '4',
diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py
index 80ef9f7..0e3f30d 100644
--- a/test/unit/proxy/test_server.py
+++ b/test/unit/proxy/test_server.py
@@ -46,7 +46,8 @@ from swift.obj import server as object_server
from swift.common import ring
from swift.common.exceptions import ChunkReadTimeout
from swift.common.constraints import MAX_META_NAME_LENGTH, \
- MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, MAX_FILE_SIZE
+ MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, \
+ MAX_FILE_SIZE, MAX_ACCOUNT_NAME_LENGTH, MAX_CONTAINER_NAME_LENGTH
from swift.common.utils import mkdirs, normalize_timestamp, NullLogger
from swift.common.wsgi import monkey_patch_mimetools
from swift.proxy.controllers.obj import SegmentedIterable
@@ -1060,47 +1061,50 @@ class TestObjectController(unittest.TestCase):
def test_POST_meta_val_len(self):
with save_globals():
+ limit = MAX_META_VALUE_LENGTH
self.app.object_post_as_copy = False
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
set_http_connect(200, 200, 202, 202, 202)
# acct cont obj obj obj
req = Request.blank('/a/c/o', {}, headers={
- 'Content-Type': 'foo/bar',
- 'X-Object-Meta-Foo': 'x' * 256})
+ 'Content-Type': 'foo/bar',
+ 'X-Object-Meta-Foo': 'x' * limit})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 202)
set_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers={
- 'Content-Type': 'foo/bar',
- 'X-Object-Meta-Foo': 'x' * 257})
+ 'Content-Type': 'foo/bar',
+ 'X-Object-Meta-Foo': 'x' * (limit + 1)})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 400)
def test_POST_as_copy_meta_val_len(self):
with save_globals():
+ limit = MAX_META_VALUE_LENGTH
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
set_http_connect(200, 200, 200, 200, 200, 202, 202, 202)
# acct cont objc objc objc obj obj obj
req = Request.blank('/a/c/o', {}, headers={
- 'Content-Type': 'foo/bar',
- 'X-Object-Meta-Foo': 'x' * 256})
+ 'Content-Type': 'foo/bar',
+ 'X-Object-Meta-Foo': 'x' * limit})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 202)
set_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers={
- 'Content-Type': 'foo/bar',
- 'X-Object-Meta-Foo': 'x' * 257})
+ 'Content-Type': 'foo/bar',
+ 'X-Object-Meta-Foo': 'x' * (limit + 1)})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 400)
def test_POST_meta_key_len(self):
with save_globals():
+ limit = MAX_META_NAME_LENGTH
self.app.object_post_as_copy = False
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
@@ -1108,44 +1112,46 @@ class TestObjectController(unittest.TestCase):
# acct cont obj obj obj
req = Request.blank('/a/c/o', {}, headers={
'Content-Type': 'foo/bar',
- ('X-Object-Meta-' + 'x' * 128): 'x'})
+ ('X-Object-Meta-' + 'x' * limit): 'x'})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 202)
set_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers={
'Content-Type': 'foo/bar',
- ('X-Object-Meta-' + 'x' * 129): 'x'})
+ ('X-Object-Meta-' + 'x' * (limit + 1)): 'x'})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 400)
def test_POST_as_copy_meta_key_len(self):
with save_globals():
+ limit = MAX_META_NAME_LENGTH
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
set_http_connect(200, 200, 200, 200, 200, 202, 202, 202)
# acct cont objc objc objc obj obj obj
req = Request.blank('/a/c/o', {}, headers={
'Content-Type': 'foo/bar',
- ('X-Object-Meta-' + 'x' * 128): 'x'})
+ ('X-Object-Meta-' + 'x' * limit): 'x'})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 202)
set_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers={
'Content-Type': 'foo/bar',
- ('X-Object-Meta-' + 'x' * 129): 'x'})
+ ('X-Object-Meta-' + 'x' * (limit + 1)): 'x'})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 400)
def test_POST_meta_count(self):
with save_globals():
+ limit = MAX_META_COUNT
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
headers = dict(
- (('X-Object-Meta-' + str(i), 'a') for i in xrange(91)))
+ (('X-Object-Meta-' + str(i), 'a') for i in xrange(limit + 1)))
headers.update({'Content-Type': 'foo/bar'})
set_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers=headers)
@@ -1155,10 +1161,13 @@ class TestObjectController(unittest.TestCase):
def test_POST_meta_size(self):
with save_globals():
+ limit = MAX_META_OVERALL_SIZE
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
+ count = limit / 256 # enough to cause the limit to be reched
headers = dict(
- (('X-Object-Meta-' + str(i), 'a' * 256) for i in xrange(1000)))
+ (('X-Object-Meta-' + str(i), 'a' * 256)
+ for i in xrange(count + 1)))
headers.update({'Content-Type': 'foo/bar'})
set_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers=headers)
@@ -3408,13 +3417,14 @@ class TestContainerController(unittest.TestCase):
def test_PUT_max_container_name_length(self):
with save_globals():
+ limit = MAX_CONTAINER_NAME_LENGTH
controller = proxy_server.ContainerController(self.app, 'account',
- '1' * 256)
+ '1' * limit)
self.assert_status_map(controller.PUT,
(200, 200, 200, 201, 201, 201), 201,
missing_container=True)
controller = proxy_server.ContainerController(self.app, 'account',
- '2' * 257)
+ '2' * (limit + 1))
self.assert_status_map(controller.PUT, (201, 201, 201), 400,
missing_container=True)
@@ -3961,9 +3971,11 @@ class TestAccountController(unittest.TestCase):
def test_PUT_max_account_name_length(self):
with save_globals():
self.app.allow_account_management = True
- controller = proxy_server.AccountController(self.app, '1' * 256)
+ limit = MAX_ACCOUNT_NAME_LENGTH
+ controller = proxy_server.AccountController(self.app, '1' * limit)
self.assert_status_map(controller.PUT, (201, 201, 201), 201)
- controller = proxy_server.AccountController(self.app, '2' * 257)
+ controller = proxy_server.AccountController(
+ self.app, '2' * (limit + 1))
self.assert_status_map(controller.PUT, (201, 201, 201), 400)
def test_PUT_connect_exceptions(self):
--
1.7.7.6

View file

@ -1,518 +0,0 @@
From fc2421b04022ac6bbe9d5014362ec5f99f94c5e0 Mon Sep 17 00:00:00 2001
From: Peter Portante <peter.portante@redhat.com>
Date: Tue, 25 Sep 2012 13:27:59 -0400
Subject: [PATCH] Backport commit a2ac5efaa64f57fbbe059066c6c4636dfd0715c2,
'swift constraints are now settable via config', excluding
PEP8 changes that did not involve the constraints.
---
etc/swift.conf-sample | 73 ++++++++++++++++++++++++++++++++++
swift/common/constraints.py | 37 ++++++++++++-----
test/functional/tests.py | 62 ++++++++++++++++++++++++----
test/unit/common/test_constraints.py | 9 +++-
test/unit/obj/test_server.py | 7 ++-
test/unit/proxy/test_server.py | 50 ++++++++++++++---------
6 files changed, 196 insertions(+), 42 deletions(-)
diff --git a/etc/swift.conf-sample b/etc/swift.conf-sample
index 7e1c31d..2f4192a 100644
--- a/etc/swift.conf-sample
+++ b/etc/swift.conf-sample
@@ -1,3 +1,76 @@
[swift-hash]
+
+# swift_hash_path_suffix is used as part of the hashing algorithm
+# when determining data placement in the cluster. This value should
+# remain secret and MUST NOT change once a cluster has been deployed.
+
swift_hash_path_suffix = changeme
+
+
+# The swift-constraints section sets the basic constraints on data
+# saved in the swift cluster.
+
+[swift-constraints]
+
+# max_file_size is the largest "normal" object that can be saved in
+# the cluster. This is also the limit on the size of each segment of
+# a "large" object when using the large object manifest support.
+# This value is set in bytes. Setting it to lower than 1MiB will cause
+# some tests to fail. It is STRONGLY recommended to leave this value at
+# the default (5 * 2**30 + 2).
+
+#max_file_size = 5368709122
+
+
+# max_meta_name_length is the max number of bytes in the utf8 encoding
+# of the name portion of a metadata header.
+
+#max_meta_name_length = 128
+
+
+# max_meta_value_length is the max number of bytes in the utf8 encoding
+# of a metadata value
+
+#max_meta_value_length = 256
+
+
+# max_meta_count is the max number of metadata keys that can be stored
+# on a single account, container, or object
+
+#max_meta_count = 90
+
+
+# max_meta_overall_size is the max number of bytes in the utf8 encoding
+# of the metadata (keys + values)
+
+#max_meta_overall_size = 4096
+
+
+# max_object_name_length is the max number of bytes in the utf8 encoding
+# of an object name
+
+#max_object_name_length = 1024
+
+
+# container_listing_limit is the default (and max) number of items
+# returned for a container listing request
+
+#container_listing_limit = 10000
+
+
+# account_listing_limit is the default (and max) number of items returned
+# for an account listing request
+#account_listing_limit = 10000
+
+
+# max_account_name_length is the max number of bytes in the utf8 encoding
+# of an account name
+
+#max_account_name_length = 256
+
+
+# max_container_name_length is the max number of bytes in the utf8 encoding
+# of a container name
+
+#max_container_name_length = 256
diff --git a/swift/common/constraints.py b/swift/common/constraints.py
index 235dcca..0fe5078 100644
--- a/swift/common/constraints.py
+++ b/swift/common/constraints.py
@@ -14,29 +14,46 @@
# limitations under the License.
import os
+from ConfigParser import ConfigParser, NoSectionError, NoOptionError, \
+ RawConfigParser
from webob.exc import HTTPBadRequest, HTTPLengthRequired, \
HTTPRequestEntityTooLarge
+constraints_conf = ConfigParser()
+constraints_conf.read('/etc/swift/swift.conf')
+
+
+def constraints_conf_int(name, default):
+ try:
+ return int(constraints_conf.get('swift-constraints', name))
+ except (NoSectionError, NoOptionError):
+ return default
+
#: Max file size allowed for objects
-MAX_FILE_SIZE = 5 * 1024 * 1024 * 1024 + 2
+MAX_FILE_SIZE = constraints_conf_int('max_file_size',
+ 5368709122) # 5 * 1024 * 1024 * 1024 + 2
#: Max length of the name of a key for metadata
-MAX_META_NAME_LENGTH = 128
+MAX_META_NAME_LENGTH = constraints_conf_int('max_meta_name_length', 128)
#: Max length of the value of a key for metadata
-MAX_META_VALUE_LENGTH = 256
+MAX_META_VALUE_LENGTH = constraints_conf_int('max_meta_value_length', 256)
#: Max number of metadata items
-MAX_META_COUNT = 90
+MAX_META_COUNT = constraints_conf_int('max_meta_count', 90)
#: Max overall size of metadata
-MAX_META_OVERALL_SIZE = 4096
+MAX_META_OVERALL_SIZE = constraints_conf_int('max_meta_overall_size', 4096)
#: Max object name length
-MAX_OBJECT_NAME_LENGTH = 1024
+MAX_OBJECT_NAME_LENGTH = constraints_conf_int('max_object_name_length', 1024)
#: Max object list length of a get request for a container
-CONTAINER_LISTING_LIMIT = 10000
+CONTAINER_LISTING_LIMIT = constraints_conf_int('container_listing_limit',
+ 10000)
#: Max container list length of a get request for an account
-ACCOUNT_LISTING_LIMIT = 10000
-MAX_ACCOUNT_NAME_LENGTH = 256
-MAX_CONTAINER_NAME_LENGTH = 256
+ACCOUNT_LISTING_LIMIT = constraints_conf_int('account_listing_limit', 10000)
+#: Max account name length
+MAX_ACCOUNT_NAME_LENGTH = constraints_conf_int('max_account_name_length', 256)
+#: Max container name length
+MAX_CONTAINER_NAME_LENGTH = constraints_conf_int('max_container_name_length',
+ 256)
def check_metadata(req, target_type):
diff --git a/test/functional/tests.py b/test/functional/tests.py
index b25b4fd..3b18fc4 100644
--- a/test/functional/tests.py
+++ b/test/functional/tests.py
@@ -27,12 +27,55 @@ import threading
import uuid
import unittest
import urllib
+from ConfigParser import ConfigParser
from test import get_config
from swift import Account, AuthenticationFailed, Connection, Container, \
File, ResponseError
-
+from swift.common.constraints import MAX_FILE_SIZE, MAX_META_NAME_LENGTH, \
+ MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, \
+ MAX_OBJECT_NAME_LENGTH, CONTAINER_LISTING_LIMIT, ACCOUNT_LISTING_LIMIT, \
+ MAX_ACCOUNT_NAME_LENGTH, MAX_CONTAINER_NAME_LENGTH
+
+default_constraints = dict((
+ ('max_file_size', MAX_FILE_SIZE),
+ ('max_meta_name_length', MAX_META_NAME_LENGTH),
+ ('max_meta_value_length', MAX_META_VALUE_LENGTH),
+ ('max_meta_count', MAX_META_COUNT),
+ ('max_meta_overall_size', MAX_META_OVERALL_SIZE),
+ ('max_object_name_length', MAX_OBJECT_NAME_LENGTH),
+ ('container_listing_limit', CONTAINER_LISTING_LIMIT),
+ ('account_listing_limit', ACCOUNT_LISTING_LIMIT),
+ ('max_account_name_length', MAX_ACCOUNT_NAME_LENGTH),
+ ('max_container_name_length', MAX_CONTAINER_NAME_LENGTH)))
+constraints_conf = ConfigParser()
+conf_exists = constraints_conf.read('/etc/swift/swift.conf')
+# Constraints are set first from the test config, then from
+# /etc/swift/swift.conf if it exists. If swift.conf doesn't exist,
+# then limit test coverage. This allows SAIO tests to work fine but
+# requires remote funtional testing to know something about the cluster
+# that is being tested.
config = get_config()
+for k in default_constraints:
+ if k in config:
+ # prefer what's in test.conf
+ config[k] = int(config[k])
+ elif conf_exists:
+ # swift.conf exists, so use what's defined there (or swift defaults)
+ # This normally happens when the test is running locally to the cluster
+ # as in a SAIO.
+ config[k] = default_constraints[k]
+ else:
+ # .functests don't know what the constraints of the tested cluster are,
+ # so the tests can't reliably pass or fail. Therefore, skip those
+ # tests.
+ config[k] = '%s constraint is not defined' % k
+
+def load_constraint(name):
+ c = config[name]
+ if not isinstance(c, int):
+ raise SkipTest(c)
+ return c
locale.setlocale(locale.LC_COLLATE, config.get('collate', 'C'))
@@ -233,7 +276,7 @@ class TestAccount(Base):
'application/xml; charset=utf-8')
def testListingLimit(self):
- limit = 10000
+ limit = load_constraint('account_listing_limit')
for l in (1, 100, limit/2, limit-1, limit, limit+1, limit*2):
p = {'limit':l}
@@ -361,7 +404,7 @@ class TestContainer(Base):
set_up = False
def testContainerNameLimit(self):
- limit = 256
+ limit = load_constraint('max_container_name_length')
for l in (limit-100, limit-10, limit-1, limit,
limit+1, limit+10, limit+100):
@@ -406,6 +449,7 @@ class TestContainer(Base):
self.assert_(cont.files(parms={'prefix': f}) == [f])
def testPrefixAndLimit(self):
+ load_constraint('container_listing_limit')
cont = self.env.account.container(Utils.create_name())
self.assert_(cont.create())
@@ -949,7 +993,7 @@ class TestFile(Base):
self.assert_status(404)
def testNameLimit(self):
- limit = 1024
+ limit = load_constraint('max_object_name_length')
for l in (1, 10, limit/2, limit-1, limit, limit+1, limit*2):
file = self.env.container.file('a'*l)
@@ -997,13 +1041,12 @@ class TestFile(Base):
self.assert_status(400)
def testMetadataNumberLimit(self):
- number_limit = 90
+ number_limit = load_constraint('max_meta_count')
+ size_limit = load_constraint('max_meta_overall_size')
for i in (number_limit-10, number_limit-1, number_limit,
number_limit+1, number_limit+10, number_limit+100):
- size_limit = 4096
-
j = size_limit/(i * 2)
size = 0
@@ -1093,7 +1136,7 @@ class TestFile(Base):
self.assert_(file.read(hdrs={'Range': r}) == data[0:1000])
def testFileSizeLimit(self):
- limit = 5*2**30 + 2
+ limit = load_constraint('max_file_size')
tsecs = 3
for i in (limit-100, limit-10, limit-1, limit, limit+1, limit+10,
@@ -1147,7 +1190,8 @@ class TestFile(Base):
self.assert_status(200)
def testMetadataLengthLimits(self):
- key_limit, value_limit = 128, 256
+ key_limit = load_constraint('max_meta_name_length')
+ value_limit = load_constraint('max_meta_value_length')
lengths = [[key_limit, value_limit], [key_limit, value_limit+1], \
[key_limit+1, value_limit], [key_limit, 0], \
[key_limit, value_limit*10], [key_limit*10, value_limit]]
diff --git a/test/unit/common/test_constraints.py b/test/unit/common/test_constraints.py
index 478b2a8..4b0c997 100644
--- a/test/unit/common/test_constraints.py
+++ b/test/unit/common/test_constraints.py
@@ -84,8 +84,13 @@ class TestConstraints(unittest.TestCase):
x += 1
self.assertEquals(constraints.check_metadata(Request.blank('/',
headers=headers), 'object'), None)
- headers['X-Object-Meta-9999%s' %
- ('a' * (constraints.MAX_META_NAME_LENGTH - 4))] = \
+ # add two more headers in case adding just one falls exactly on the
+ # limit (eg one header adds 1024 and the limit is 2048)
+ headers['X-Object-Meta-%04d%s' %
+ (x, 'a' * (constraints.MAX_META_NAME_LENGTH - 4))] = \
+ 'v' * constraints.MAX_META_VALUE_LENGTH
+ headers['X-Object-Meta-%04d%s' %
+ (x + 1, 'a' * (constraints.MAX_META_NAME_LENGTH - 4))] = \
'v' * constraints.MAX_META_VALUE_LENGTH
self.assert_(isinstance(constraints.check_metadata(Request.blank('/',
headers=headers), 'object'), HTTPBadRequest))
diff --git a/test/unit/obj/test_server.py b/test/unit/obj/test_server.py
index 075700e..5160830 100644
--- a/test/unit/obj/test_server.py
+++ b/test/unit/obj/test_server.py
@@ -38,6 +38,7 @@ from swift.common import utils
from swift.common.utils import hash_path, mkdirs, normalize_timestamp, \
NullLogger, storage_directory
from swift.common.exceptions import DiskFileNotExist
+from swift.common import constraints
from swift.obj import replicator
from eventlet import tpool
@@ -1355,7 +1356,9 @@ class TestObjectController(unittest.TestCase):
def test_max_object_name_length(self):
timestamp = normalize_timestamp(time())
- req = Request.blank('/sda1/p/a/c/' + ('1' * 1024),
+ max_name_len = constraints.MAX_OBJECT_NAME_LENGTH
+ req = Request.blank('/sda1/p/a/c/' + ('1' * max_name_len),
+
environ={'REQUEST_METHOD': 'PUT'},
headers={'X-Timestamp': timestamp,
'Content-Length': '4',
@@ -1363,7 +1366,7 @@ class TestObjectController(unittest.TestCase):
req.body = 'DATA'
resp = self.object_controller.PUT(req)
self.assertEquals(resp.status_int, 201)
- req = Request.blank('/sda1/p/a/c/' + ('2' * 1025),
+ req = Request.blank('/sda1/p/a/c/' + ('2' * (max_name_len + 1)),
environ={'REQUEST_METHOD': 'PUT'},
headers={'X-Timestamp': timestamp,
'Content-Length': '4',
diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py
index 364370e..d28f604 100644
--- a/test/unit/proxy/test_server.py
+++ b/test/unit/proxy/test_server.py
@@ -45,7 +45,8 @@ from swift.container import server as container_server
from swift.obj import server as object_server
from swift.common import ring
from swift.common.constraints import MAX_META_NAME_LENGTH, \
- MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, MAX_FILE_SIZE
+ MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, \
+ MAX_FILE_SIZE, MAX_ACCOUNT_NAME_LENGTH, MAX_CONTAINER_NAME_LENGTH
from swift.common.utils import mkdirs, normalize_timestamp, NullLogger
from swift.common.wsgi import monkey_patch_mimetools
@@ -1168,6 +1169,7 @@ class TestObjectController(unittest.TestCase):
def test_POST_meta_val_len(self):
with save_globals():
+ limit = MAX_META_VALUE_LENGTH
self.app.object_post_as_copy = False
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
@@ -1175,42 +1177,44 @@ class TestObjectController(unittest.TestCase):
fake_http_connect(200, 200, 202, 202, 202)
# acct cont obj obj obj
req = Request.blank('/a/c/o', {}, headers={
- 'Content-Type': 'foo/bar',
- 'X-Object-Meta-Foo': 'x' * 256})
+ 'Content-Type': 'foo/bar',
+ 'X-Object-Meta-Foo': 'x' * limit})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 202)
proxy_server.http_connect = fake_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers={
- 'Content-Type': 'foo/bar',
- 'X-Object-Meta-Foo': 'x' * 257})
+ 'Content-Type': 'foo/bar',
+ 'X-Object-Meta-Foo': 'x' * (limit + 1)})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 400)
def test_POST_as_copy_meta_val_len(self):
with save_globals():
+ limit = MAX_META_VALUE_LENGTH
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
proxy_server.http_connect = \
fake_http_connect(200, 200, 200, 200, 200, 202, 202, 202)
# acct cont objc objc objc obj obj obj
req = Request.blank('/a/c/o', {}, headers={
- 'Content-Type': 'foo/bar',
- 'X-Object-Meta-Foo': 'x' * 256})
+ 'Content-Type': 'foo/bar',
+ 'X-Object-Meta-Foo': 'x' * limit})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 202)
proxy_server.http_connect = fake_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers={
- 'Content-Type': 'foo/bar',
- 'X-Object-Meta-Foo': 'x' * 257})
+ 'Content-Type': 'foo/bar',
+ 'X-Object-Meta-Foo': 'x' * (limit + 1)})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 400)
def test_POST_meta_key_len(self):
with save_globals():
+ limit = MAX_META_NAME_LENGTH
self.app.object_post_as_copy = False
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
@@ -1219,20 +1223,21 @@ class TestObjectController(unittest.TestCase):
# acct cont obj obj obj
req = Request.blank('/a/c/o', {}, headers={
'Content-Type': 'foo/bar',
- ('X-Object-Meta-' + 'x' * 128): 'x'})
+ ('X-Object-Meta-' + 'x' * limit): 'x'})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 202)
proxy_server.http_connect = fake_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers={
'Content-Type': 'foo/bar',
- ('X-Object-Meta-' + 'x' * 129): 'x'})
+ ('X-Object-Meta-' + 'x' * (limit + 1)): 'x'})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 400)
def test_POST_as_copy_meta_key_len(self):
with save_globals():
+ limit = MAX_META_NAME_LENGTH
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
proxy_server.http_connect = \
@@ -1240,24 +1245,25 @@ class TestObjectController(unittest.TestCase):
# acct cont objc objc objc obj obj obj
req = Request.blank('/a/c/o', {}, headers={
'Content-Type': 'foo/bar',
- ('X-Object-Meta-' + 'x' * 128): 'x'})
+ ('X-Object-Meta-' + 'x' * limit): 'x'})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 202)
proxy_server.http_connect = fake_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers={
'Content-Type': 'foo/bar',
- ('X-Object-Meta-' + 'x' * 129): 'x'})
+ ('X-Object-Meta-' + 'x' * (limit + 1)): 'x'})
self.app.update_request(req)
res = controller.POST(req)
self.assertEquals(res.status_int, 400)
def test_POST_meta_count(self):
with save_globals():
+ limit = MAX_META_COUNT
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
headers = dict(
- (('X-Object-Meta-' + str(i), 'a') for i in xrange(91)))
+ (('X-Object-Meta-' + str(i), 'a') for i in xrange(limit + 1)))
headers.update({'Content-Type': 'foo/bar'})
proxy_server.http_connect = fake_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers=headers)
@@ -1267,10 +1273,13 @@ class TestObjectController(unittest.TestCase):
def test_POST_meta_size(self):
with save_globals():
+ limit = MAX_META_OVERALL_SIZE
controller = proxy_server.ObjectController(self.app, 'account',
'container', 'object')
+ count = limit / 256 # enough to cause the limit to be reched
headers = dict(
- (('X-Object-Meta-' + str(i), 'a' * 256) for i in xrange(1000)))
+ (('X-Object-Meta-' + str(i), 'a' * 256)
+ for i in xrange(count + 1)))
headers.update({'Content-Type': 'foo/bar'})
proxy_server.http_connect = fake_http_connect(202, 202, 202)
req = Request.blank('/a/c/o', {}, headers=headers)
@@ -3206,13 +3215,14 @@ class TestContainerController(unittest.TestCase):
def test_PUT_max_container_name_length(self):
with save_globals():
+ limit = MAX_CONTAINER_NAME_LENGTH
controller = proxy_server.ContainerController(self.app, 'account',
- '1' * 256)
+ '1' * limit)
self.assert_status_map(controller.PUT,
(200, 200, 200, 201, 201, 201), 201,
missing_container=True)
controller = proxy_server.ContainerController(self.app, 'account',
- '2' * 257)
+ '2' * (limit + 1))
self.assert_status_map(controller.PUT, (201, 201, 201), 400,
missing_container=True)
@@ -3813,9 +3823,11 @@ class TestAccountController(unittest.TestCase):
def test_PUT_max_account_name_length(self):
with save_globals():
self.app.allow_account_management = True
- controller = proxy_server.AccountController(self.app, '1' * 256)
+ limit = MAX_ACCOUNT_NAME_LENGTH
+ controller = proxy_server.AccountController(self.app, '1' * limit)
self.assert_status_map(controller.PUT, (201, 201, 201), 201)
- controller = proxy_server.AccountController(self.app, '2' * 257)
+ controller = proxy_server.AccountController(
+ self.app, '2' * (limit + 1))
self.assert_status_map(controller.PUT, (201, 201, 201), 400)
def test_PUT_connect_exceptions(self):
--
1.7.7.6

View file

@ -1,406 +0,0 @@
diff -ru a/ufo/bin/gluster-swift-gen-builders b/ufo/bin/gluster-swift-gen-builders
--- a/ufo/bin/gluster-swift-gen-builders 2012-12-07 12:24:00.000000000 -0500
+++ b/ufo/bin/gluster-swift-gen-builders 2013-04-29 15:16:22.748000000 -0400
@@ -1,9 +1,25 @@
#!/bin/bash
+# Note that these port numbers must match the configured values for the
+# various servers in their configuration files.
+declare -A port=(["account.builder"]=6012 ["container.builder"]=6011 \
+ ["object.builder"]=6010)
+
+builder_files="account.builder container.builder object.builder"
+
function create {
- swift-ring-builder $1 create 0 1 1
- swift-ring-builder $1 add z1-127.0.0.1:$2/$3_ 100.0
+ swift-ring-builder $1 create 1 1 1 >> /tmp/out
+}
+
+function add {
+ swift-ring-builder $1 add z$2-127.0.0.1:$3/$4_ 100.0
+}
+
+function rebalance {
swift-ring-builder $1 rebalance
+}
+
+function build {
swift-ring-builder $1
}
@@ -12,8 +28,17 @@
exit 1
fi
-# Note that these port numbers must match the configured values for the
-# various servers in their configuration files.
-create account.builder 6012 $1
-create container.builder 6011 $1
-create object.builder 6010 $1
+for builder_file in $builder_files
+do
+ create $builder_file
+
+ zone=1
+ for volname in $@
+ do
+ add $builder_file $zone ${port[$builder_file]} $volname
+ zone=$(expr $zone + 1)
+ done
+
+ rebalance $builder_file
+ build $builder_file
+done
diff -ru a/ufo/etc/fs.conf-gluster b/ufo/etc/fs.conf-gluster
--- a/ufo/etc/fs.conf-gluster 2012-12-07 12:24:00.000000000 -0500
+++ b/ufo/etc/fs.conf-gluster 2013-04-29 15:16:22.752000000 -0400
@@ -3,10 +3,6 @@
# local host.
mount_ip = localhost
-# The GlusterFS server need not be local, a remote server can also be used
-# by setting "remote_cluster = yes".
-remote_cluster = no
-
# By default it is assumed the Gluster volumes can be accessed using other
# methods besides UFO (not object only), which disables a caching
# optimizations in order to keep in sync with file system changes.
diff -ru a/ufo/gluster/swift/common/constraints.py b/ufo/gluster/swift/common/constraints.py
--- a/ufo/gluster/swift/common/constraints.py 2012-12-07 12:24:00.000000000 -0500
+++ b/ufo/gluster/swift/common/constraints.py 2013-04-29 15:16:22.749000000 -0400
@@ -16,7 +16,8 @@
from webob.exc import HTTPBadRequest
import swift.common.constraints
-from gluster.swift.common import Glusterfs
+import swift.common.ring as _ring
+from gluster.swift.common import Glusterfs, ring
MAX_OBJECT_NAME_COMPONENT_LENGTH = swift.common.constraints.constraints_conf_int(
@@ -80,3 +81,9 @@
# Replace the original check mount with ours
swift.common.constraints.check_mount = gluster_check_mount
+
+# Save the original Ring class
+__Ring = _ring.Ring
+
+# Replace the original Ring class
+_ring.Ring = ring.Ring
diff -ru a/ufo/gluster/swift/common/Glusterfs.py b/ufo/gluster/swift/common/Glusterfs.py
--- a/ufo/gluster/swift/common/Glusterfs.py 2012-12-07 12:24:00.000000000 -0500
+++ b/ufo/gluster/swift/common/Glusterfs.py 2013-04-29 15:16:22.753000000 -0400
@@ -12,33 +12,35 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+
import logging
import os, fcntl, time
-from ConfigParser import ConfigParser
-from swift.common.utils import TRUE_VALUES
+from ConfigParser import ConfigParser, NoSectionError, NoOptionError
+from swift.common.utils import TRUE_VALUES, search_tree
from gluster.swift.common.fs_utils import mkdirs
-
#
# Read the fs.conf file once at startup (module load)
#
_fs_conf = ConfigParser()
MOUNT_IP = 'localhost'
-REMOTE_CLUSTER = False
OBJECT_ONLY = False
+RUN_DIR='/var/run/swift'
+SWIFT_DIR = '/etc/swift'
if _fs_conf.read(os.path.join('/etc/swift', 'fs.conf')):
try:
MOUNT_IP = _fs_conf.get('DEFAULT', 'mount_ip', 'localhost')
except (NoSectionError, NoOptionError):
pass
try:
- REMOTE_CLUSTER = _fs_conf.get('DEFAULT', 'remote_cluster', False) in TRUE_VALUES
+ OBJECT_ONLY = _fs_conf.get('DEFAULT', 'object_only', "no") in TRUE_VALUES
except (NoSectionError, NoOptionError):
pass
try:
- OBJECT_ONLY = _fs_conf.get('DEFAULT', 'object_only', "no") in TRUE_VALUES
+ RUN_DIR = _fs_conf.get('DEFAULT', 'run_dir', '/var/run/swift')
except (NoSectionError, NoOptionError):
pass
+
NAME = 'glusterfs'
@@ -60,7 +62,7 @@
if drive == export:
break
else:
- logging.error('No export found in %r matching drive %s', el, drive)
+ logging.error('No export found in %r matching drive, %s', el, drive)
return False
# NOTE: root is typically the default value of /mnt/gluster-object
@@ -68,13 +70,12 @@
if not os.path.isdir(full_mount_path):
mkdirs(full_mount_path)
- pid_dir = "/var/lib/glusterd/vols/%s/run/" % drive
- pid_file = os.path.join(pid_dir, 'swift.pid');
+ lck_file = os.path.join(RUN_DIR, '%s.lock' %drive);
- if not os.path.exists(pid_dir):
- mkdirs(pid_dir)
+ if not os.path.exists(RUN_DIR):
+ mkdirs(RUN_DIR)
- fd = os.open(pid_file, os.O_CREAT|os.O_RDWR)
+ fd = os.open(lck_file, os.O_CREAT|os.O_RDWR)
with os.fdopen(fd, 'r+b') as f:
try:
fcntl.lockf(f, fcntl.LOCK_EX|fcntl.LOCK_NB)
@@ -100,19 +101,12 @@
logging.error('Unable to unmount %s %s' % (full_mount_path, NAME))
def _get_export_list():
- if REMOTE_CLUSTER:
- cmnd = 'gluster --remote-host=%s volume info' % MOUNT_IP
- else:
- cmnd = 'gluster volume info'
+ cmnd = 'gluster --remote-host=%s volume info' % MOUNT_IP
export_list = []
if os.system(cmnd + ' >> /dev/null'):
- if REMOTE_CLUSTER:
- logging.error('Getting volume info failed for %s, make sure '\
- 'gluster --remote-host=%s works', NAME, MOUNT_IP)
- else:
- logging.error('Getting volume info failed for %s', NAME)
+ logging.error('Getting volume info failed for %s', NAME)
else:
fp = os.popen(cmnd)
while True:
@@ -124,3 +118,20 @@
export_list.append(item.split(':')[1].strip(' '))
return export_list
+
+def get_mnt_point(vol_name, conf_dir=SWIFT_DIR, conf_file="object-server*"):
+ """Read the object-server's configuration file and return
+ the device value"""
+
+ mnt_dir = ''
+ conf_files = search_tree(conf_dir, conf_file, '.conf')
+ if not conf_files:
+ raise Exception("Config file not found")
+
+ _conf = ConfigParser()
+ if _conf.read(conf_files[0]):
+ try:
+ mnt_dir = _conf.get('DEFAULT', 'devices', '')
+ except (NoSectionError, NoOptionError):
+ raise
+ return os.path.join(mnt_dir, vol_name)
diff -ru a/ufo/gluster/swift/common/ring.py b/ufo/gluster/swift/common/ring.py
--- a/ufo/gluster/swift/common/ring.py 2013-04-30 08:21:55.948000000 -0400
+++ b/ufo/gluster/swift/common/ring.py 2013-04-29 15:16:22.755000000 -0400
@@ -0,0 +1,111 @@
+# 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.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ConfigParser import ConfigParser
+from swift.common.ring import ring
+from swift.common.utils import search_tree
+from gluster.swift.common.Glusterfs import SWIFT_DIR
+
+reseller_prefix = "AUTH_"
+conf_files = search_tree(SWIFT_DIR, "proxy-server*", 'conf')
+if conf_files:
+ conf_file = conf_files[0]
+
+_conf = ConfigParser()
+if conf_files and _conf.read(conf_file):
+ if _conf.defaults().get("reseller_prefix", None):
+ reseller_prefix = _conf.defaults().get("reseller_prefix")
+ else:
+ for key, value in _conf._sections.items():
+ if value.get("reseller_prefix", None):
+ reseller_prefix = value["reseller_prefix"]
+ break
+
+if not reseller_prefix.endswith('_'):
+ reseller_prefix = reseller_prefix + '_'
+
+class Ring(ring.Ring):
+ def _get_part_nodes(self, part):
+ seen_ids = set()
+ nodes = [dev for dev in self._devs \
+ if dev['device'] == self.acc_name \
+ and not (dev['id'] in seen_ids \
+ or seen_ids.add(dev['id']))]
+ if not nodes:
+ nodes = [self.false_node]
+ return nodes
+
+ def get_part_nodes(self, part):
+ """
+ Get the nodes that are responsible for the partition. If one
+ node is responsible for more than one replica of the same
+ partition, it will only appear in the output once.
+
+ :param part: partition to get nodes for
+ :returns: list of node dicts
+
+ See :func:`get_nodes` for a description of the node dicts.
+ """
+ return self._get_part_nodes(part)
+
+ def get_nodes(self, account, container=None, obj=None):
+ """
+ Get the partition and nodes for an account/container/object.
+ If a node is responsible for more than one replica, it will
+ only appear in the output once.
+ :param account: account name
+ :param container: container name
+ :param obj: object name
+ :returns: a tuple of (partition, list of node dicts)
+
+ Each node dict will have at least the following keys:
+ ====== ===============================================================
+ id unique integer identifier amongst devices
+ weight a float of the relative weight of this device as compared to
+ others; this indicates how many partitions the builder will try
+ to assign to this device
+ zone integer indicating which zone the device is in; a given
+ partition will not be assigned to multiple devices within the
+ same zone
+ ip the ip address of the device
+ port the tcp port of the device
+ device the device's name on disk (sdb1, for example)
+ meta general use 'extra' field; for example: the online date, the
+ hardware description
+ ====== ===============================================================
+ """
+ self.false_node = {'zone': 1, 'weight': 100.0, 'ip': '127.0.0.1', 'id': 0, \
+ 'meta': '', 'device': 'volume_not_in_ring', \
+ 'port': 6012}
+ if account.startswith(reseller_prefix):
+ self.acc_name = account.replace(reseller_prefix, '', 1)
+ else:
+ self.acc_name = account
+
+ part = 0
+ return part, self._get_part_nodes(part)
+
+
+ def get_more_nodes(self, part):
+ """
+ Generator to get extra nodes for a partition for hinted handoff.
+
+ :param part: partition to get handoff nodes for
+ :returns: generator of node dicts
+
+ See :func:`get_nodes` for a description of the node dicts.
+ Should never be called in the swift UFO environment, so yield nothing
+ """
+ yield self.false_node
diff -ru a/ufo/test/unit/common/test_ring.py b/ufo/test/unit/common/test_ring.py
--- a/ufo/test/unit/common/test_ring.py 2013-04-30 08:22:08.975000000 -0400
+++ b/ufo/test/unit/common/test_ring.py 2013-04-29 15:16:22.756000000 -0400
@@ -0,0 +1,81 @@
+# 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.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import unittest
+import gluster.swift.common.constraints
+from gluster.swift.common.ring import *
+from gluster.swift.common.Glusterfs import SWIFT_DIR
+
+def _mock_ring_data():
+ return [{'zone': 1, 'weight': 100.0, 'ip': '127.0.0.1', 'port': 6012, \
+ 'meta': '', 'device': 'test', 'id': 0},
+ {'zone': 2, 'weight': 100.0, 'ip': '127.0.0.1', 'id': 1, \
+ 'meta': '', 'device': 'iops', 'port': 6012}]
+
+class TestRing(unittest.TestCase):
+ """ Tests for common.utils """
+
+ def setUp(self):
+ self.ring = Ring(SWIFT_DIR, ring_name='object')
+
+ def test_first_device(self):
+ try:
+ __devs = self.ring._devs
+ self.ring._devs = _mock_ring_data()
+
+ part, node = self.ring.get_nodes('test')
+ assert node[0]['device'] == 'test'
+ node = self.ring.get_part_nodes(0)
+ assert node[0]['device'] == 'test'
+ for node in self.ring.get_more_nodes(0):
+ assert node['device'] == 'volume_not_in_ring'
+ finally:
+ self.ring._devs = __devs
+
+ def test_invalid_device(self):
+ try:
+ __devs = self.ring._devs
+ self.ring._devs = _mock_ring_data()
+
+ part, node = self.ring.get_nodes('test2')
+ assert node[0]['device'] == 'volume_not_in_ring'
+ node = self.ring.get_part_nodes(0)
+ assert node[0]['device'] == 'volume_not_in_ring'
+ finally:
+ self.ring._devs = __devs
+
+ def test_second_device(self):
+ try:
+ __devs = self.ring._devs
+ self.ring._devs = _mock_ring_data()
+
+ part, node = self.ring.get_nodes('iops')
+ assert node[0]['device'] == 'iops'
+ node = self.ring.get_part_nodes(0)
+ assert node[0]['device'] == 'iops'
+ for node in self.ring.get_more_nodes(0):
+ assert node['device'] == 'volume_not_in_ring'
+ finally:
+ self.ring._devs = __devs
+
+ def test_second_device_with_reseller_prefix(self):
+ try:
+ __devs = self.ring._devs
+ self.ring._devs = _mock_ring_data()
+
+ part, node = self.ring.get_nodes('AUTH_iops')
+ assert node[0]['device'] == 'iops'
+ finally:
+ self.ring._devs = __devs

View file

@ -1,12 +0,0 @@
--- ufo/gluster/swift/common/DiskFile.py.orig 2012-12-21 11:40:12.763297073 -0500
+++ ufo/gluster/swift/common/DiskFile.py 2013-01-09 16:44:02.607838685 -0500
@@ -55,7 +55,8 @@
def __init__(self, path, device, partition, account, container, obj,
logger, keep_data_fp=False, disk_chunk_size=65536,
- uid=DEFAULT_UID, gid=DEFAULT_GID):
+ uid=DEFAULT_UID, gid=DEFAULT_GID, iter_hook=None):
+ self.iter_hook = iter_hook
self.disk_chunk_size = disk_chunk_size
#Don't support obj_name ending/begining with '/', like /a, a/, /a/b/ etc
obj = obj.strip('/')

View file

@ -1,24 +0,0 @@
--- libglusterfs/src/Makefile.am.orig 2013-07-12 13:50:20.000000000 -0400
+++ libglusterfs/src/Makefile.am 2013-07-12 20:10:12.156000000 -0400
@@ -48,7 +48,8 @@
$(LEX) -t $(srcdir)/graph.l > $@
y.tab.h: graph.y
- $(YACC) -d $(srcdir)/graph.y
+ $(YACC) -d -b foo $(srcdir)/graph.y
+ mv foo.tab.h y.tab.h && mv foo.tab.c y.tab.c
CLEANFILES = graph.lex.c y.tab.c y.tab.h
CONFIG_CLEAN_FILES = $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
--- libglusterfs/src/Makefile.in.orig 2013-07-12 20:10:12.157000000 -0400
+++ libglusterfs/src/Makefile.in 2013-07-12 20:12:43.022000000 -0400
@@ -1101,7 +1101,8 @@
$(LEX) -t $(srcdir)/graph.l > $@
y.tab.h: graph.y
- $(YACC) -d $(srcdir)/graph.y
+ $(YACC) -d -b foo $(srcdir)/graph.y
+ mv foo.tab.h y.tab.h && mv foo.tab.c y.tab.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View file

@ -1,9 +0,0 @@
--- a/tools/pip-requires 2013-04-05 10:55:21.988000000 -0400
+++ b/tools/pip-requires 2013-04-05 10:55:28.649000000 -0400
@@ -3,5 +3,5 @@
netifaces>=0.5
pastedeploy>=1.3.3
simplejson>=2.0.9
-xattr>=0.4
+pyxattr>=0.4
python-swiftclient

View file

@ -1,6 +0,0 @@
/var/log/glusterfs/glusterfs.log {
missingok
postrotate
/usr/bin/killall -HUP gluster 2>/dev/null || true
endscript
}

View file

@ -1,6 +0,0 @@
/var/log/glusterfs/glusterfs.log {
missingok
postrotate
/usr/bin/killall -HUP glusterfs 2>/dev/null || true
endscript
}

File diff suppressed because it is too large Load diff

View file

@ -1,6 +0,0 @@
/var/log/glusterfs/*glusterfsd.log /var/log/glusterfs/bricks/*.log {
missingok
postrotate
/bin/kill -HUP `cat /var/run/glusterfsd.pid 2>/dev/null` 2>/dev/null || true
endscript
}

View file

@ -1,12 +1,16 @@
[Unit]
Description=GlusterFS an clustered file-system server
Description=GlusterFS brick processes (stopping only)
After=network.target glusterd.service
[Service]
Type=forking
PIDFile=/run/glusterfsd.pid
LimitNOFILE=65536
ExecStart=/usr/sbin/glusterfsd -p /run/glusterfsd.pid
Type=oneshot
# glusterd starts the glusterfsd processed on-demand
# /bin/true will mark this service as started, RemainAfterExit keeps it active
ExecStart=/bin/true
RemainAfterExit=yes
# if there are no glusterfsd processes, a stop/reload should not give an error
ExecStop=/bin/sh -c "/bin/killall --wait glusterfsd || /bin/true"
ExecReload=/bin/sh -c "/bin/killall -HUP glusterfsd || /bin/true"
[Install]
WantedBy=multi-user.target

View file

@ -1,17 +0,0 @@
[DEFAULT]
[object-expirer]
# auto_create_account_prefix = .
[pipeline:main]
pipeline = catch_errors cache proxy-server
[app:proxy-server]
use = egg:swift#proxy
[filter:cache]
use = egg:swift#memcache
memcache_servers = 127.0.0.1:11211
[filter:catch_errors]
use = egg:swift#catch_errors

View file

@ -1,16 +0,0 @@
[DEFAULT]
bind_ip = 127.0.0.1
bind_port = 6010
workers = 3
[pipeline:main]
pipeline = object-server
[app:object-server]
use = egg:swift#object
[object-replicator]
[object-updater]
[object-auditor]

View file

@ -1,14 +0,0 @@
--- swift-1.4.4/doc/source/conf.py.orig 2011-11-24 08:59:50.000000000 -0500
+++ swift-1.4.4/doc/source/conf.py 2012-01-04 22:35:55.571492761 -0500
@@ -31,7 +31,10 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.append([os.path.abspath('../swift'), os.path.abspath('..'), os.path.abspath('../bin')])
+sys.path = [os.path.abspath('../../swift'),
+ os.path.abspath('../..'),
+ os.path.abspath('../../bin')
+ ] + sys.path
# -- General configuration -----------------------------------------------------

View file

@ -1,36 +0,0 @@
diff -ru swift-1.4.4-ORIG/swift/__init__.py swift-1.4.4/swift/__init__.py
--- swift-1.4.4-ORIG/swift/__init__.py 2011-11-24 14:59:50.000000000 +0100
+++ swift-1.4.4/swift/__init__.py 2012-01-04 00:09:10.122030579 +0100
@@ -1,3 +1,32 @@
+import sys
+import pkg_resources
+
+# If there is a conflicting non egg module,
+# i.e. an older standard system module installed,
+# then replace it with this requirement
+def replace_dist(requirement):
+ try:
+ return pkg_resources.require(requirement)
+ except pkg_resources.VersionConflict:
+ e = sys.exc_info()[1]
+ dist=e.args[0]
+ req=e.args[1]
+ if dist.key == req.key and not dist.location.endswith('.egg'):
+ del pkg_resources.working_set.by_key[dist.key]
+ # We assume there is no need to adjust sys.path
+ # and the associated pkg_resources.working_set.entries
+ return pkg_resources.require(requirement)
+
+replace_dist("WebOb >= 1.0")
+
+replace_dist("PasteDeploy >= 1.5.0")
+# This hack is needed because replace_dist() results in
+# the standard paste module path being at the start of __path__.
+# TODO: See can we get pkg_resources to do the right thing directly
+import paste
+paste.__path__.insert(0, paste.__path__.pop(-1))
+
+
import gettext

View file

@ -1,11 +0,0 @@
--- swift-1.4.4/doc/source/conf.py.orig 2012-01-04 22:40:43.190300958 -0500
+++ swift-1.4.4/doc/source/conf.py 2012-01-04 22:41:26.980492712 -0500
@@ -40,7 +40,7 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig']
todo_include_todos = True
# Add any paths that contain templates here, relative to this directory.

View file

@ -1,39 +0,0 @@
[DEFAULT]
bind_port = 8080
workers = 8
user = swift
[pipeline:main]
pipeline = healthcheck cache authtoken keystone proxy-server
[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true
[filter:cache]
use = egg:swift#memcache
memcache_servers = 127.0.0.1:11211
[filter:catch_errors]
use = egg:swift#catch_errors
[filter:healthcheck]
use = egg:swift#healthcheck
[filter:keystone]
paste.filter_factory = keystone.middleware.swift_auth:filter_factory
operator_roles = admin, SwiftOperator
is_admin = true
cache = swift.cache
[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
admin_tenant_name = %SERVICE_TENANT_NAME%
admin_user = %SERVICE_USER%
admin_password = %SERVICE_PASSWORD%
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
signing_dir = /tmp/keystone-signing-swift

View file

@ -1,7 +0,0 @@
#!/bin/sh
#
# fusermount-glusterfs requires the /dev/fuse character device. The fuse module
# provides this and is loaded on demand in newer Linux distributions.
#
[ -c /dev/fuse ] || /sbin/modprobe fuse

View file

@ -1 +1 @@
dce3d066b7351b360454ea9ca4cabe4c glusterfs-3.4.1.tar.gz
SHA512 (glusterfs-11.2.tar.gz) = 6ac463047c5b1fee1d00ca9d6c16169762ed31c7d3b8dfb341bb8a90b83c15fdd9d48ebbe6cf79eee885f764cfa5391f4107837764c0a182eff1b51bede63d48

View file

@ -1,2 +0,0 @@
[swift-hash]
swift_hash_path_suffix = %SWIFT_HASH_PATH_SUFFIX%