CLEANUP: removed obsolete examples an move a few to better places

The following example files awere removed as irrelevant by this
time :
  auth.cfg check.conf ssl.cfg haproxy.spec

The following scripts were removed as having been unused for more
than a decade :
  debug2ansi debug2html debugfind check init.haproxy stats_haproxy.sh

seemless_reload.txt was moved to doc/ where it's more suitable.

haproxy.vim was moved to contrib/syntax-highlight/

scripts/create-release was updated not to try to update haproxy.spec
anymore.
This commit is contained in:
Willy Tarreau 2019-06-15 18:56:48 +02:00
parent 965e84e2df
commit a8ee4b199f
13 changed files with 1 additions and 1422 deletions

View File

@ -1,134 +0,0 @@
global
# chroot /var/empty/
# uid 451
# gid 451
log 192.168.131.214:8514 local4 debug
maxconn 8192
defaults
timeout connect 3500
timeout queue 11000
timeout tarpit 12000
timeout client 30000
timeout http-request 40000
timeout http-keep-alive 5000
timeout server 40000
timeout check 7000
option contstats
option log-health-checks
################################
userlist customer1
group adm users tiger,xdb
group dev users scott,tiger
group uat users boss,xdb,tiger
user scott insecure-password cat
user tiger insecure-password dog
user xdb insecure-password hello
user boss password $6$k6y3o.eP$JlKBx9za966ud67qe45NSQYf8Nw.XFuk8QVRevoLh1XPCQDCBPjcU2JtGBSS0MOQW2PFxHSwRv6J.C0/D7cV91
userlist customer1alt
group adm
group dev
group uat
user scott insecure-password cat groups dev
user tiger insecure-password dog groups adm,dev,uat
user xdb insecure-password hello groups adm,uat
user boss password $6$k6y3o.eP$JlKBx9za966ud67qe45NSQYf8Nw.XFuk8QVRevoLh1XPCQDCBPjcU2JtGBSS0MOQW2PFxHSwRv6J.C0/D7cV91 groups uat
# Both customer1 and customer1alt userlist are functionally identical
frontend c1
bind 127.101.128.1:8080
log global
mode http
acl host_stats hdr_beg(host) -i stats.local
acl host_dev hdr_beg(host) -i dev.local
acl host_uat hdr_beg(host) -i uat.local
acl auth_uat http_auth_group(customer1) uat
# auth for host_uat checked in frontend, use realm "uat"
http-request auth realm uat if host_uat !auth_uat
use_backend c1stats if host_stats
use_backend c1dev if host_dev
use_backend c1uat if host_uat
backend c1uat
mode http
log global
server s6 192.168.152.206:80
server s7 192.168.152.207:80
backend c1dev
mode http
log global
# require users from customer1 assigned to group dev
acl auth_ok http_auth_group(customer1) dev
# auth checked in backend, use default realm (c1dev)
http-request auth if !auth_ok
server s6 192.168.152.206:80
server s7 192.168.152.207:80
backend c1stats
mode http
log global
# stats auth checked in backend, use default realm (Stats)
acl nagios src 192.168.126.31
acl guests src 192.168.162.0/24
acl auth_ok http_auth_group(customer1) adm
stats enable
stats refresh 60
stats uri /
stats scope c1
stats scope c1stats
# unconditionally deny guests, without checking auth or asking for a username/password
stats http-request deny if guests
# allow nagios without password, allow authenticated users
stats http-request allow if nagios
stats http-request allow if auth_ok
# ask for a username/password
stats http-request auth realm Stats
################################
userlist customer2
user peter insecure-password peter
user monica insecure-password monica
frontend c2
bind 127.201.128.1:8080
log global
mode http
acl auth_ok http_auth(customer2)
acl host_b1 hdr(host) -i b1.local
http-request auth unless auth_ok
use_backend c2b1 if host_b1
default_backend c2b0
backend c2b1
mode http
log global
server s1 192.168.152.201:80
backend c2b0
mode http
log global
server s1 192.168.152.201:80

View File

@ -1,540 +0,0 @@
#!/usr/bin/perl
###################################################################################################################
# $Id:: check 20 2007-02-23 14:26:44Z fabrice $
# $Revision:: 20 $
###################################################################################################################
# Authors : Fabrice Dulaunoy <fabrice@dulaunoy.com>
#
# Copyright (C) 2006-2007 Fabrice Dulaunoy <fabrice@dulaunoy.com>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
###################################################################################################################
#
###################################################################################################################
use strict;
package MyPackage;
use Config::General;
use Getopt::Std;
use LWP::UserAgent;
use URI;
use File::Basename;
# CVS VSERSION
#my $VERSION = do { my @rev = ( q$Revision: 20 $ =~ /\d+/g ); sprintf "%d." . "%d" x $#rev, @rev };
# SVN VERSION
my $VERSION = sprintf "1.%02d", '$Revision: 20 $ ' =~ /(\d+)/;
my %option;
getopts( "vHhc:", \%option );
if ( $option{ h } )
{
print "Usage: $0 [options ...]\n\n";
print "Where options include:\n";
print "\t -h \t\t\tthis help (what else ?)\n";
print "\t -H \t\t\tshow a sample config file\n";
print "\t -v \t\t\tprint version and exit\n";
print "\t -c file \t\tuse config file (default /etc/check.conf)\n";
print "\n\t This is a small program parsing the config file \n";
print "\t and checking one or more condition on one or more servers\n";
print "\t these condition could be \n";
print "\t\t HTTP return code list (with optinal Host Header and optional Basic Authentication) \n";
print "\t\t a regex over a HTTP GET (with optinal Host Header and optional Basic Authentication)\n";
print "\t\t a regex over a FTP GET ( with optional Basic Authentication)\n";
print "\t\t a TCP open port\n";
print "\t the result state is an AND over all tests \n";
print "\t this result could be \n";
print "\t\t a simple HTTP return state (\"200 OK\" or \"503 Service Unavailable\" \n";
print "\t\t a HTML page with a status OK or NOK for each test\n";
print "\t\t a HTML page with a staus OK or NOK for each test in a row of a TABLE\n";
print "\n\t The natural complement of this tools is the poll_check tool\n";
print "\t The result code of this tools is designed to fit the HAPROXY requirement (test over a port not related to the WEB server)\n";
}
if ( $option{ H } )
{
print "\t A sample config file could be:\n";
print <<'EOF';
###########################################################
# listening port ( default 9898 )
port 9899
# on which IP to bind (default 127.0.0.1 ) * = all IP
host 10.2.1.1
# which client addr is allow ( default 127.0.0.0/8 )
#cidr_allow = 0.0.0.0/0
# verbosity from 0 to 4 (default 0 = no log )
log_level = 1
# daemonize (default 0 = no )
daemon = 1
# content put a HTML content after header
# (default 0 = no content 1 = html 2 = table )
content = 2
# reparse the config file at each request ( default 0 = no )
# only SIGHUP reread the config file)
reparse = 1
# pid_file (default /var/run/check.pid )
# $$$ = basename of config file
# $$ = PID
pid_file=/var/run/CHECK_$$$.pid
# log_file (default /var/log/check.log )
# $$$ = basename of config file
# $$ = PID
log_file=/var/log/CHECK_$$$.log
# number of servers to keep running (default = 5)
min_servers = 2
# number of servers to have waiting for requests (default = 2)
min_spare_servers = 1
# maximum number of servers to have waiting for requests (default = 10)
max_spare_servers =1
# number of servers (default = 50)
max_servers = 2
###########################################################
# a server to check
# type could be get , regex or tcp
#
# get = do a http or ftp get and check the result code with
# the list, coma separated, provided ( default = 200,201 )
# hostheader is optional and send to the server if provided
#
# regex = do a http or ftp get and check the content result
# with regex provided
# hostheader is optional and send to the server if provided
#
# tcp = test if the tcp port provided is open
#
###########################################################
<realserver>
url=http://127.0.0.1:80/apache2-default/index.html
type = get
code=200,201
hostheader = www.test.com
</realserver>
<realserver>
url=http://127.0.0.1:82/apache2-default/index.html
type = get
code=200,201
hostheader = www.myhost.com
</realserver>
<realserver>
url= http://10.2.2.1
type = regex
regex= /qdAbm/
</realserver>
<realserver>
type = tcp
url = 10.2.2.1
port =80
</realserver>
<realserver>
type = get
url = ftp://USER:PASSWORD@10.2.3.1
code=200,201
</realserver>
###########################################################
EOF
}
if ( $option{ h } || $option{ H } )
{
exit;
}
if ( $option{ v } ) { print "$VERSION\n"; exit; }
use vars qw(@ISA);
use Net::Server::PreFork;
@ISA = qw(Net::Server::PreFork);
my $port;
my $host;
my $reparse;
my $cidr_allow;
my $log_level;
my $log_file;
my $pid_file;
my $daemon;
my $min_servers;
my $min_spare_servers;
my $max_spare_servers;
my $max_servers;
my $html_content;
my $conf_file = $option{ c } || "/etc/check.conf";
my $pwd = $ENV{ PWD };
$conf_file =~ s/^\./$pwd/;
$conf_file =~ s/^([^\/])/$pwd\/$1/;
my $basename = basename( $conf_file, ( '.conf' ) );
my $CONF = parse_conf( $conf_file );
my $reparse_one = 0;
$SIG{ HUP } = sub { $reparse_one = 1; };
my @TEST;
my $test_list = $CONF->{ realserver };
if ( ref( $test_list ) eq "ARRAY" )
{
@TEST = @{ $test_list };
}
else
{
@TEST = ( $test_list );
}
my $server = MyPackage->new(
{
port => $port,
host => $host,
cidr_allow => $cidr_allow,
log_level => $log_level,
child_communication => 1,
setsid => $daemon,
log_file => $log_file,
pid_file => $pid_file,
min_servers => $min_servers,
min_spare_servers => $min_spare_servers,
max_spare_servers => $max_spare_servers,
max_servers => $max_servers,
}
);
$server->run();
exit;
sub process_request
{
my $self = shift;
if ( $reparse || $reparse_one )
{
$CONF = parse_conf( $conf_file );
}
my $result;
my @TEST;
my $test_list = $CONF->{ realserver };
if ( ref( $test_list ) eq "ARRAY" )
{
@TEST = @{ $test_list };
}
else
{
@TEST = ( $test_list );
}
my $allow_code;
my $test_item;
my $html_data;
foreach my $test ( @TEST )
{
my $uri;
my $authority;
my $URL = $test->{ url };
$uri = URI->new( $URL );
$authority = $uri->authority;
if ( exists $test->{ type } )
{
if ( $test->{ type } =~ /get/i )
{
my $allow_code = $test->{ code } || '200,201';
$test_item++;
my $host = $test->{ hostheader } || $authority;
my $res = get( $URL, $allow_code, $host );
if ( $html_content == 1 )
{
if ( $res )
{
$html_data .= "GET OK $URL<br>\r\n";
}
else
{
$html_data .= "GET NOK $URL<br>\r\n";
}
}
if ( $html_content == 2 )
{
if ( $res )
{
$html_data .= "<tr><td>GET</td><td>OK</td><td>$URL</td></tr>\r\n";
}
else
{
$html_data .= "<tr><td>GET</td><td>NOK</td><td>$URL</td></tr>\r\n";
}
}
$result += $res;
}
if ( $test->{ type } =~ /regex/i )
{
my $regex = $test->{ regex };
$test_item++;
my $host = $test->{ hostheader } || $authority;
my $res = regex( $URL, $regex, $host );
if ( $html_content == 1 )
{
if ( $res )
{
$html_data .= "REGEX OK $URL<br>\r\n";
}
else
{
$html_data .= "REGEX NOK $URL<br>\r\n";
}
}
if ( $html_content == 2 )
{
if ( $res )
{
$html_data .= "<tr><td>REGEX</td><td>OK</td><td>$URL</td></tr>\r\n";
}
else
{
$html_data .= "<tr><td>REGEX</td><td>NOK</td><td>$URL</td></tr>\r\n";
}
}
$result += $res;
}
if ( $test->{ type } =~ /tcp/i )
{
$test_item++;
my $PORT = $test->{ port } || 80;
my $res = TCP( $URL, $PORT );
if ( $html_content == 1 )
{
if ( $res )
{
$html_data .= "TCP OK $URL<br>\r\n";
}
else
{
$html_data .= "TCP NOK $URL<br>\r\n";
}
}
if ( $html_content == 2 )
{
if ( $res )
{
$html_data .= "<tr><td>TCP</td><td>OK</td><td>$URL</td></tr>\r\n";
}
else
{
$html_data .= "<tr><td>TCP</td><td>NOK</td><td>$URL</td></tr>\r\n";
}
}
$result += $res;
}
}
}
my $len;
if ( $html_content == 1 )
{
$html_data = "\r\n<html><body>\r\n$html_data</body></html>\r\n";
$len = ( length( $html_data ) ) - 2;
}
if ( $html_content == 2 )
{
$html_data = "\r\n<table align='center' border='1' >\r\n$html_data</table>\r\n";
$len = ( length( $html_data ) ) - 2;
}
if ( $result != $test_item )
{
my $header = "HTTP/1.0 503 Service Unavailable\r\n";
if ( $html_content )
{
$header .= "Content-Length: $len\r\nContent-Type: text/html; charset=iso-8859-1\r\n";
}
print $header . $html_data;
return;
}
my $header = "HTTP/1.0 200 OK\r\n";
if ( $html_content )
{
$header .= "Content-Length: $len\r\nContent-Type: text/html; charset=iso-8859-1\r\n";
}
print $header. $html_data;
}
1;
##########################################################
##########################################################
# function to REGEX on a GET from URL
# arg: uri
# regex to test (with extra parameter like perl e.g. /\bweb\d{2,3}/i )
# IP
# port (optionnal: default=80)
# ret: 0 if no reply
# 1 if reply
##########################################################
##########################################################
sub regex
{
my $url = shift;
my $regex = shift;
my $host = shift;
$regex =~ /\/(.*)\/(.*)/;
my $reg = $1;
my $ext = $2;
my %options;
$options{ 'agent' } = "LB_REGEX_PROBE/$VERSION";
$options{ 'timeout' } = 10;
my $ua = LWP::UserAgent->new( %options );
my $response = $ua->get( $url, "Host" => $host );
if ( $response->is_success )
{
my $html = $response->content;
if ( $ext =~ /i/ )
{
if ( $html =~ /$reg/si )
{
return 1;
}
}
else
{
if ( $html =~ /$reg/s )
{
return 1;
}
}
}
return 0;
}
##########################################################
##########################################################
# function to GET an URL (HTTP or FTP) ftp://FTPTest:6ccount4F@brice!@172.29.0.146
# arg: uri
# allowed code (comma seaparated)
# IP
# port (optionnal: default=80)
# ret: 0 if not the expected vcode
# 1 if the expected code is returned
##########################################################
##########################################################
sub get
{
my $url = shift;
my $code = shift;
my $host = shift;
$code =~ s/\s*//g;
my %codes = map { $_ => $_ } split /,/, $code;
my %options;
$options{ 'agent' } = "LB_HTTP_PROBE/$VERSION";
$options{ 'timeout' } = 10;
my $ua = LWP::UserAgent->new( %options );
my $response = $ua->get( $url, "Host" => $host );
if ( $response->is_success )
{
my $rc = $response->{ _rc };
if ( defined $codes{ $rc } )
{
return 1;
}
}
return 0;
}
##########################################################
##########################################################
# function to test a port on a host
# arg: hostip
# port
# timeout
# ret: 0 if not open
# 1 if open
##########################################################
##########################################################
sub TCP
{
use IO::Socket::PortState qw(check_ports);
my $remote_host = shift;
my $remote_port = shift;
my $timeout = shift;
my %porthash = ( tcp => { $remote_port => { name => 'to_test', } } );
check_ports( $remote_host, $timeout, \%porthash );
return $porthash{ tcp }{ $remote_port }{ open };
}
##############################################
# parse config file
# IN: File PATH
# Out: Ref to a hash with config data
##############################################
sub parse_conf
{
my $file = shift;
my $conf = new Config::General(
-ConfigFile => $file,
-ExtendedAccess => 1,
-AllowMultiOptions => "yes"
);
my %config = $conf->getall;
$port = $config{ port } || 9898;
$host = $config{ host } || '127.0.0.1';
$reparse = $config{ reparse } || 0;
$cidr_allow = $config{ cidr_allow } || '127.0.0.0/8';
$log_level = $config{ log_level } || 0;
$log_file = $config{ log_file } || "/var/log/check.log";
$pid_file = $config{ pid_file } || "/var/run/check.pid";
$daemon = $config{ daemon } || 0;
$min_servers = $config{ min_servers } || 5;
$min_spare_servers = $config{ min_spare_servers } || 2;
$max_spare_servers = $config{ max_spare_servers } || 10;
$max_servers = $config{ max_servers } || 50;
$html_content = $config{ content } || 0;
$pid_file =~ s/\$\$\$/$basename/g;
$pid_file =~ s/\$\$/$$/g;
$log_file =~ s/\$\$\$/$basename/g;
$log_file =~ s/\$\$/$$/g;
if ( !( keys %{ $config{ realserver } } ) )
{
die "No farm to test\n";
}
return ( \%config );
}

View File

@ -1,93 +0,0 @@
# listening port ( default 9898 )
port 9899
# on which IP to bind (default 127.0.0.1 ) * = all IP
#host 10.2.1.1
# which client addr is allow ( default 127.0.0.0/8 )
#cidr_allow = 0.0.0.0/0
# verbosity from 0 to 4 (default 0 = no log )
log_level = 1
# daemonize (default 0 = no )
daemon = 1
# content put a HTML content after header
# (default 0 = no content 1 = html 2 = table )
content = 2
# reparse the config file at each request ( default 0 = no )
# only SIGHUP reread the config file)
reparse = 1
# pid_file (default /var/run/check.pid )
# $$$ = basename of config file
# $$ = PID
pid_file=/var/run/CHECK_$$$.pid
# log_file (default /var/log/check.log )
# $$$ = basename of config file
# $$ = PID
log_file=/var/log/CHECK_$$$.log
# number of servers to keep running (default = 5)
min_servers = 2
# number of servers to have waiting for requests (default = 2)
min_spare_servers = 1
# maximum number of servers to have waiting for requests (default = 10)
max_spare_servers =1
# number of servers (default = 50)
max_servers = 2
###########################################################
# a server to check
# type could be get , regex or tcp
# get = do a http or ftp get and check the result code with
# the list, coma separated, provided ( default = 200,201 )
# hostheader is optional and send to the server if provided
# regex = do a http or ftp get and check the content result
# with regex provided
# hostheader is optional and send to the server if provided
# tcp = test if the tcp port provided is open
#<realserver>
# url=http://127.0.0.1:80/apache2-default/index.html
# type = get
# code=200,201
# hostheader = www.test.com
#</realserver>
#<realserver>
# url=http://127.0.0.1:82/apache2-default/index.html
# type = get
# code=200,201
# hostheader = www.myhost.com
#</realserver>
<realserver>
url= http://10.2.2.1
type = regex
regex= /qdAbm/
</realserver>
<realserver>
type = tcp
url = 10.2.2.1
port =80
</realserver>
#<realserver>
# type = get
# url = ftp://FTPuser:FTPpassword@10.2.3.1
# code=200,201
#</realserver>

View File

@ -1,2 +0,0 @@
#!/bin/sh
tr -d '\015' | sed -e 's,\(: Cookie:.*$\),'$'\e''\[35m\1'$'\e''\[0m,gi' -e 's,\(: Set-Cookie:.*$\),'$'\e''\[31m\1'$'\e''\[0m,gi' -e 's,\(^[^:]*:[^:]*srvhdr.*\)$,'$'\e''\[32m\1'$'\e''\[0m,i' -e 's,\(^[^:]*:[^:]*clihdr.*\)$,'$'\e''\[34m\1'$'\e''\[0m,i'

View File

@ -1,2 +0,0 @@
#!/bin/sh
(echo '<html><body><pre>'; tr -d '\015' | sed -e 's,\(: Cookie:.*$\),<font color="#e000c0">\1</font>,gi' -e 's,\(: Set-Cookie:.*$\),<font color="#e0a000">\1</font>,gi' -e 's,\(^[^:]*:[^:]*srvhdr.*\)$,<font color="#00a000">\1</font>,i' -e 's,\(^[^:]*:[^:]*clihdr.*\)$,<font color="#0000c0">\1</font>,i' -e 's,\(^.*\)$,<tt>\1</tt>,' ; echo '</pre></body></html>')

View File

@ -1,8 +0,0 @@
#!/bin/bash
if [ $# -lt 2 ]; then
echo "Usage: $0 regex debug_file > extracted_file"
exit 1
fi
word=$1
file=$2
exec grep $(for i in $(grep $word $file |cut -f1 -d: | sort -u ) ; do echo -n '\('$i':\)\|'; done; echo '^$') $file

View File

@ -1,472 +0,0 @@
Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments
Name: haproxy
Version: 2.0-dev7
Release: 1
License: GPL
Group: System Environment/Daemons
URL: http://www.haproxy.org/
Source0: http://www.haproxy.org/download/1.6/src/devel/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: pcre-devel
Requires: /sbin/chkconfig, /sbin/service
%description
HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high
availability environments. Indeed, it can:
- route HTTP requests depending on statically assigned cookies
- spread the load among several servers while assuring server persistence
through the use of HTTP cookies
- switch to backup servers in the event a main one fails
- accept connections to special ports dedicated to service monitoring
- stop accepting connections without breaking existing ones
- add/modify/delete HTTP headers both ways
- block requests matching a particular pattern
It needs very little resource. Its event-driven architecture allows it to easily
handle thousands of simultaneous connections on hundreds of instances without
risking the system's stability.
%prep
%setup -q
# We don't want any perl dependecies in this RPM:
%define __perl_requires /bin/true
%build
%{__make} USE_PCRE=1 DEBUG="" ARCH=%{_target_cpu} TARGET=linux26
%install
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%{__install} -d %{buildroot}%{_sbindir}
%{__install} -d %{buildroot}%{_sysconfdir}/rc.d/init.d
%{__install} -d %{buildroot}%{_sysconfdir}/%{name}
%{__install} -d %{buildroot}%{_mandir}/man1/
%{__install} -s %{name} %{buildroot}%{_sbindir}/
%{__install} -c -m 755 examples/%{name}.init %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
%{__install} -c -m 755 doc/%{name}.1 %{buildroot}%{_mandir}/man1/
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%post
/sbin/chkconfig --add %{name}
%preun
if [ $1 = 0 ]; then
/sbin/service %{name} stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{name}
fi
%postun
if [ "$1" -ge "1" ]; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
%files
%defattr(-,root,root)
%doc CHANGELOG README doc/architecture.txt doc/configuration.txt doc/intro.txt doc/management.txt doc/proxy-protocol.txt
%doc %{_mandir}/man1/%{name}.1*
%attr(0755,root,root) %{_sbindir}/%{name}
%dir %{_sysconfdir}/%{name}
%attr(0755,root,root) %config %{_sysconfdir}/rc.d/init.d/%{name}
%changelog
* Tue Jun 11 2019 Willy Tarreau <w@1wt.eu>
- updated to 2.0-dev7
* Fri Jun 7 2019 Willy Tarreau <w@1wt.eu>
- updated to 2.0-dev6
* Sun Jun 2 2019 Willy Tarreau <w@1wt.eu>
- updated to 2.0-dev5
* Wed May 22 2019 Willy Tarreau <w@1wt.eu>
- updated to 2.0-dev4
* Wed May 15 2019 Willy Tarreau <w@1wt.eu>
- updated to 2.0-dev3
* Tue Mar 26 2019 Willy Tarreau <w@1wt.eu>
- updated to 2.0-dev2
* Tue Feb 26 2019 Willy Tarreau <w@1wt.eu>
- updated to 2.0-dev1
* Sat Dec 22 2018 Willy Tarreau <w@1wt.eu>
- updated to 2.0-dev0
* Wed Dec 19 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9.0
* Sun Dec 16 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev11
* Sat Dec 8 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev10
* Sun Dec 2 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev9
* Sun Nov 25 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev8
* Sun Nov 18 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev7
* Sun Nov 11 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev6
* Sun Oct 28 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev5
* Sun Oct 21 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev4
* Sat Sep 29 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev3
* Wed Sep 12 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev2
* Thu Aug 2 2018 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev1
* Sun Nov 26 2017 Willy Tarreau <w@1wt.eu>
- updated to 1.9-dev0
* Sun Nov 26 2017 Willy Tarreau <w@1wt.eu>
- updated to 1.8.0
* Sun Nov 19 2017 Willy Tarreau <w@1wt.eu>
- updated to 1.8-rc4
* Sat Nov 11 2017 Willy Tarreau <w@1wt.eu>
- updated to 1.8-rc3
* Fri Nov 3 2017 Willy Tarreau <w@1wt.eu>
- updated to 1.8-rc2
* Tue Oct 31 2017 Willy Tarreau <w@1wt.eu>
- updated to 1.8-rc1
* Sun Oct 22 2017 Willy Tarreau <w@1wt.eu>
- updated to 1.8-dev3
* Fri Jun 2 2017 Willy Tarreau <w@1wt.eu>
- updated to 1.8-dev2
* Mon Apr 3 2017 Willy Tarreau <w@1wt.eu>
- updated to 1.8-dev1
* Fri Nov 25 2016 Willy Tarreau <w@1wt.eu>
- updated to 1.8-dev0
* Fri Nov 25 2016 Willy Tarreau <w@1wt.eu>
- updated to 1.7.0
* Wed Nov 9 2016 Willy Tarreau <w@1wt.eu>
- updated to 1.7-dev6
* Tue Oct 25 2016 Willy Tarreau <w@1wt.eu>
- updated to 1.7-dev5
* Sun Aug 14 2016 Willy Tarreau <w@1wt.eu>
- updated to 1.7-dev4
* Tue May 10 2016 Willy Tarreau <w@1wt.eu>
- updated to 1.7-dev3
* Mon Mar 14 2016 Willy Tarreau <w@1wt.eu>
- updated to 1.7-dev2
* Sun Dec 20 2015 Willy Tarreau <w@1wt.eu>
- updated to 1.7-dev1
* Tue Oct 13 2015 Willy Tarreau <w@1wt.eu>
- updated to 1.7-dev0
* Tue Oct 13 2015 Willy Tarreau <w@1wt.eu>
- updated to 1.6.0
* Tue Oct 6 2015 Willy Tarreau <w@1wt.eu>
- updated to 1.6-dev7
* Mon Sep 28 2015 Willy Tarreau <w@1wt.eu>
- updated to 1.6-dev6
* Mon Sep 14 2015 Willy Tarreau <w@1wt.eu>
- updated to 1.6-dev5
* Sun Aug 30 2015 Willy Tarreau <w@1wt.eu>
- updated to 1.6-dev4
* Sun Aug 30 2015 Willy Tarreau <w@1wt.eu>
- updated to 1.6-dev4
* Wed Jul 22 2015 Willy Tarreau <w@1wt.eu>
- updated to 1.6-dev3
* Wed Jun 17 2015 Willy Tarreau <w@1wt.eu>
- updated to 1.6-dev2
* Wed Mar 11 2015 Willy Tarreau <w@1wt.eu>
- updated to 1.6-dev1
* Thu Jun 19 2014 Willy Tarreau <w@1wt.eu>
- updated to 1.6-dev0
* Thu Jun 19 2014 Willy Tarreau <w@1wt.eu>
- updated to 1.5.0
* Wed May 28 2014 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev26
* Sat May 10 2014 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev25
* Sat Apr 26 2014 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev24
* Wed Apr 23 2014 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev23
* Mon Feb 3 2014 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev22
* Tue Dec 17 2013 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev21
* Mon Dec 16 2013 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev20
* Mon Jun 17 2013 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev19
* Wed Apr 3 2013 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev18
* Fri Dec 28 2012 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev17
* Mon Dec 24 2012 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev16
* Wed Dec 12 2012 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev15
* Mon Nov 26 2012 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev14
* Thu Nov 22 2012 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev13
* Mon Sep 10 2012 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev12
* Mon Jun 4 2012 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev11
* Mon May 14 2012 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev10
* Tue May 8 2012 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev9
* Mon Mar 26 2012 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev8
* Sat Sep 10 2011 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev7
* Fri Apr 8 2011 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev6
* Tue Mar 29 2011 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev5
* Sun Mar 13 2011 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev4
* Thu Nov 11 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev3
* Sat Aug 28 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev2
* Wed Aug 25 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev1
* Sun May 23 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.5-dev0
* Sun May 16 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4.6
* Thu May 13 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4.5
* Wed Apr 7 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4.4
* Tue Mar 30 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4.3
* Wed Mar 17 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4.2
* Thu Mar 4 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4.1
* Fri Feb 26 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4.0
* Tue Feb 2 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4-rc1
* Mon Jan 25 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4-dev8
* Mon Jan 25 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4-dev7
* Fri Jan 8 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4-dev6
* Sun Jan 3 2010 Willy Tarreau <w@1wt.eu>
- updated to 1.4-dev5
* Mon Oct 12 2009 Willy Tarreau <w@1wt.eu>
- updated to 1.4-dev4
* Thu Sep 24 2009 Willy Tarreau <w@1wt.eu>
- updated to 1.4-dev3
* Sun Aug 9 2009 Willy Tarreau <w@1wt.eu>
- updated to 1.4-dev2
* Wed Jul 29 2009 Willy Tarreau <w@1wt.eu>
- updated to 1.4-dev1
* Tue Jun 09 2009 Willy Tarreau <w@1wt.eu>
- updated to 1.4-dev0
* Sun May 10 2009 Willy Tarreau <w@1wt.eu>
- updated to 1.3.18
* Sun Mar 29 2009 Willy Tarreau <w@1wt.eu>
- updated to 1.3.17
* Sun Mar 22 2009 Willy Tarreau <w@1wt.eu>
- updated to 1.3.16
* Sat Apr 19 2008 Willy Tarreau <w@1wt.eu>
- updated to 1.3.15
* Wed Dec 5 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.14
* Thu Oct 18 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.13
* Sun Jun 17 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.12
* Sun Jun 3 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.11.4
* Mon May 14 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.11.3
* Mon May 14 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.11.2
* Mon May 14 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.11.1
* Mon May 14 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.11
* Thu May 10 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.10.2
* Tue May 09 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.10.1
* Tue May 08 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.10
* Sun Apr 15 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.9
* Tue Apr 03 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.8.2
* Sun Apr 01 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.8.1
* Sun Mar 25 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.8
* Wed Jan 26 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.7
* Wed Jan 22 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.6
* Wed Jan 07 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.5
* Wed Jan 02 2007 Willy Tarreau <w@1wt.eu>
- updated to 1.3.4
* Wed Oct 15 2006 Willy Tarreau <w@1wt.eu>
- updated to 1.3.3
* Wed Sep 03 2006 Willy Tarreau <w@1wt.eu>
- updated to 1.3.2
* Wed Jul 09 2006 Willy Tarreau <w@1wt.eu>
- updated to 1.3.1
* Wed May 21 2006 Willy Tarreau <willy@w.ods.org>
- updated to 1.2.14
* Wed May 01 2006 Willy Tarreau <willy@w.ods.org>
- updated to 1.2.13
* Wed Apr 15 2006 Willy Tarreau <willy@w.ods.org>
- updated to 1.2.12
* Wed Mar 30 2006 Willy Tarreau <willy@w.ods.org>
- updated to 1.2.11.1
* Wed Mar 19 2006 Willy Tarreau <willy@w.ods.org>
- updated to 1.2.10
* Wed Mar 15 2006 Willy Tarreau <willy@w.ods.org>
- updated to 1.2.9
* Sat Jan 22 2005 Willy Tarreau <willy@w.ods.org>
- updated to 1.2.3 (1.1.30)
* Sun Nov 14 2004 Willy Tarreau <w@w.ods.org>
- updated to 1.1.29
- fixed path to config and init files
- statically linked PCRE to increase portability to non-pcre systems
* Sun Jun 6 2004 Willy Tarreau <willy@w.ods.org>
- updated to 1.1.28
- added config check support to the init script
* Tue Oct 28 2003 Simon Matter <simon.matter@invoca.ch>
- updated to 1.1.27
- added pid support to the init script
* Wed Oct 22 2003 Simon Matter <simon.matter@invoca.ch>
- updated to 1.1.26
* Thu Oct 16 2003 Simon Matter <simon.matter@invoca.ch>
- initial build

View File

@ -1,55 +0,0 @@
#!/bin/sh
#
# config.rc sample with defaults :
# service haproxy
# config /etc/haproxy/haproxy.cfg
# maxconn 1024
#
config="/etc/haproxy/haproxy.cfg"
maxconn=1024
bin=/usr/sbin/haproxy
cmdline='$bin -D'
. $ROOT/sbin/init.d/default
if [ -e "$config" ]; then
maintfd=`grep '^\([^#]*\)\(listen\|server\)' $config|wc -l`
else
maintfd=0
fi
maxfd=$[$maxconn*2 + $maintfd]
if [ $maxfd -lt 100 ]; then
maxfd=100;
fi
cmdline="$cmdline -n $maxconn -f $config"
ulimit -n $maxfd
# to get a core when needed, uncomment the following :
# cd /var/tmp
# ulimit -c unlimited
# soft stop
function do_stop {
pids=`pidof -o $$ -- $PNAME`
if [ ! -z "$pids" ]; then
echo "Asking $PNAME to terminate gracefully..."
kill -USR1 $pids
echo "(use kill $pids to stop immediately)."
fi
}
# dump status
function do_status {
pids=`pidof -o $$ -- $PNAME`
if [ ! -z "$pids" ]; then
echo "Dumping $PNAME status in logs."
kill -HUP $pids
else
echo "Process $PNAME is not running."
fi
}
main $*

View File

@ -1,26 +0,0 @@
# This configuration is a simplified example of how to use ssl on front
# and backends with additional certificates loaded from a directory for SNI
# capable clients.
global
maxconn 100
defaults
mode http
timeout connect 5s
timeout client 5s
timeout server 5s
frontend myfrontend
# primary cert is /etc/cert/server.pem
# /etc/cert/certdir/ contains additional certificates for SNI clients
bind :443 ssl crt /etc/cert/server.pem crt /etc/cert/certdir/
bind :80
default_backend mybackend
backend mybackend
# a http backend
server s3 10.0.0.3:80
# a https backend
server s4 10.0.0.3:443 ssl verify none

View File

@ -1,78 +0,0 @@
#!/bin/bash
## contrib by prizee.com
socket='/var/run/haproxy.stat'
if ! type socat >/dev/null 2>&1 ; then
echo "can't find socat in PATH" 1>&2
exit 1
fi
printUsage ()
{
echo -e "Usage : $(basename $0) [options] -s section
--section -s section\t: section to use ( --list format)
Options :
--socket -S [socket]\t: socket to use (default: /var/run/haproxy.stat)
--list -l\t\t: print available sections
--help -h\t\t: print this message"
}
getRawStat ()
{
if [ ! -S $socket ] ; then
echo "$socket socket unavailable" 1>&2
exit 1
fi
if ! printf "show stat\n" | socat unix-connect:${socket} stdio | grep -v "^#" ; then
echo "cannot read $socket" 1>&2
exit 1
fi
}
getStat ()
{
stats=$(getRawStat | grep $1 | awk -F "," '{print $5" "$8}')
export cumul=$(echo $stats | cut -d " " -f2)
export current=$(echo $stats | cut -d " " -f1)
}
showList ()
{
getRawStat | awk -F "," '{print $1","$2}'
}
set -- `getopt -u -l socket:,section:,list,help -- s:S:lh "$@"`
while true ; do
case $1 in
--socket|-S) socket=$2 ; shift 2 ;;
--section|-s) section=$2 ; shift 2 ;;
--help|-h) printUsage ; exit 0 ;;
--list|-l) showList ; exit 0 ;;
--) break ;;
esac
done
if [ "$section" = "" ] ; then
echo "section not specified, run '$(basename $0) --list' to know available sections" 1>&2
printUsage
exit 1
fi
cpt=0
totalrate=0
while true ; do
getStat $section
if [ "$cpt" -gt "0" ] ; then
sessionrate=$(($cumul-$oldcumul))
totalrate=$(($totalrate+$sessionrate))
averagerate=$(($totalrate/$cpt))
printf "$sessionrate sessions/s (avg: $averagerate )\t$current concurrent sessions\n"
fi
oldcumul=$cumul
sleep 1
cpt=$(($cpt+1))
done

View File

@ -177,17 +177,6 @@ echo "Updating VERDATE ..."
echo '$Format:%ci$' > VERDATE
echo "$DATE" >> VERDATE
echo "Updating haproxy.spec ..."
sed -e "s/^Version: .*/Version: $NEW/" < examples/haproxy.spec >examples/haproxy.spec- && mv examples/haproxy.spec- examples/haproxy.spec
(sed -ne '0,/^%changelog/p';
date -d "$DATE" "+* %a %b %e %Y $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
echo "- updated to $(cat VERSION)"
echo
) < examples/haproxy.spec >examples/haproxy.spec-
sed -ne '0,/^%changelog/d;p' < examples/haproxy.spec >>examples/haproxy.spec-
mv examples/haproxy.spec- examples/haproxy.spec
# updating branch and date in all modified doc files except the outdated architecture.txt
for file in doc/intro.txt doc/configuration.txt doc/management.txt $(git diff --name-only v${OLD}.. -- doc); do
if [ ! -e "$file" ]; then continue; fi
@ -207,7 +196,7 @@ sed -e "s:^\(#define\s*PRODUCT_BRANCH\s*\)\"[^\"]*\":\1\"$BRANCH\":" \
-i include/common/version.h
if [ -n "$INTERACTIVE" ]; then
vi CHANGELOG VERSION VERDATE examples/haproxy*.spec \
vi CHANGELOG VERSION VERDATE \
src/haproxy.c doc/configuration.txt \
$(git diff --name-only v${OLD}.. -- doc)
fi