On 04/12/2017 03:37 PM, Olivier Houchard wrote: > On Wed, Apr 12, 2017 at 03:16:31PM +0200, Conrad Hoffmann wrote: >> Hi Olivier, >> >> I was very eager to try out your patch set, thanks a lot! However, after >> applying all of them (including the last three), it seems that using >> environment variables in the config is broken (i.e. ${VARNAME} does not get >> replaced with the value of the environment variable anymore). I am using >> the systemd-wrapper, but not systemd. >> >> Just from looking at the patches I couldn't make out what exactly might be >> the problem. I guess it could be either the wrapper not passing on its >> environment properly or haproxy not using it properly anymore. If you have >> any immediate ideas, let me know. I'll try to fully debug this when I can >> spare the time. >> >> Thanks a lot, >> Conrad >> > > Hi Conrad, > > You're right, that was just me being an idiot :) > Please replace 0007-MINOR-systemd-wrapper-add-support-for-passing-the-x-.patch > with the one attached, or just replace in src/haproxy-systemd-wrapper.c : > > argv = calloc(4 + main_argc + nb_pid + 1 + > stats_socket != NULL ? 2 : 0, sizeof(char *)); > by : > argv = calloc(4 + main_argc + nb_pid + 1 + > (stats_socket != NULL ? 2 : 0), sizeof(char *)); > > Regards, > > Olivier
Works indeed, hard to spot :) Thanks a lot, I'll now get back to testing the actual reloads! Conrad -- Conrad Hoffmann Traffic Engineer SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany Managing Director: Alexander Ljung | Incorporated in England & Wales with Company No. 6343600 | Local Branch Office | AG Charlottenburg | HRB 110657B