[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Locking for temporary ad-hoc changes?
From: |
David Masterson |
Subject: |
RE: Locking for temporary ad-hoc changes? |
Date: |
Thu, 3 Nov 2005 11:59:16 -0800 |
Wil Cooley wrote:
> 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.
Sounds like you should setup your "update.conf" to do something like the
following:
1. Check if the master config files are newer than the local one -- copy if
necessary.
2. Check if /var/cfengine/config config files are newer than the local one --
copy if necessary.
3. Check if /var/cfengine/inputs config files are newer than
/var/cfengine/configs -- copy if necessary.
Then, if you need to make a local change, modify the file in
/var/cfengine/config and let cfagent pick it up on it's next run.
--
David Masterson
VMware, Inc.
Palo Alto, CA
- Locking for temporary ad-hoc changes?, Wil Cooley, 2005/11/03
- RE: Locking for temporary ad-hoc changes?,
David Masterson <=
- RE: Locking for temporary ad-hoc changes?, David Masterson, 2005/11/03
- RE: Locking for temporary ad-hoc changes?, Wil Cooley, 2005/11/03
- RE: Locking for temporary ad-hoc changes?, Mark Burgess, 2005/11/04
- RE: Locking for temporary ad-hoc changes?, Wil Cooley, 2005/11/04
- RE: Locking for temporary ad-hoc changes?, Mark Burgess, 2005/11/05
- RE: Locking for temporary ad-hoc changes?, Wil Cooley, 2005/11/07
- Message not available
- Re: Locking for temporary ad-hoc changes?, Frank Ranner, 2005/11/15
RE: Locking for temporary ad-hoc changes?, David Masterson, 2005/11/04
RE: Locking for temporary ad-hoc changes?, Martin, Jason H, 2005/11/07