Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ff97127b3b | ||
|
8709770d67 | ||
|
59fc384829 | ||
|
daef6866c4 | ||
|
f289212fcf | ||
|
1dec9c067b | ||
|
84c60db8e6 | ||
|
3c722264d4 | ||
|
477a0cb2c2 | ||
|
6d9518f7bb | ||
|
c210216b0b | ||
|
f25932db85 | ||
|
ea9571d957 | ||
|
92cfb1989e | ||
|
d4f5518ee1 | ||
|
b8d9cf8e79 | ||
|
f8f77f882c | ||
|
c40a736674 | ||
|
07a2e86990 | ||
|
326546d34a |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
|
*.rpm
|
||||||
/sheepdog-0.2.3.tar.gz
|
/sheepdog-0.2.3.tar.gz
|
||||||
/sheepdog-0.2.4.tar.gz
|
/sheepdog-0.2.4.tar.gz
|
||||||
/collie-sheepdog-v0.3.0-0-gbb41896.tar.gz
|
/collie-sheepdog-v0.3.0-0-gbb41896.tar.gz
|
||||||
|
/v1.0.1.tar.gz
|
||||||
|
15
coroutine-stack-size.patch
Normal file
15
coroutine-stack-size.patch
Normal 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
11
sheepdog
Normal 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
|
@ -1,10 +1,18 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Sheepdog QEMU/KVM Block Storage
|
Description=Sheepdog QEMU/KVM Block Storage
|
||||||
After=syslog.target
|
After=network.target
|
||||||
|
Requires=corosync.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/sbin/sheep
|
EnvironmentFile=/etc/sysconfig/sheepdog
|
||||||
Type=forking
|
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
|
||||||
|
|
||||||
[Install]
|
# Use sheepdog.timer instead. Because corosync does not provide
|
||||||
WantedBy=multi-user.target
|
# notification via sd_notify, we introduce an arbitrary delay between
|
||||||
|
# starting corosync.service and starting sheepdog.
|
||||||
|
|
||||||
|
#[Install]
|
||||||
|
#WantedBy=multi-user.target
|
||||||
|
196
sheepdog.spec
196
sheepdog.spec
@ -1,104 +1,186 @@
|
|||||||
Name: sheepdog
|
Name: sheepdog
|
||||||
Summary: The Sheepdog Distributed Storage System for KVM/QEMU
|
Summary: The Sheepdog distributed storage system for KVM/QEMU
|
||||||
Version: 0.3.0
|
Version: 1.0.1
|
||||||
Release: 2%{?dist}
|
Release: 8%{?dist}
|
||||||
License: GPLv2 and GPLv2+
|
License: GPLv2 and GPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://www.osrg.net/sheepdog
|
URL: http://sheepdog.github.io/sheepdog
|
||||||
Source0: collie-sheepdog-v0.3.0-0-gbb41896.tar.gz
|
Source0: https://github.com/sheepdog/sheepdog/archive/v1.0.1.tar.gz
|
||||||
#get source from github here https://github.com/collie/sheepdog/tarball/v0.3.0
|
|
||||||
Source1: sheepdog.service
|
Source1: sheepdog.service
|
||||||
Patch0: update_cpg_to_cs_defines.patch
|
Source2: sheepdog.timer
|
||||||
|
Source3: sheepdog
|
||||||
|
|
||||||
# Runtime bits
|
%{?systemd_requires}
|
||||||
Requires: corosync
|
|
||||||
Requires(post): chkconfig
|
|
||||||
Requires(preun): chkconfig
|
|
||||||
Requires(preun): initscripts
|
|
||||||
Requires(post): systemd-units
|
|
||||||
Requires(preun): systemd-units
|
|
||||||
Requires(postun): systemd-units
|
|
||||||
Requires(post): systemd-sysv
|
|
||||||
|
|
||||||
# Build bits
|
# Build bits
|
||||||
BuildRequires: autoconf automake systemd-units
|
BuildRequires: autoconf automake libtool systemd
|
||||||
BuildRequires: corosync corosynclib corosynclib-devel
|
BuildRequires: corosync corosynclib corosynclib-devel
|
||||||
|
BuildRequires: userspace-rcu-devel
|
||||||
|
|
||||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
# For sheepfs
|
||||||
|
BuildRequires: fuse-devel
|
||||||
|
|
||||||
%if 0%{?rhel} >= 6
|
%ifarch x86_64
|
||||||
Excludearch: ppc
|
BuildRequires: yasm
|
||||||
Excludearch: ppc64
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# corosync not available on these architectures
|
||||||
|
%if 0%{?rhel} >= 6
|
||||||
|
Excludearch: aarch64
|
||||||
|
Excludearch: ppc
|
||||||
|
Excludearch: ppc64
|
||||||
|
Excludearch: ppc64le
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package contains the Sheepdog server, and command line tool which offer
|
This package contains the Sheepdog server and the "dog" command line tool,
|
||||||
a distributed object storage system for KVM.
|
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
|
%prep
|
||||||
%setup -qn collie-sheepdog-bb41896
|
%setup -q
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
%{configure} --with-initddir=%{_initrddir}
|
|
||||||
|
|
||||||
make %{_smp_mflags}
|
# TODO: add LTTng-ust support
|
||||||
|
%{configure} \
|
||||||
|
--without-initddir \
|
||||||
|
--without-systemdsystemunitdir \
|
||||||
|
--disable-static
|
||||||
|
|
||||||
|
make %{_smp_mflags} V=1
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
make install DESTDIR=%{buildroot}
|
make install DESTDIR=%{buildroot}
|
||||||
|
rm -f %{buildroot}/%{_libdir}/libsheepdog.la
|
||||||
|
rm -f %{buildroot}/%{_libdir}/libsheepdog.a
|
||||||
|
|
||||||
mkdir -p %{buildroot}/%{_unitdir}
|
mkdir -p %{buildroot}/%{_unitdir}
|
||||||
cp -a %{SOURCE1} %{buildroot}/%{_unitdir}/
|
cp -a %{SOURCE1} %{buildroot}/%{_unitdir}/
|
||||||
## tree fixup
|
cp -a %{SOURCE2} %{buildroot}/%{_unitdir}/
|
||||||
# drop static libs
|
|
||||||
rm -f %{buildroot}%{_libdir}/*.a
|
mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
|
||||||
rm -f %{buildroot}%{_initddir}/sheepdog
|
cp -a %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ $1 -eq 1 ] ; then
|
%systemd_post sheepdog.timer
|
||||||
# Initial installation
|
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ] ; then
|
%systemd_preun sheepdog.timer
|
||||||
# Package removal, not upgrade
|
|
||||||
/bin/systemctl --no-reload disable sheepdog.service > /dev/null 2>&1 || :
|
|
||||||
/bin/systemctl stop sheepdog.service > /dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%triggerun -- sheepdog < 0.2.4-2
|
%systemd_postun_with_restart sheepdog.timer
|
||||||
/usr/bin/systemd-sysv-convert --save httpd >/dev/null 2>&1 ||:
|
|
||||||
/sbin/chkconfig --del httpd >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl try-restart sheepdog.service >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
if [ $1 -ge 1 ] ; then
|
|
||||||
# Package upgrade, not uninstall
|
|
||||||
/bin/systemctl try-restart sheepdog.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%doc COPYING README
|
||||||
%doc COPYING README INSTALL
|
%{_bindir}/dog
|
||||||
%{_sbindir}/sheep
|
%{_sbindir}/sheep
|
||||||
%{_sbindir}/collie
|
%{_sbindir}/sheepfs
|
||||||
#%attr(755,-,-)%config %{_initddir}/sheepdog
|
%{_sbindir}/shepherd
|
||||||
|
%{_sysconfdir}/bash_completion.d/dog
|
||||||
|
|
||||||
%{_unitdir}/sheepdog.service
|
%{_unitdir}/sheepdog.service
|
||||||
|
%{_unitdir}/sheepdog.timer
|
||||||
|
%config %{_sysconfdir}/sysconfig/sheepdog
|
||||||
|
|
||||||
%dir %{_localstatedir}/lib/sheepdog
|
%dir %{_localstatedir}/lib/sheepdog
|
||||||
%{_mandir}/man8/sheep.8*
|
%{_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
|
%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
|
* Fri Mar 16 2012 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.3.0-2
|
||||||
- Rebuild against new corosync (soname change).
|
- Rebuild against new corosync (soname change).
|
||||||
- Add patch to fix build against new corosync headers.
|
- Add patch to fix build against new corosync headers.
|
||||||
|
|
||||||
* Wed Jan 15 2012 David Nalley <david@gnsa.us> - 0.3.0-1
|
* Thu Jan 12 2012 David Nalley <david@gnsa.us> - 0.3.0-1
|
||||||
- updating to 0.3.0
|
- updating to 0.3.0
|
||||||
|
|
||||||
* Thu Nov 24 2011 David Nalley <david@gnsa.us> - 0.2.4-2
|
* Thu Nov 24 2011 David Nalley <david@gnsa.us> - 0.2.4-2
|
||||||
|
12
sheepdog.timer
Normal file
12
sheepdog.timer
Normal 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
|
Loading…
Reference in New Issue
Block a user