How do you deal with dependency cycles around things like the root user? I''m ending up defining files with uid=>0,gid=>0 rather than root, root just to avoid dependancy cycles. -- Jo Rhett Net Consonance : net philanthropy to improve open source and internet projects. -- 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.
Hi, What does the root user depend on that you''re getting in to dependency cycles over? Cheers, On Thu, 2012-06-14 at 12:24 -0700, Jo Rhett wrote:> How do you deal with dependency cycles around things like the root > user? I''m ending up defining files with uid=>0,gid=>0 rather than > root, root just to avoid dependancy cycles.-- Stephen Gran Senior Systems Integrator - guardian.co.uk Please consider the environment before printing this email. ------------------------------------------------------------------ Visit guardian.co.uk - newspaper of the year www.guardian.co.uk www.observer.co.uk www.guardiannews.com On your mobile, visit m.guardian.co.uk or download the Guardian iPhone app www.guardian.co.uk/iphone To save up to 30% when you subscribe to the Guardian and the Observer visit www.guardian.co.uk/subscriber --------------------------------------------------------------------- This e-mail and all attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender and delete the e-mail and all attachments immediately. Do not disclose the contents to another person. You may not use the information for any purpose, or store, or copy, it in any way. Guardian News & Media Limited is not liable for any computer viruses or other material transmitted with or as part of this e-mail. You should employ virus checking software. Guardian News & Media Limited A member of Guardian Media Group plc Registered Office PO Box 68164 Kings Place 90 York Way London N1P 2AP Registered in England Number 908396 -- 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.
It doesn''t, but many things in stage Main depend on the root user. It appears that a user can only exist and be depended on in a single stage, and that hardly makes sense for users like root... On Jun 14, 2012, at 12:28 PM, Stephen Gran wrote:> What does the root user depend on that you''re getting in to dependency > cycles over? > > Cheers, > > On Thu, 2012-06-14 at 12:24 -0700, Jo Rhett wrote: >> How do you deal with dependency cycles around things like the root >> user? I''m ending up defining files with uid=>0,gid=>0 rather than >> root, root just to avoid dependancy cycles. > > > -- > Stephen Gran > Senior Systems Integrator - guardian.co.uk > > Please consider the environment before printing this email. > ------------------------------------------------------------------ > Visit guardian.co.uk - newspaper of the year > > www.guardian.co.uk www.observer.co.uk www.guardiannews.com > > On your mobile, visit m.guardian.co.uk or download the Guardian > iPhone app www.guardian.co.uk/iphone > > To save up to 30% when you subscribe to the Guardian and the Observer > visit www.guardian.co.uk/subscriber > --------------------------------------------------------------------- > This e-mail and all attachments are confidential and may also > be privileged. If you are not the named recipient, please notify > the sender and delete the e-mail and all attachments immediately. > Do not disclose the contents to another person. You may not use > the information for any purpose, or store, or copy, it in any way. > > Guardian News & Media Limited is not liable for any computer > viruses or other material transmitted with or as part of this > e-mail. You should employ virus checking software. > > Guardian News & Media Limited > > A member of Guardian Media Group plc > Registered Office > PO Box 68164 > Kings Place > 90 York Way > London > N1P 2AP > > Registered in England Number 908396 > > -- > 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. >-- Jo Rhett Net Consonance : net philanthropy to improve open source and internet projects. -- 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.
I organize the root user in the first stage (before apt-get update!) and then everything else in a subsequent stage. Later I found out that puppet will write files as root:root, 0644 in the default configuration. That meant I could remove many owner, group, mode attributes from my file declarations. It removed many implicit dependencies upon the root user resource and sped up my puppet runs a great deal. On Thu, Jun 14, 2012 at 12:24:40PM -0700, Jo Rhett wrote:> How do you deal with dependency cycles around things like the root user? > I''m ending up defining files with uid=>0,gid=>0 rather than root, root > just to avoid dependancy cycles. > -- > Jo Rhett > Net Consonance : net philanthropy to improve open source and internet > projects. > > -- > 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.-- 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.
My quick take is that declaring this: user { ''root'': } Means that suddenly every file resource which says this... owner => root ...now implicitly depends on that user resource. So unless you use require => User[''root''] in your owner=>root file resources, things will break as some resources will fail when they are configured before the root user. I encountered this behaviour in 2.6.2, haven''t checked in later versions if this still holds true. On Thu, Jun 14, 2012 at 12:31:01PM -0700, Jo Rhett wrote:> It doesn''t, but many things in stage Main depend on the root user. It > appears that a user can only exist and be depended on in a single stage, > and that hardly makes sense for users like root... > On Jun 14, 2012, at 12:28 PM, Stephen Gran wrote: > > What does the root user depend on that you''re getting in to dependency > cycles over? > > Cheers, > > On Thu, 2012-06-14 at 12:24 -0700, Jo Rhett wrote: > > How do you deal with dependency cycles around things like the root > > user? I''m ending up defining files with uid=>0,gid=>0 rather than > > root, root just to avoid dependancy cycles. > > -- > Stephen Gran > Senior Systems Integrator - [1]guardian.co.uk > > Please consider the environment before printing this email. > ------------------------------------------------------------------ > Visit [2]guardian.co.uk - newspaper of the year > > [3]www.guardian.co.uk [4]www.observer.co.uk > [5]www.guardiannews.com > > On your mobile, visit [6]m.guardian.co.uk or download the Guardian > iPhone app [7]www.guardian.co.uk/iphone > > To save up to 30% when you subscribe to the Guardian and the Observer > visit [8]www.guardian.co.uk/subscriber > --------------------------------------------------------------------- > This e-mail and all attachments are confidential and may also > be privileged. If you are not the named recipient, please notify > the sender and delete the e-mail and all attachments immediately. > Do not disclose the contents to another person. You may not use > the information for any purpose, or store, or copy, it in any way. > > Guardian News & Media Limited is not liable for any computer > viruses or other material transmitted with or as part of this > e-mail. You should employ virus checking software. > > Guardian News & Media Limited > > A member of Guardian Media Group plc > Registered Office > PO Box 68164 > Kings Place > 90 York Way > London > N1P 2AP > > Registered in England Number 908396 > > -- > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > To post to this group, send email to [9]puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > [10]puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > [11]http://groups.google.com/group/puppet-users?hl=en. > > -- > Jo Rhett > Net Consonance : net philanthropy to improve open source and internet > projects. > > -- > 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. > > References > > Visible links > 1. http://guardian.co.uk/ > 2. http://guardian.co.uk/ > 3. http://www.guardian.co.uk/ > 4. http://www.observer.co.uk/ > 5. http://www.guardiannews.com/ > 6. http://m.guardian.co.uk/ > 7. http://www.guardian.co.uk/iphone > 8. http://www.guardian.co.uk/subscriber > 9. mailto:puppet-users@googlegroups.com > 10. mailto:puppet-users+unsubscribe@googlegroups.com > 11. http://groups.google.com/group/puppet-users?hl=en-- 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.
On Jun 14, 2012, at 12:33 PM, Christopher Wood wrote:> I organize the root user in the first stage (before apt-get update!) and then everything else in a subsequent stage.Yep, this turns out to be the answer. More cyclic problems here but I''ve worked through those. -- Jo Rhett Net Consonance : net philanthropy to improve open source and internet projects. -- 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.
On Thursday, June 14, 2012 2:24:40 PM UTC-5, Jo wrote:> > How do you deal with dependency cycles around things like the root user? > I''m ending up defining files with uid=>0,gid=>0 rather than root, root > just to avoid dependancy cycles. >I avoid run stages. They provide nothing that you cannot also get via ordinary resource relationships (sometimes with more effort), yet they are notorious for problems such as the dependency cycles you mentioned. You need at least to recognize that stages are a rather blunt tool, and sometimes you need more precision than stages can provide. And sometimes you don''t need that precision *now*, but you will in the future. If you must use stages then it is best to minimize the number of stages, and to keep as much as possible in the main stage. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/CLB2hMs6jfEJ. 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.