Ask Your Question

Changing variable leads to dependency cycle - variable leaking ???

asked 2014-02-10 05:16:46 -0600

jaksky gravatar image

updated 2014-02-10 07:24:24 -0600

llowder gravatar image

Hi, after changing a variable (which specifies one resource) a dependency cycle appears. This seems to me really strange. So let me describe it. The error message I am getting is (just taking one example from the detailed list):

"File[/home/hdfs]" -> "Class[Hadoop::Users]" -> "Class[Hadoop::Envvariables]" -> "File[hadoopdirectories]" -> "Class[Hadoop::Envvariables]" -> "Class[Hadoop::Repo]" -> "File[hdprepo]" -> "Class[Hadoop::Repo]" -> "Class[Hadoop::Install]" -> "File[/usr/lib64/]" -> "Class[Hadoop::Install]" -> "Class[Hadoop::Directories]" -> "File[dir_root]" -> "File[/home/hdfs]"

Why I see this a strange is that I changed one variable which defines a root of data directories (to ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-02-10 07:22:11 -0600

llowder gravatar image

Puppet creates an implicit dependency between a folder and its parent if both are managed.

By having Class[Hadoop::Envvariables] manage /home, and Class[Hadoop::Users] managing File[/home/hdfs] that creates an implicit relationship where /home has to be created before /home/hdfs can be created.

You then have an explicit relationship where you try to force /home to be created after /home/hdfs.

You'll have to refactor your code so that either Class[Hadoop::Users] can be applied after Class[Hadoop::Envvariables], or such that Class[Hadoop::Envvariables] does not manage /home.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-02-10 05:16:46 -0600

Seen: 179 times

Last updated: Feb 10 '14