Ganeti did not record the status of instance disks (active/inactive) explicitly until now. Instead, the status was inferred from the instance status (running/ADMIN_down/etc.). This led to problems when the disks of an instance were active (through a gnt-instance activate-disks) and then one of the nodes rebooted. In this case, disks were not re-activated automatically, which is especially bad in the case of DRBD, where the non-rebooting node ended up in WFConnection state.
This patch series introduces a new instance attribute called disks_active. This flag records if the disks of an instance should be active or not. cfgupgrade is updated to being able to upgrade to the new format (2.9) too. Finally, watcher makes use of the new flag to restore the disk state after a reboot. Thomas Thrainer (4): Add disks_active to configuration Let cfgupgrade handle disks_active Make the disks_active flag queryable Re-activate previously active disks in watcher UPGRADE | 8 +- lib/cmdlib.py | 187 +++++++++++++++++++-------------------- lib/config.py | 45 ++++++++-- lib/masterd/iallocator.py | 1 + lib/objects.py | 2 + lib/query.py | 3 + lib/watcher/__init__.py | 16 ++-- src/Ganeti/Objects.hs | 1 + test/hs/Test/Ganeti/Objects.hs | 2 +- test/py/cfgupgrade_unittest.py | 56 ++++++++---- test/py/ganeti.query_unittest.py | 8 ++ tools/cfgupgrade | 152 +++++++++++++++++++------------ 12 files changed, 293 insertions(+), 188 deletions(-) -- 1.8.2.1
