Supervisord export removes too many files
phlundblom opened this issue · comments
Per-Henrik Lundblom commented
Noticed that forman exports resulted in missing files on our servers:
$ ls /etc/supervisor/conf.d
a.conf
a-b.conf
a-c.conf`
$ foreman export supervisord /etc/supervisor/conf.d --app a ...
[foreman export] cleaning up: /etc/supervisor/conf.d/a.conf
[foreman export] cleaning up: /etc/supervisor/conf.d/a-b.conf
[foreman export] cleaning up: /etc/supervisor/conf.d/a-c.conf
[foreman export] writing: a.conf
Seems like there is a too eager wildcard in lib/foreman/export/supervisord.rb:
Dir["#{location}/#{app}*.conf"].each do |file|
David Dollar commented
Definitely seems like a problem. Interested in submitting a PR to fix it?