[DRBD-user] drbd.ocf misinterpreting role status with multiple volumes

Matthias Ferdinand mf at 14v.de
Thu Aug 13 19:35:35 CEST 2015

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hi,

recently we had problems migrating a pacemaker VirtualDomain resource
using a three-volume drbd device.

To be able to do live migration, the drbd volumes are set to be in
primary role on both nodes.

For some reason, on the destination node, only two out of three volumes
were in "Primary" role, and one of them was in "Secondary" role.

As a result, crm_mon showed both nodes in master role. But live
migration signalled failure immediately (device not writeable), and
restart of the VirtualDomain resource on the destination node (after
full shutdown on the source node) also failed (device not writeable).


I think there is a conceptual bug in the DRBD OCF RA with multi-volume.

Function drbd_status() returns $OCF_RUNNING_MASTER if the string
of the local role values _contains_ the keyword "Primary", i.e. if _any_
of the volumes is in the primary role.

This is fine if you check e.g. the effect of a demote operation. When
checking for the success of a promote operation, you should make sure
_all_ of the volumes are in the primary role.


I therefore think drbd_promote() and drbd_demote() should have their own
status functions (or a parametrized one).

Regards
  Matthias Ferdinand
-- 
one4vision GmbH                    Fon +49 681 96727 - 60
Residenz am Schlossgarten          Fax +49 681 96727 - 69
Talstraße 34-42                    info at one4vision.de
D-66119 Saarbrücken                http://www.one4vision.de
HRB 11751                          verantwortl. Geschäftsführer:
Amtsgericht Saarbrücken            Christof Allmann, Christoph Harth



More information about the drbd-user mailing list