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
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.
And the following patch is the actual upgrade code, which demonstrates how the
upgrade mechanism is used:
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