Hi Thomas,

On 12:02 Wed 02 Oct     , Thomas Thrainer wrote:
> While cluster upgrades will work this way, other operations will almost
> certainly still fail.
> As mentioned in the bug, disk.dev_type changed to use the DT_* constants
> instead of the LD_* constants. So in various places throughout the code we
> compare disk.dev_type with DT_DRBD8, which happens to be "drbd". So all
> those checks would stop to work.
> 
> The real solution would be to update disk.dev_type to constants.DT_DRBD8 if
> it was "drbd8" during the upgrade (and change it back during the
> downgrade), and verify that LDS_DRBD is no longer used in the codebase (as
> it should have been removed with all the other LD_* constants).
> 
> Ideally this change of dev_type would not happen in ChangeNodeIndices, but
> in another function which runs prior to this one (otherwise the change is a
> bit hidden in cfgupgrade).

AFAICT, disks are automatically upgraded as part of 
objects.Disk.UpgradeConfig(), which is eventually run on every 
configuration open. So this issue likely only affects cfgupgrade, 
because it accesses the configuration as raw JSON, before the various 
UpgradeConfig() methods are run. I also confirm that my test config ends 
up mentioning "drbd" dev_types and not "drbd8".

As for the downgrade, yes there is no provision right now and drbd8 
should be converted back to drbd8 at downgrade.

Cheers,
Apollon

Reply via email to