Compare commits

...

24 Commits
el6 ... master

Author SHA1 Message Date
Fedora Release Engineering ff97127b3b - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 06:03:55 +00:00
Jason Tibbitts 8709770d67 Remove needless use of %defattr 2018-07-10 01:21:10 -05:00
Kevin Fenzi 59fc384829 Rebuild for new corosync. Fixes bug #1559672 2018-03-22 19:26:56 -07:00
Igor Gnatenko daef6866c4
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:39:26 +01:00
Fedora Release Engineering f289212fcf - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 16:38:20 +00:00
Fedora Release Engineering 1dec9c067b - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 08:24:30 +00:00
Fedora Release Engineering 84c60db8e6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 18:32:21 +00:00
Fedora Release Engineering 3c722264d4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 13:23:18 +00:00
Paolo Bonzini 477a0cb2c2 Introduce sheepdog.timer; disable on aarch64 for EPEL7 2017-01-09 12:10:07 +01:00
Paolo Bonzini 6d9518f7bb Update to 1.0.1 (Resolves: #1396430)
/usr/bin/collie is now /usr/bin/dog
Added /usr/sbin/sheepfs and /usr/sbin/shepherd
Revamped systemd spec file, added /etc/sysconfig/sheepdog
2017-01-09 11:00:14 +01:00
Paolo Bonzini c210216b0b sheepdog broken out of the box
Coroutine stack size of 1M is not enough for the corosync backend,
and placing objects in /tmp is a vulnerability.  While at it, do
not double-fork the daemon.
2016-11-18 10:29:19 +01:00
Fedora Release Engineering f25932db85 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 23:56:43 +00:00
Dennis Gilmore ea9571d957 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-19 00:46:07 +00:00
Kevin Fenzi 92cfb1989e Rebuild for rpm bug 1131960 2014-08-21 11:50:12 -06:00
Peter Robinson d4f5518ee1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-18 02:12:20 +00:00
Dennis Gilmore b8d9cf8e79 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-08 01:16:18 -05:00
Ville Skyttä f8f77f882c Drop empty %postun script.
- Drop INSTALL from docs.
- Fix bogus date in %changelog.
2013-12-21 23:45:52 +02:00
Dennis Gilmore c40a736674 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-04 09:20:56 -05:00
Dennis Gilmore 07a2e86990 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-14 17:52:20 -06:00
Dennis Gilmore 326546d34a - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-21 14:31:58 -05:00
Fabio M. Di Nitto 8869f4dc4f rebuild for corosync soname change and apply patch to port to new
headers

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-03-16 11:21:58 +01:00
David Nalley b38cd21978 updating to 0.3.0 2012-01-12 00:34:06 -05:00
David Nalley 5a457ec897 updating to 0.2.4 2011-11-24 20:14:15 -05:00
David Nalley 3adc82b045 Initial import 2011-05-24 11:38:41 -04:00
8 changed files with 330 additions and 0 deletions

5
.gitignore vendored
View File

@ -0,0 +1,5 @@
*.rpm
/sheepdog-0.2.3.tar.gz
/sheepdog-0.2.4.tar.gz
/collie-sheepdog-v0.3.0-0-gbb41896.tar.gz
/v1.0.1.tar.gz

View File

@ -0,0 +1,15 @@
cpg_dispatch requires 0x101568 bytes of stack.
diff --git a/lib/coroutine.c b/lib/coroutine.c
index 5b2ed79..1e1060c 100644
--- a/lib/coroutine.c
+++ b/lib/coroutine.c
@@ -52,7 +52,7 @@ enum co_action {
#define POOL_MAX_SIZE 64
#endif
-#define STACK_MAX_SIZE (1 << 20) /* 1 MB */
+#define STACK_MAX_SIZE (2 << 20) /* 1 MB */
struct coroutine {
coroutine_entry_func_t *entry;

11
sheepdog Normal file
View File

@ -0,0 +1,11 @@
# use stdout for journal; other possibilities include "default" and "syslog"
SHEEPDOG_LOGDEST=stdout
SHEEPDOG_LOGLEVEL=info
SHEEPDOG_LOGFMT=default
SHEEPDOG_PORT=7000
# --no-sync, --directio, --gateway, --journal, --wq-threads, ...
SHEEPDOG_EXTRA_OPTS=
SHEEPDOG_PATH=/var/lib/sheepdog

18
sheepdog.service Normal file
View File

@ -0,0 +1,18 @@
[Unit]
Description=Sheepdog QEMU/KVM Block Storage
After=network.target
Requires=corosync.service
[Service]
EnvironmentFile=/etc/sysconfig/sheepdog
ExecStart=/usr/sbin/sheep -f --log level=${SHEEPDOG_LOGLEVEL},dst=${SHEEPDOG_LOGDEST},format=${SHEEPDOG_LOGFMT} $SHEEPDOG_EXTRA_OPTS ${SHEEPDOG_PATH}
Restart=on-failure
RestartSec=2s
LimitNOFILE=32768
# Use sheepdog.timer instead. Because corosync does not provide
# notification via sd_notify, we introduce an arbitrary delay between
# starting corosync.service and starting sheepdog.
#[Install]
#WantedBy=multi-user.target

207
sheepdog.spec Normal file
View File

@ -0,0 +1,207 @@
Name: sheepdog
Summary: The Sheepdog distributed storage system for KVM/QEMU
Version: 1.0.1
Release: 8%{?dist}
License: GPLv2 and GPLv2+
Group: System Environment/Base
URL: http://sheepdog.github.io/sheepdog
Source0: https://github.com/sheepdog/sheepdog/archive/v1.0.1.tar.gz
Source1: sheepdog.service
Source2: sheepdog.timer
Source3: sheepdog
%{?systemd_requires}
# Build bits
BuildRequires: autoconf automake libtool systemd
BuildRequires: corosync corosynclib corosynclib-devel
BuildRequires: userspace-rcu-devel
# For sheepfs
BuildRequires: fuse-devel
%ifarch x86_64
BuildRequires: yasm
%endif
# corosync not available on these architectures
%if 0%{?rhel} >= 6
Excludearch: aarch64
Excludearch: ppc
Excludearch: ppc64
Excludearch: ppc64le
%endif
%description
This package contains the Sheepdog server and the "dog" command line tool,
which offer a distributed object storage system for KVM.
%package devel
Summary: Header files for the Sheepdog distributed storage system
Group: Development/Libraries
License: GPLv2 and GPLv2+
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
This package contains the header files for libsheepdog.
%package libs
Summary: Libraries for the Sheepdog distributed storage system
Group: Applications/File
License: GPLv2 and GPLv2+
%description libs
This package contains the libsheepdog shared library.
%prep
%setup -q
%build
./autogen.sh
# TODO: add LTTng-ust support
%{configure} \
--without-initddir \
--without-systemdsystemunitdir \
--disable-static
make %{_smp_mflags} V=1
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
rm -f %{buildroot}/%{_libdir}/libsheepdog.la
rm -f %{buildroot}/%{_libdir}/libsheepdog.a
mkdir -p %{buildroot}/%{_unitdir}
cp -a %{SOURCE1} %{buildroot}/%{_unitdir}/
cp -a %{SOURCE2} %{buildroot}/%{_unitdir}/
mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
cp -a %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig
%post
%systemd_post sheepdog.timer
%preun
%systemd_preun sheepdog.timer
%postun
%systemd_postun_with_restart sheepdog.timer
%files
%doc COPYING README
%{_bindir}/dog
%{_sbindir}/sheep
%{_sbindir}/sheepfs
%{_sbindir}/shepherd
%{_sysconfdir}/bash_completion.d/dog
%{_unitdir}/sheepdog.service
%{_unitdir}/sheepdog.timer
%config %{_sysconfdir}/sysconfig/sheepdog
%dir %{_localstatedir}/lib/sheepdog
%{_mandir}/man8/sheep.8*
%{_mandir}/man8/dog.8*
%{_mandir}/man8/sheepfs.8*
%files devel
%dir %{_includedir}/sheepdog
%{_includedir}/sheepdog/internal.h
%{_includedir}/sheepdog/list.h
%{_includedir}/sheepdog/sheepdog.h
%{_includedir}/sheepdog/sheepdog_proto.h
%{_includedir}/sheepdog/util.h
%files libs
%{_libdir}/libsheepdog.so
%changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Mar 22 2018 Kevin Fenzi <kevin@scrye.com> - 1.0.1-7
- Rebuild for new corosync. Fixes bug #1559672
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Jan 09 2017 Paolo Bonzini <pbonzini@redhat.com> - 1.0.1-2
- Introduce sheepdog.timer
- For EPEL7, disable on aarch64
* Mon Jan 09 2017 Paolo Bonzini <pbonzini@redhat.com> - 1.0.1-1
- Update to 1.0.1 (Resolves: #1396430)
- /usr/bin/collie is now /usr/bin/dog
- Added /usr/sbin/sheepfs and /usr/sbin/shepherd
- Revamped systemd spec file, added /etc/sysconfig/sheepdog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Aug 21 2014 Kevin Fenzi <kevin@scrye.com> - 0.3.0-9
- Rebuild for rpm bug 1131960
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Dec 21 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.3.0-6
- Drop empty %%postun script.
- Drop INSTALL from docs.
- Fix bogus date in %%changelog.
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Mar 16 2012 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.3.0-2
- Rebuild against new corosync (soname change).
- Add patch to fix build against new corosync headers.
* Thu Jan 12 2012 David Nalley <david@gnsa.us> - 0.3.0-1
- updating to 0.3.0
* Thu Nov 24 2011 David Nalley <david@gnsa.us> - 0.2.4-2
- adding systemd support
* Thu Nov 24 2011 David Nalley <david@gnsa.us> - 0.2.4-1
- updating to 0.2.4
* Sat Jun 04 2011 David Nalley <david@gnsa.us> - 0.2.3-2
- excluding ppc and ppc64 arch for el6
* Sat May 21 2011 David Nalley <david@gnsa.us> - 0.2.3-1
- updating to 0.2.3 to track upstream.
* Fri May 20 2011 David Nalley <david@gnsa.us> - 0.2.2-2
- removed -n from setup
- hardcoded version number.
- changed lic from gpl to gplv2
- added INSTALL to doc
- added proper handling of initscripts
* Fri May 20 2011 Autotools generated version <nobody@nowhere.org> - 0.2.2-1
- Autotools generated version

12
sheepdog.timer Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Sheepdog QEMU/KVM Block Storage
After=network.target
Requires=corosync.service
[Timer]
OnActiveSec=2s
AccuracySec=100ms
Unit=sheepdog.service
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1 @@
SHA512 (v1.0.1.tar.gz) = fc8c90f9631a12032e380f7ad559e18859211df65c7b53a1cf4a64fcf5c85fb4e2f08a9fbb9330f0eb6e67e9848a885af10013bba5f8665f0e2864ea8770bcf8

View File

@ -0,0 +1,61 @@
diff -Naurd collie-sheepdog-bb41896.orig/sheep/cluster/corosync.c collie-sheepdog-bb41896/sheep/cluster/corosync.c
--- collie-sheepdog-bb41896.orig/sheep/cluster/corosync.c 2011-12-28 18:03:36.000000000 +0100
+++ collie-sheepdog-bb41896/sheep/cluster/corosync.c 2012-03-16 10:47:39.378340300 +0100
@@ -196,9 +196,9 @@
retry:
ret = cpg_mcast_joined(cpg_handle, CPG_TYPE_AGREED, iov, iov_cnt);
switch (ret) {
- case CPG_OK:
+ case CS_OK:
break;
- case CPG_ERR_TRY_AGAIN:
+ case CS_ERR_TRY_AGAIN:
dprintf("failed to send message: retrying\n");
sleep(1);
goto retry;
@@ -632,7 +632,7 @@
corosync_handlers = *handlers;
ret = cpg_initialize(&cpg_handle, &cb);
- if (ret != CPG_OK) {
+ if (ret != CS_OK) {
eprintf("failed to initialize cpg (%d) - is corosync running?\n", ret);
return -1;
}
@@ -659,7 +659,7 @@
this_node.pid = getpid();
ret = cpg_fd_get(cpg_handle, &fd);
- if (ret != CPG_OK) {
+ if (ret != CS_OK) {
eprintf("failed to get cpg file descriptor (%d)\n", ret);
return -1;
}
@@ -681,13 +681,13 @@
retry:
ret = cpg_join(cpg_handle, &cpg_group);
switch (ret) {
- case CPG_OK:
+ case CS_OK:
break;
- case CPG_ERR_TRY_AGAIN:
+ case CS_ERR_TRY_AGAIN:
dprintf("failed to join the sheepdog group: retrying\n");
sleep(1);
goto retry;
- case CPG_ERR_SECURITY:
+ case CS_ERR_SECURITY:
eprintf("permission denied to join the sheepdog group\n");
return -1;
default:
@@ -740,8 +740,8 @@
{
int ret;
- ret = cpg_dispatch(cpg_handle, CPG_DISPATCH_ALL);
- if (ret != CPG_OK)
+ ret = cpg_dispatch(cpg_handle, CS_DISPATCH_ALL);
+ if (ret != CS_OK)
return -1;
return 0;