Red Hat Bugzilla – Bug 764088
Preserve user changes when updating volfiles
Last modified: 2011-06-27 08:13:44 EDT
This is an enhancement that would be particularly beneficial for CloudFS, but also useful for anyone else who has made local changes to their volfiles. Right now, any time the user invokes "gluster volume set" a new set of volfiles is generated from the "info" file and completely overwrites the volfiles that existed before. At the very least, the user-modified volfiles should be saved. The next level of functionality would be to do a "git rebase" type of sequence instead of a simple overwrite. For each volfile affected:
(1) Re-generate the original (pre-operation) volfile into a temp file.
(2) Diff temp file vs. current to generate a patch.
(3) Apply "volume set" changes.
(4) Generate the new (post-operation) volfile.
(5) Apply the previously generated patch to the new volfile.
This could fail in some (quite a few) cases, but presents no danger at all to those who don't modify volfiles by hand and no greater danger than currently to those who do. The "ultimate" solution would be to allow specification of external scripts to be run whenever volfiles change, to re-apply external changes (e.g. CloudFS's) at a higher semantic level.
I'll probably be working on some of these changes myself, and welcome any input you might have on what forms of this you might be interested in incorporating.
*** This bug has been marked as a duplicate of bug 2014 ***