Hi Willy and Cyril,

I just send a new version of the patch.
I made some changes following the remarks of Willy.

> > I'm not sure to like this feature in its current implementation.
> > I fear it will also create some new issues depending on how people
> > will use it.

Indeed it should be use with care.
But for me it's as dangerous as the '--' option as '--' had clearly
been implemented to be used with bash globling.
However with '--' the sysadmin can filter himself the files list ; it
can't with my patch.

> > For example, I know lots of sysadmin who have the (bad) habit to
> > make backup of the configuration files in the same directory,
> > without cleaning it up. We may see some directories like this :
> > 
> > service1.cfg
> > service2.cfg
> > service2.cfg~
> > service3.cfg.20160509
> > service4.cfg-19980101
> > service5.cfg
> > service5.cfg.old
> > service6.cfg.disabled
> > 
> > ...and so on.
> > 
> > When several sysadmins share the same haproxy instance, it can
> > quickly
> > become annoying.
> > 
> > Other use cases I immediately see :
> > - some configurations provide the crt files in the same directory,
> > which will break things
> > - some others will store map files in the same directory also
> > - what about configurations with a README or similar in the
> > directory ? or swap files because someone else is editing a file at
> > the same time ?

The last point is a very good one I think, swap files can easily be
forgotten.
The previous ones are more controversial for me as with my patch the
directory itself become a configuration "file". If sysadmin put "trash"
in it, it's the same as if he put "trash" in a configuration file… it's
not haproxy's fault if it fail.

However, I agree that we should implement some safeguards.

> I think that before going further we should start by trying to
> define what we want to see and what we don't want.
>  Maybe a solution could be to at least impose a file name extension
> (eg: .cfg), and I'm not sure it's enough. For example what should we
> do with symlinks, some will prefer to follow them, others not to.
> Most likely we should skip all dot files, etc.
> I think the discussion should go on before we go further with the
> code.

OK.

For me we should add a filter on file name ; keeping only ending with
".cfg" and not starting with ".".
I vote for following symlinks, as the implementation currently does.
It means less work for me :-) … Joking aside, I don't see any point
against it and sysadmins will assume it does except if it's explicitly
said in the docs (docs which I should complet regarding this point).
-- 
Regards
Maxime de Roucy

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to