-
-
Notifications
You must be signed in to change notification settings - Fork 881
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
Circular Dependency Error When referenced from another module #244
Comments
If I remove this line:
I get a seemingly never ending cycle of different errors, like this: First run: Error: Failed to apply catalog: Could not find dependent Class[Nginx::Service] for File[/etc/nginx/conf.d/local_app-upstream.conf] at /var/lib/puppetdata/staging/modules/nginx/manifests/resource/upstream.pp:57 Second run (no change): Error: Failed to apply catalog: Could not find dependent Class[Nginx::Service] for File[/var/lib/puppet/concat/sites-available{hostname}.conf/fragments.concat.out] at /var/lib/puppetdata/staging/modules/concat/manifests/init.pp:218 Third run (no change): Error: Failed to apply catalog: Could not find dependent Class[Nginx::Service] for File[/sites-available/{hostname}.conf] at /var/lib/puppetdata/staging/modules/concat/manifests/init.pp:228 Fourth Run (no change): Error: Failed to apply catalog: Could not find dependency Class[Nginx] for Nginx::Resource::Upstream[local_app] at /var/lib/puppetdata/staging/modules/localproxy/manifests/init.pp:16 |
Hi, I believe I solved this problem by replacing this line:
With these lines:
I'm not sure if that is considered a bug or expected behavior, but it seems to work. I hope this note is useful for others too. |
I am having the same problem (unrolled below for easier reading)... err: Could not apply complete catalog: Found 1 dependency cycle:
( Anchor[nginx::end]
=> Class[Nginx]
=> Nginx::Resource::Vhost[vhost-searchhub]
=> File[vhost-searchhub.conf symlink]
=> Service[nginx]
=> Class[Nginx::Service]
=> Anchor[nginx::end] ) Seems like nothing I do breaks this dependency cycle. Even unrolling the |
I am hitting the same issue since recently, after experimenting a bit with different versions it seems 0.2.2 works fine for me but 0.2.3 triggers this. |
@shadone @bluecurio I've opened #609 to track your issue, which isn't the same as the one originally reported. @jbcpollak are you still having problems here? I saw you have a workaround and the work to fix #609 is likely to improve the situation as well so if I don't hear back in a few days I'll close this. |
I'm closing this for now. @jbcpollak please comment if you have any information to add and I'll reopen. Thanks! |
Hello,
I am using heira to manage my system configs, and have found multiple of my systems need a local nginx proxy, so I created a module with an init.pp that looks like this:
When I run puppet, I get this error:
Error: Could not apply complete catalog: Found 1 dependency cycle:
(Anchor[nginx::end] => Class[Nginx] => Nginx::Resource::Upstream[local_app] => File[/etc/nginx/conf.d/local_app-upstream.conf] => Class[Nginx::Service] => Service[nginx] => Class[Nginx::Service] => Anchor[nginx::end])
Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz
I have gone in circles (fitting I suppose), but am unable to figure out how to break this dependency cycle correctly.
The text was updated successfully, but these errors were encountered: