help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Locking for temporary ad-hoc changes?


From: Wil Cooley
Subject: Locking for temporary ad-hoc changes?
Date: Thu, 03 Nov 2005 11:04:37 -0800

One situation I come across all too often is the need to make ad-hoc
changes on a system before pushing them through Subversion and back into
proper place through cfengine.  Apache config files, for example,
sometimes take a few tries to get just right.  My setups are not big or
sophisticated enough to have real test servers, which is fine for the
most part.

What happens is that I'm editing my config file and cfagent makes its
scheduled run, notices the file is changed and the replaces it.  I tend,
as a result, to suspend my editor session while making changes so if it
happens I can resume and rewrite my changed version.  What seems like it
would be fairly straightforward to implement would be a user-initiated
locking mechanism, so that a locked file would not be updated but an
alert generated that the file was wrong date/checksum/etc.  Something
like this:

# cflock /etc/httpd/conf.d/foo.conf
# vi /etc/httpd/conf.d/foo.conf
# cflock -u /etc/httpd/conf.d/foo.conf

(Maybe a 'cflock -l' to list locks would be useful too.)

Of course, getting these changes back to my repo is also on my wishlist,
but much bigger and less straightforward.

Wil
-- 
Wil Cooley <wcooley@nakedape.cc>
Naked Ape Consulting, Ltd

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]