On Jan 29, 2009, at 3:55 AM, Dan Bode wrote:
> (I posted this yesterday and never saw it appear in the group)
> dependency question:
>
> I want to require that Package{ruby-shadow} is installed if its not
> there on Redhat. This package is in Yum-repo which has some
> dependency requires for files owned by root, so I have created the
> circular reference
>
> user{root:password} -> Package[ruby-shadow] -> Class["yum"]
(has
> files that are owned by root) -> User[root]
>
> Are there ways to fix situations where the autorequires don''t
allow
> me to do something? Or do I have to work around them?
>
> (for example, if I want to customize the root user, files owned by
> root don''t have to wait for this)
At this point the only way to work around an automatic relationship is
by specifying its exactly opposite. That is, Puppet will not add an
automatic relationship if it causes a direct cycle: if A depends on B,
then Puppet will not make B depend on A.
Here you''ve got a cycle, but it''s a multi-resource cycle, so
Puppet
doesn''t catch it.
Cycle-checking is actually a pretty expensive process - there''s no
real way we could do it for every automatic relationship, I think.
Hmm. Actually, we don''t care about any cycle, all we care about is if
a given pair of resources would be in a cycle; that wouldn''t be nearly
as expensive in general. We could think about adding that to the
system, being conscious of its performance cost -- it should be easy
to disable if it''s too expensive.
--
If a dog jumps onto your lap it is because he is fond of you; but if a
cat does the same thing it is because your lap is warmer.
-- Alfred North Whitehead
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---