I too am having problems with using stages while managing the root user in a resource. The errors I am getting which spit out the resource relationships reflect a <pre_stage_resource> => User[root] and User[root] => <pre_stage_resource> pair.
There must be something implicit about managing user "root" such that nearly all other resources depend on it. I suppose this can be gotten around by managing the root user's properties in other ways (i.e. with nasty execs and what not), but I think it's reasonable to expect that many Puppet users, like myself and those in this thread, would like to use a normal User resource in keeping with Puppet principles. Another solution I guess is to always put the root user resource in the earliest stage -- probably what I will end up doing. For that matter, one's entire user/account class may be put in the pre stage. -Kent On Apr 18, 11:15 am, jcbollinger <john.bollin...@stjude.org> wrote: > On Apr 18, 2:36 am, Alexander Bien <ab...@nbmc.de> wrote: > > > > > > > > > > > >> The problem it's that when I run the class with stages it fails with a > > >>dependencycicle. > > > I have a similar problem as the OP of this thread. When i deploy run > > stages to have the class "yum" in the pre stage, it works fine untill i > > "realize" therootuser: > > > realize( > > User["root"], > > Ssh_authorized_key["root"], > > ) > > > Enabling the above line causes the dep cycles as seen in attached > > puppet_depcycle.txt > > > When i remove the realize statement, everything works fine. > > > Also, when i remove run stages it works fine too. > > Then why are you using run stages? I'm serious: what problem do you > hope run stages will solve for you? > > > What could cause this, and how would i go about to debug this further? > > It arises at least because you are managing aroot-owned file that is > assigned to an earlier run stage than the one to which theUser["root"] > resource is assigned. It may not be explicit -- it is > possible that one or more of the resources you declare are causing > additional resources to be declared and managed. > > I haven't made my way all the way through the enormous cyle listing, > but here, at least, is one cycle: > > User[root] => File[/etc/yum/yum.conf], File[/etc/yum/yum.conf] > =>User[root]. > > Knowledge that the cycle was only reported when you realizedUser["root"] > helped me narrow my search by looking only at > dependencies involving thatuser. I was lucky that there is a cycle > involving only two resources; if the minimum cycle length had been > four or more then the cycle would have been much harder to find. > > If you are going to manageuserroot(not unambiguously a good idea) > then you really ought to do it in the earliest run stage, because > everything depends directly or indirectly onroot. > > Also, I would be very surprised if it were not the class that > *declares* a virtual resource, not the one(s) that realizes it, that > determines to which run stage that resource is assigned. If you > assumed the other way around then it might have contributed to > puttingUser["root"] in the wrong stage. > > John -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.