systemd service [release 1.2.20-2mamba;Mon Apr 18 2016]

This commit is contained in:
Silvan Calarco 2024-01-06 01:22:14 +01:00
parent 6701e4bd9f
commit ae57ba9a5c
3 changed files with 46 additions and 29 deletions

View File

@ -1,15 +1,12 @@
# keepalived # keepalived
The main goal of the keepalived project is to add a strong end robust keepalive The main goal of the keepalived project is to add a strong end robust keepalive facility to the Linux Virtual Server project.
facility to the Linux Virtual Server project.
This project is written in C with multilayer TCP/IP stack checks. This project is written in C with multilayer TCP/IP stack checks.
Keepalived implements a framework based on three family checks: Keepalived implements a framework based on three family checks:
Layer3, Layer4 & Layer5. Layer3, Layer4 & Layer5.
This framework gives the daemon the ability of checking a LVS server pool states. This framework gives the daemon the ability of checking a LVS server pool states.
When one of the server of the LVS server pool is down, keepalived informs the linux When one of the server of the LVS server pool is down, keepalived informs the linux kernel via a setsockopt call to remove this server entrie from the LVS topology.
kernel via a setsockopt call to remove this server entrie from the LVS topology.
In addition keepalived implements a VRRPv2 stack to handle director failover. In addition keepalived implements a VRRPv2 stack to handle director failover.
So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks and LVS directors failover.
and LVS directors failover.

17
keepalived.service Normal file
View File

@ -0,0 +1,17 @@
[Unit]
Description=Keepalive Daemon (LVS and VRRP)
After=syslog.target network-online.target
Wants=network-online.target
# Only start if there is a configuration file
ConditionFileNotEmpty=/etc/keepalived/keepalived.conf
[Service]
Type=forking
KillMode=process
# Read configuration variable file if it is present
EnvironmentFile=-/etc/sysconfig/keepalived
ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@ -1,6 +1,6 @@
Name: keepalived Name: keepalived
Version: 1.2.20 Version: 1.2.20
Release: 1mamba Release: 2mamba
Summary: HA monitor built upon LVS, VRRP and services poller Summary: HA monitor built upon LVS, VRRP and services poller
Group: Applications/Networking Group: Applications/Networking
Vendor: openmamba Vendor: openmamba
@ -8,28 +8,27 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.keepalived.org/ URL: http://www.keepalived.org/
Source: http://www.keepalived.org/software/%{name}-%{version}.tar.gz Source: http://www.keepalived.org/software/%{name}-%{version}.tar.gz
Source1: keepalived.service
Patch: %{name}-1.1.10-manpath.patch Patch: %{name}-1.1.10-manpath.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libopenssl-devel >= 0.9.8h BuildRequires: iptables-devel
BuildRequires: libpopt-devel BuildRequires: libnl-devel
BuildRequires: libopenssl-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
The main goal of the keepalived project is to add a strong end robust keepalive The main goal of the keepalived project is to add a strong end robust keepalive facility to the Linux Virtual Server project.
facility to the Linux Virtual Server project.
This project is written in C with multilayer TCP/IP stack checks. This project is written in C with multilayer TCP/IP stack checks.
Keepalived implements a framework based on three family checks: Keepalived implements a framework based on three family checks:
Layer3, Layer4 & Layer5. Layer3, Layer4 & Layer5.
This framework gives the daemon the ability of checking a LVS server pool states. This framework gives the daemon the ability of checking a LVS server pool states.
When one of the server of the LVS server pool is down, keepalived informs the linux When one of the server of the LVS server pool is down, keepalived informs the linux kernel via a setsockopt call to remove this server entrie from the LVS topology.
kernel via a setsockopt call to remove this server entrie from the LVS topology.
In addition keepalived implements a VRRPv2 stack to handle director failover. In addition keepalived implements a VRRPv2 stack to handle director failover.
So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks and LVS directors failover.
and LVS directors failover.
%prep %prep
%setup -q %setup -q
@ -45,24 +44,25 @@ and LVS directors failover.
[ "%{buildroot}" != / ] && rm -rf %{buildroot} [ "%{buildroot}" != / ] && rm -rf %{buildroot}
%makeinstall %makeinstall
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/keepalived.service
rm -rf %{buildroot}%{_initrddir}
%post %post
/sbin/chkconfig --add keepalived %systemd_post keepalived
%{_initrddir}/keepalived start :
exit 0
%preun %preun
if [ $1 -eq 0 ]; then %systemd_preun keepalived
[ -e /var/lock/subsys/keepalived ] && %{_initrddir}/keepalived stop :
/sbin/chkconfig --del keepalived
fi
exit 0
%postun %postun
if [ $1 -eq 1 ]; then %systemd_postun_with_restart keepalived
[ -e /var/lock/subsys/keepalived ] && :
%{_initrddir}/keepalived restart
fi %posttrans
exit 0 find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
:
%clean %clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot} [ "%{buildroot}" != / ] && rm -rf %{buildroot}
@ -72,7 +72,7 @@ exit 0
%dir %{_sysconfdir}/keepalived/ %dir %{_sysconfdir}/keepalived/
%config(noreplace) %{_sysconfdir}/keepalived/* %config(noreplace) %{_sysconfdir}/keepalived/*
%config(noreplace) %{_sysconfdir}/sysconfig/keepalived %config(noreplace) %{_sysconfdir}/sysconfig/keepalived
%{_initrddir}/keepalived %{_unitdir}/keepalived.service
%{_bindir}/genhash %{_bindir}/genhash
%{_sbindir}/keepalived %{_sbindir}/keepalived
#%{_datadir}/snmp/mibs/*-MIB #%{_datadir}/snmp/mibs/*-MIB
@ -82,6 +82,9 @@ exit 0
#% doc doc/keepalived.conf.SYNOPSIS doc/samples/ #% doc doc/keepalived.conf.SYNOPSIS doc/samples/
%changelog %changelog
* Mon Apr 18 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.20-2mamba
- systemd service
* Sun Apr 17 2016 Automatic Build System <autodist@mambasoft.it> 1.2.20-1mamba * Sun Apr 17 2016 Automatic Build System <autodist@mambasoft.it> 1.2.20-1mamba
- automatic version update by autodist - automatic version update by autodist