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

Cyclic dependency #127

Closed
negast opened this issue Sep 13, 2019 · 5 comments
Closed

Cyclic dependency #127

negast opened this issue Sep 13, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@negast
Copy link

negast commented Sep 13, 2019

Hello
I'm getting cyclic dependency issues when doing a new install (RHEL7).

I copied the yaml file from the example:

rsyslog::client::global_config:
  FileOwner:
    value: 'root'
    type: legacy
 ......
rsyslog::client::modules:
    imuxsock: {}
    imklog: {}
    
rsyslog::client::legacy_config:
  auth_priv_rule:
    key: "auth,authpriv.*"
    value: "/var/log/auth.log"
    .....

In my profiles I included the following

include rsyslog::client

When running on the node It gave me the following:

Error: Found 1 dependency cycle:
(Concat_file[/etc/rsyslog.d/50_rsyslog.conf] => Concat[/etc/rsyslog.d/50_rsyslog.conf] => Rsyslog::Generate_concat[rsyslog::concat::module::imuxsock] => Concat::Fragment[rsyslog::component::module::imuxsock] => Concat_fragment[rsyslog::component::module::imuxsock] => Concat_file[/etc/rsyslog.d/50_rsyslog.conf])\nCycle graph written to /opt/puppetlabs/puppet/cache/state/graphs/cycles.dot.
Error: Failed to apply catalog: One or more resource dependency cycles detected in graph

Here is the .dot file content

digraph Resource_Cycles {
  label = "Resource Cycles"
"Concat_file[/etc/rsyslog.d/50_rsyslog.conf]" -> "File[/etc/rsyslog.d/50_rsyslog.conf]" -> "Concat[/etc/rsyslog.d/50_rsyslog.conf]" -> "Rsyslog::Generate_concat[rsyslog::concat::module::imuxsock]" -> "Concat::Fragment[rsyslog::component::module::imuxsock]" -> "Concat_fragment[rsyslog::component::module::imuxsock]" -> "Concat_file[/etc/rsyslog.d/50_rsyslog.conf]"
"Concat_file[/etc/rsyslog.d/50_rsyslog.conf]" -> "Concat[/etc/rsyslog.d/50_rsyslog.conf]" -> "Rsyslog::Generate_concat[rsyslog::concat::module::imuxsock]" -> "Concat::Fragment[rsyslog::component::module::imuxsock]" -> "Concat_fragment[rsyslog::component::module::imuxsock]" -> "Concat_file[/etc/rsyslog.d/50_rsyslog.conf]"
}

I fixed this by removing the before statement from the component/module.pp file
/rsyslog/manifests/component/module.pp line 21

rsyslog::generate_concat { "rsyslog::concat::module::${name}":
    confdir => $confdir,
    target  => $target,
   (-)  before  => Concat::Fragment["rsyslog::component::module::${name}"],
  }
@dhollinger dhollinger added the bug Something isn't working label Oct 18, 2019
@dhollinger
Copy link
Member

Going to take a deeper look at this and ensure this isn't a larger issue. What version of puppet are you on?

@negast
Copy link
Author

negast commented Oct 18, 2019

I'm running version 5.5.1

@negast
Copy link
Author

negast commented Nov 7, 2019

I have the same issue on custom config

 rsyslog::generate_concat { "rsyslog::concat::custom_config::${name}":
    confdir => $confdir,
    target  => $target,
    before  => Concat::Fragment["rsyslog::component::custom_config::${name}"],
  }

@dhollinger
Copy link
Member

I have been unable to reproduce the issue in any environment.

@negast
Copy link
Author

negast commented Dec 12, 2019

It seems It was due to an out of date concat and stdlib combo. After I also upgraded those I got an error related to this ticket: https://tickets.puppetlabs.com/browse/MODULES-5802
which I resolved by doing the generate types command: https://puppet.com/docs/puppet/6.10/environment_isolation.html

I'll close this then as it is no longer an issue. Thank you for the help.

@negast negast closed this as completed Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants