TheSerapher / chef-vsftpd

Basic vsftpd cookbook to manage local users FTP access.
Apache License 2.0
13 stars 28 forks source link

ipchange #12

Closed phoolish closed 9 years ago

phoolish commented 9 years ago

I have an interesting problem. Our IP changed during a reboot. When vsftpd tried to start during boot it silently failed. The Chef run also fails because the IP in the conf file has not been updated and the service gets defined before the conf file. Our temporary solution was to add a service resource to our wrapper cookbook and define ignore_failure. I don't like this approach at all. An alternative might be to add no action to the original service resource declaration and then a second service resource post config to check for enable & start. This should still allow for template changes to notify a delayed restart at the end of the run.

TheSerapher commented 9 years ago

Yes that is indeed an issue. I would assume your solution will work just fine. It doesn't really matter when the service is enabled/started after all.

Will do this and try it out.

phoolish commented 9 years ago

@TheSerapher I think #10 solves this problem.

TheSerapher commented 9 years ago

Woupsie .. Merged it, can you try it out?

phoolish commented 9 years ago

Worked perfectly on test-kitchen and on prod. Thanks for the quick turn around!

TheSerapher commented 9 years ago

My pleasure, cool to see people actually use this ;-) It's one of my earliest works!

phoolish commented 9 years ago

Legacy apps ;)

TheSerapher commented 9 years ago

They don't require a lot of maintenance, but if I do get a ticket why not fix it, right? :beetle: