PUPPET: Find 1 dependency loop

I received this error when applying my Puppet list:

Error: Could not apply complete catalog: Found 1 dependency cycle:
(Exec[pip install requirements] => File[change venv permissions] => File[enforce MinGW compiler] => Exec[pip install requirements])
Try the'--graph 'option and opening the resulting'.dot' file in OmniGraffle or GraphViz

This is my Puppet list (relevant part), I don’t see any dependency cycles. Any ideas?

exec {'create virtualenv':
command => "$install_dir/Scripts/virtualenv.exe venv",
cwd => $project_dir,
require => Exec['install virtualenv'],
}

file {"fix Mingw32CCompiler":
path => "C:/Python27/Lib/ distutils/cygwinccompiler.py",
content => template($cygwinc_template),
ensure => present,
require => Exec['create virtualenv'],
}< br />
file {"enforce MinGW compiler":
path => "$project_dir/venv/Lib/distutils/distutils.cfg",
owner => $user,
content => $mingw,
ensure => present,
require => File['fix Mingw32CCompiler'],
}

exec {'pip install requirements ':
timeout => 1200,
command => "$project_dir/venv/Scripts/pip.exe install -r $project_dir/requirements.txt",
require => File[' enforce MinGW compiler'],
}

file {'change venv permissions':
path => "$project_di r/venv",
recurse => true,
owner => $user,
mode => 0770,
require => Exec['pip install requirements'],< br />}

In the puppet file, there are implicit requirements for any parent directories declared .

Valid:

File['change venv permissions'] -> File['enforce MinGW compiler']

< p>So the parent needs exec, exec needs the child, and the child needs the parent, creating a loop.

I receive this error when applying my Puppet manifest :

Error: Could not apply complete catalog: Found 1 dependency cycle:
(Exec[pip install requirements] => File[change venv permissions] => File[enforce MinGW compiler] => Exec[pip install requirements])
Try the'--graph' option and opening the resulting'.dot' file in OmniGraffle or GraphViz

This It’s my Puppet list (relevant part), I don’t see any dependency cycles. Any ideas?

exec {'create virtualenv':
command => "$install_dir/Scripts/virtualenv.exe venv",
cwd => $project_dir,
require => Exec['install virtualenv'],
}

file {"fix Mingw32CCompiler":
path => "C:/Python27/Lib/ distutils/cygwinccompiler.py",
content => template($cygwinc_template),
ensure => present,
require => Exec['create virtualenv'],
}< br />
file {"enforce MinGW compiler":
path => "$project_dir/venv/Lib/distutils/distutils.cfg",
owner => $user,
content => $mingw,
ensure => present,
require => File['fix Mingw32CCompiler'],
}

exec {'pip install requirements ':
timeout => 1200,
command => "$project_dir/venv/Scripts/pip.exe install -r $project_dir/requirements.txt",
require => File[' enforce MinGW compiler'],
}

file {'change venv permissions':
path => "$project_dir/ venv",
recurse => true,
owner => $user,
mode => 0770,
require => Exec['pip install requirements'],
}

In the puppet file, there are implicit requirements for any parent directory declared.

Valid:< /p>

File['change venv permissions'] -> File['enforce MinGW compiler']

So the parent needs exec, exec needs children, and The child needs the parent to create a loop.

Leave a Comment

Your email address will not be published.