]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] pxid/puid/luid: don't shift IDs when some of them are forced
authorKrzysztof Piotr Oledzki <ole@ans.pl>
Fri, 5 Feb 2010 19:58:27 +0000 (20:58 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 6 Feb 2010 08:50:24 +0000 (09:50 +0100)
commitdf5cb9f764e2972264e6f46053f984e7b675aabb
tree7dddba06870517d3af3e3ce35b3e69f862ff1708
parentaff01ea1dcead4736067deb86821c7e0b37c6ac2
[BUG] pxid/puid/luid: don't shift IDs when some of them are forced

[WT: it was not a bug, I did it on purpose to leave no hole between IDs,
 though it's not very practical when admins want to force some entries
 after they have been used, because they'd rather leave a hole than
 renumber everything ]

Forcing some of IDs should not shift others.

Regression introduced in 53fb4ae261b6e0e33e618f5cabbacc1657c19cc5

---cut here---
global
        stats socket /home/ole/haproxy.stat user ole group ole mode 660

frontend F1
        bind 127.0.0.1:9999
        mode http

backend B1
        mode http

backend B2
        mode http
        id 9999

backend B3
        mode http

backend B4
        mode http
---cut here---

Before 53fb4ae261b6e0e33e618f5cabbacc1657c19cc5:
$ echo "show stat" | socat unix-connect:/home/ole/haproxy.stat stdio|cut -d , -f 28
iid
1
2
9999
4
5

After 53fb4ae261b6e0e33e618f5cabbacc1657c19cc5:
$ echo "show stat" | socat unix-connect:/home/ole/haproxy.stat stdio|cut -d , -f 28
iid
1
2
9999
3
4

With this patch:
$ echo "show stat" | socat unix-connect:/home/ole/haproxy.stat stdio|cut -d , -f 28
iid
1
2
9999
4
5
src/cfgparse.c