Introduce sheepdog.timer; disable on aarch64 for EPEL7
This commit is contained in:
parent
6d9518f7bb
commit
477a0cb2c2
|
@ -6,10 +6,13 @@ Requires=corosync.service
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=/etc/sysconfig/sheepdog
|
EnvironmentFile=/etc/sysconfig/sheepdog
|
||||||
ExecStart=/usr/sbin/sheep -f --log level=${SHEEPDOG_LOGLEVEL},dst=${SHEEPDOG_LOGDEST},format=${SHEEPDOG_LOGFMT} $SHEEPDOG_EXTRA_OPTS ${SHEEPDOG_PATH}
|
ExecStart=/usr/sbin/sheep -f --log level=${SHEEPDOG_LOGLEVEL},dst=${SHEEPDOG_LOGDEST},format=${SHEEPDOG_LOGFMT} $SHEEPDOG_EXTRA_OPTS ${SHEEPDOG_PATH}
|
||||||
#Restart=on-failure
|
Restart=on-failure
|
||||||
#StartLimitInterval=10s
|
RestartSec=2s
|
||||||
#StartLimitBurst=3
|
|
||||||
LimitNOFILE=32768
|
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
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
Name: sheepdog
|
Name: sheepdog
|
||||||
Summary: The Sheepdog distributed storage system for KVM/QEMU
|
Summary: The Sheepdog distributed storage system for KVM/QEMU
|
||||||
Version: 1.0.1
|
Version: 1.0.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2 and GPLv2+
|
License: GPLv2 and GPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://sheepdog.github.io/sheepdog
|
URL: http://sheepdog.github.io/sheepdog
|
||||||
Source0: https://github.com/sheepdog/sheepdog/archive/v1.0.1.tar.gz
|
Source0: https://github.com/sheepdog/sheepdog/archive/v1.0.1.tar.gz
|
||||||
Source1: sheepdog.service
|
Source1: sheepdog.service
|
||||||
Source2: sheepdog
|
Source2: sheepdog.timer
|
||||||
|
Source3: sheepdog
|
||||||
|
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
|
|
||||||
|
@ -23,8 +24,9 @@ BuildRequires: fuse-devel
|
||||||
BuildRequires: yasm
|
BuildRequires: yasm
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# corosync not available on ppc/ppc64/ppc64le
|
# corosync not available on these architectures
|
||||||
%if 0%{?rhel} >= 6
|
%if 0%{?rhel} >= 6
|
||||||
|
Excludearch: aarch64
|
||||||
Excludearch: ppc
|
Excludearch: ppc
|
||||||
Excludearch: ppc64
|
Excludearch: ppc64
|
||||||
Excludearch: ppc64le
|
Excludearch: ppc64le
|
||||||
|
@ -74,21 +76,22 @@ rm -f %{buildroot}/%{_libdir}/libsheepdog.a
|
||||||
|
|
||||||
mkdir -p %{buildroot}/%{_unitdir}
|
mkdir -p %{buildroot}/%{_unitdir}
|
||||||
cp -a %{SOURCE1} %{buildroot}/%{_unitdir}/
|
cp -a %{SOURCE1} %{buildroot}/%{_unitdir}/
|
||||||
|
cp -a %{SOURCE2} %{buildroot}/%{_unitdir}/
|
||||||
|
|
||||||
mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
|
mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
|
||||||
cp -a %{SOURCE2} %{buildroot}/%{_sysconfdir}/sysconfig
|
cp -a %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post sheepdog.service
|
%systemd_post sheepdog.timer
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%systemd_preun sheepdog.service
|
%systemd_preun sheepdog.timer
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%systemd_postun_with_restart sheepdog.service
|
%systemd_postun_with_restart sheepdog.timer
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
@ -100,6 +103,7 @@ rm -rf %{buildroot}
|
||||||
%{_sysconfdir}/bash_completion.d/dog
|
%{_sysconfdir}/bash_completion.d/dog
|
||||||
|
|
||||||
%{_unitdir}/sheepdog.service
|
%{_unitdir}/sheepdog.service
|
||||||
|
%{_unitdir}/sheepdog.timer
|
||||||
%config %{_sysconfdir}/sysconfig/sheepdog
|
%config %{_sysconfdir}/sysconfig/sheepdog
|
||||||
|
|
||||||
%dir %{_localstatedir}/lib/sheepdog
|
%dir %{_localstatedir}/lib/sheepdog
|
||||||
|
@ -119,6 +123,10 @@ rm -rf %{buildroot}
|
||||||
%{_libdir}/libsheepdog.so
|
%{_libdir}/libsheepdog.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
* Mon Jan 09 2017 Paolo Bonzini <pbonzini@redhat.com> - 1.0.1-1
|
||||||
- Update to 1.0.1 (Resolves: #1396430)
|
- Update to 1.0.1 (Resolves: #1396430)
|
||||||
- /usr/bin/collie is now /usr/bin/dog
|
- /usr/bin/collie is now /usr/bin/dog
|
||||||
|
|
|
@ -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