Bug 764088 (GLUSTER-2356)

Summary: Preserve user changes when updating volfiles
Product: [Community] GlusterFS Reporter: Jeff Darcy <jdarcy>
Component: cliAssignee: tcp
Status: CLOSED DUPLICATE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: mainlineCC: amarts, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Darcy 2011-02-02 15:06:12 UTC
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.

Comment 1 Amar Tumballi 2011-06-27 09:13:44 UTC

*** This bug has been marked as a duplicate of bug 2014 ***