Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No require for File: sites-enabled and sites-available folders #894

Closed
ubellavance opened this issue Oct 3, 2016 · 7 comments
Closed

No require for File: sites-enabled and sites-available folders #894

ubellavance opened this issue Oct 3, 2016 · 7 comments
Assignees

Comments

@ubellavance
Copy link

Hi,

I think that this module lacks a set of require directives for the sites-enabled and sites-available folders. On ther first puppet run on a freshly installed VM, the puppet run doesn't complete if puppet choses to create the files before the directory.

Error: Could not set 'file' on ensure: No such file or directory - /etc/opt/rh/rh-nginx18/nginx/sites-available/atqtestssl.traceability.ca.conf20161003-4240-zx4832
Error: Could not set 'file' on ensure: No such file or directory - /etc/opt/rh/rh-nginx18/nginx/sites-available/atqtestssl.traceability.ca.conf20161003-4240-zx4832
Wrapped exception:
No such file or directory - /etc/opt/rh/rh-nginx18/nginx/sites-available/atqtestssl.traceability.ca.conf20161003-4240-zx4832
Error: /Stage[main]/Nginx/Nginx::Resource::Vhost[atqtestssl.traceability.ca]/Concat[/etc/opt/rh/rh-nginx18/nginx/sites-available/atqtestssl.traceability.ca.conf]/File[/etc/opt/rh/rh-nginx18/nginx/sites-available/atqtestssl.traceability.ca.conf]/ensure: change from absent to file failed: Could not set 'file' on ensure: No such file or directory - /etc/opt/rh/rh-nginx18/nginx/sites-available/test.example.com.conf20161003-4240-zx4832

Please note that I use non-standard folders location because I use the rh-nginx18 package from Red Hat Software Collections, but I think that the module shouldn't assume that the sites-available and sites-enabled folders exist.

If I run puppet a second time, it works OK.

@wyardley
Copy link
Collaborator

wyardley commented Oct 8, 2016

I think something like the attached might resolve it
vhost_patch.txt

Presumably #878 would resolve your issue (just in a different way), right? Not 100% sure this would be totally compatible with that. Have you figured out how to test that one yet?

@ubellavance
Copy link
Author

I tested it once and it went OK, no error at all. Without the patch it failed the every time the 5-6 times that I tried. I'll try to test a few other times. I simply rollback to a snapshot that is just before the first puppet run. It looks like you've done a very good job again.

@wyardley
Copy link
Collaborator

wyardley commented Oct 9, 2016

Cool, #906 is there and is passing tests, so after I get some more feedback on it, should be able to get it merged.

@ubellavance
Copy link
Author

I tested it many times and no error.

@bastelfreak
Copy link
Member

Hi @ubellavance, I merged the PR from @wyardley. I guess we can close this PR?

@ubellavance
Copy link
Author

@bastelfreak Of course, thanks!

@wyardley
Copy link
Collaborator

BTW, this didn't do the same for conf.stream.d (presumably used much less often). I snuck a fix for that in #878.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants