If I have an operation, such as an RPM install, and I have certain mounts that are read-only, how should I go about making sure that they are read write prior to an update? For example: 1. Re-mount file systems as read write. 2. Perform RPM updates 3. Re-re-mount file systems as read only. I got to thinking about this when I saw the post about automatic remounting after changing mount options. Thank you, -- Rob -- ____________________________________________________________________________________ We won''t tell. Get more on shows you hate to love (and love to hate): Yahoo! TV''s Guilty Pleasures list. http://tv.yahoo.com/collections/265 _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Fri, 2007-01-19 at 12:44 -0800, Robert Mombro wrote:> If I have an operation, such as an RPM install, and I have certain > mounts that are read-only, how should I go about making sure that they > are read write prior to an update? > > For example: > > 1. Re-mount file systems as read write. > 2. Perform RPM updates > 3. Re-re-mount file systems as read only. > > I got to thinking about this when I saw the post about automatic > remounting after changing mount options.I am not sure that puppet is the best tool to describe that - puppet is more concerned with describing a ''steady state'' of a system, not so much sequencing actions. I would write a wrapper around rpm that does the remounting of file systems as appropriate - you could then write a simple package provider based on the yum or rpm provider that runs your wrapper, so that in your manifest you can say package { httpd: ensure => latest, provider => mywrapper } David
On Jan 19, 2007, at 2:44 PM, Robert Mombro wrote:> If I have an operation, such as an RPM install, and I have certain > mounts that are read-only, how should I go about making sure that > they are read write prior to an update? > > For example: > > 1. Re-mount file systems as read write. > 2. Perform RPM updates > 3. Re-re-mount file systems as read only. > > I got to thinking about this when I saw the post about automatic > remounting after changing mount options.The remount thing is different, because it''s the mount responding to its own changes, whereas here you''ve got a filesystem reacting to changes in an rpm, both before and after the changes, which is quite different. It''s pretty unlikely that Puppet will ever directly support this. I''m toying with mechanisms for having hooks at state transitions, but I''m a good ways out on having any idea on how to do this. And this would often work in ways you really didn''t want -- if you were upgrading 100 packages, then you''d get 100 remounts. Most likely, if you''re really committed to having your filesystems mounted ro (which really isn''t much of a security step -- if people can write to files owned by root, they can probably remount the filesystem rw), then you should probably remount it rw during the puppet run and then remount ro after the run. -- I have never met a man so ignorant that I couldn''t learn something from him. --Galileo Galilei --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com