MINOR: global: Add an option to get the old listening sockets.

Add the "-x" flag, that takes a path to a unix socket as an argument. If
used, haproxy will connect to the socket, and asks to get all the
listening sockets from the old process. Any failure is fatal.
This is needed to get seamless reloads on linux.
This commit is contained in:
Olivier Houchard
2017-04-05 22:33:04 +02:00
committed by Willy Tarreau
parent f886e3478d
commit f73629d23a
4 changed files with 252 additions and 2 deletions

View File

@@ -144,6 +144,7 @@ static inline struct bind_conf *bind_conf_alloc(struct proxy *fe, const char *fi
return bind_conf;
}
extern struct xfer_sock_list *xfer_sock_list;
#endif /* _PROTO_LISTENER_H */
/*

View File

@@ -246,6 +246,16 @@ struct bind_kw_list {
};
struct xfer_sock_list {
int fd;
char *iface;
char *namespace;
int options; /* socket options LI_O_* */
struct xfer_sock_list *prev;
struct xfer_sock_list *next;
struct sockaddr_storage addr;
};
#endif /* _TYPES_LISTENER_H */
/*