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]
|
||||
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
|
||||
#StartLimitInterval=10s
|
||||
#StartLimitBurst=3
|
||||
Restart=on-failure
|
||||
RestartSec=2s
|
||||
LimitNOFILE=32768
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
# 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
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
Name: sheepdog
|
||||
Summary: The Sheepdog distributed storage system for KVM/QEMU
|
||||
Version: 1.0.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?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
|
||||
Source2: sheepdog.timer
|
||||
Source3: sheepdog
|
||||
|
||||
%{?systemd_requires}
|
||||
|
||||
|
@ -23,8 +24,9 @@ BuildRequires: fuse-devel
|
|||
BuildRequires: yasm
|
||||
%endif
|
||||
|
||||
# corosync not available on ppc/ppc64/ppc64le
|
||||
# corosync not available on these architectures
|
||||
%if 0%{?rhel} >= 6
|
||||
Excludearch: aarch64
|
||||
Excludearch: ppc
|
||||
Excludearch: ppc64
|
||||
Excludearch: ppc64le
|
||||
|
@ -74,21 +76,22 @@ 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 %{SOURCE2} %{buildroot}/%{_sysconfdir}/sysconfig
|
||||
cp -a %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%post
|
||||
%systemd_post sheepdog.service
|
||||
%systemd_post sheepdog.timer
|
||||
|
||||
%preun
|
||||
%systemd_preun sheepdog.service
|
||||
%systemd_preun sheepdog.timer
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart sheepdog.service
|
||||
%systemd_postun_with_restart sheepdog.timer
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
|
@ -100,6 +103,7 @@ rm -rf %{buildroot}
|
|||
%{_sysconfdir}/bash_completion.d/dog
|
||||
|
||||
%{_unitdir}/sheepdog.service
|
||||
%{_unitdir}/sheepdog.timer
|
||||
%config %{_sysconfdir}/sysconfig/sheepdog
|
||||
|
||||
%dir %{_localstatedir}/lib/sheepdog
|
||||
|
@ -119,6 +123,10 @@ rm -rf %{buildroot}
|
|||
%{_libdir}/libsheepdog.so
|
||||
|
||||
%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
|
||||
- Update to 1.0.1 (Resolves: #1396430)
|
||||
- /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