Hello developers,
I am working on extension of the StorPool addon to enable support for the system datastore. I am not sure what is the proper way to handle the checkpoint file. I found that it is created via vmm/save and used by vmm/restore script.
To achieve integration I see few solutions but can not determine which one to take:
-
do changes in the files and keep them in our addon
pros: looks easy to create a patch
cons: not compatible with upgrade -
clone all vmm hooks to our addon with separate name something like ‘vmm/kvm-storpool’
pros: upgrade independant
cons: extra work to keep things in sync with upstream. probability to keep different versions for each release -
propose feature with patch to add pre/post includes in the above scripts(probably to other too) as upstream solution.
pros: upgrade independent - extra files not touched on upgrade
cons: should walk the entire path to become mainstream solution
Something like this:
# just after after arguments processing
[ -f “$0.pre” ] && . “$0.pre”
…
# at the end
[ -f “$0.post”] && . “$0.post”
What is your opinion on the topic?
Best Regards,
Anton