Bug 764088 (GLUSTER-2356) - Preserve user changes when updating volfiles
Summary: Preserve user changes when updating volfiles
Keywords:
Status: CLOSED DUPLICATE of bug 763746
Alias: GLUSTER-2356
Product: GlusterFS
Classification: Community
Component: cli
Version: mainline
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: tcp
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-02 15:06 UTC by Jeff Darcy
Modified: 2011-06-27 12:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.