While implementing a new form of network configuration persistence I needed a 
way to run 'upgrade code'.
That is, I need the ability to run a piece of code exactly once, on the first 
boot of VDSM.

My use case is related to unified network persistence - We intend to persist 
network information
in a new format, and on the first run of a new VDSM that contains unified 
network persistence code,
it needs to inspect the kernel state and construct the data in the new format. 
From then on,
it will be persisted and updated when the setupNetworks verb is received. The 
upgrade code, then,
needs to run only once.

Instead of implementing a unique and custom solution I thought to introduce a 
very simple and flexible
upgrade mechanism which suits my needs.
http://gerrit.ovirt.org/#/c/17726/

And the following patch is the actual upgrade code, which demonstrates how the 
upgrade mechanism is used:
http://gerrit.ovirt.org/#/c/18425/

Clarification: This upgrade mechanism is not related to yum upgrade in any way.

Infra guys (And everyone else) - Any feedback is welcome. Thanks!
_______________________________________________
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel

Reply via email to