Open
Description
If common storage of XCP cluster implements feature VDI_ATTACH_OFFLINE, HA cannot be activated. It happens because of bug in script /opt/xensource/bin/static-vdis
.
if feature VDI_ATTACH_OFFLINE is declared in the storage plugin, in function add(session, vdi_uuid, reason)
in line 106 of the script, it tries to execute command sr = sr_attach(ty, device_config)
(in line 152) to attach vdi with metadata required for HA. But variable device_config
is not initialized properly before call. It has no keys required by the storage plugin API for attaching vdi.
Sample of trackback:
#012 File "/usr/libexec/xapi-storage-script/volume/org.xen.xapi.storage.rbdsr/SR.attach", line 178, in attach
#012 configuration['sr_uuid'])#012KeyError: 'sr_uuid'#012Traceback (most recent call last):
#012 File "/usr/libexec/xapi-storage-script/volume/org.xen.xapi.storage.rbdsr/SR.attach", line 343, in <module>
#012 cmd.attach()
#012 File "/usr/lib/python2.7/site-packages/xapi/storage/api/v4/volume.py", line 1373, in attach
#012 raise e#012KeyError: 'sr_uuid'#012Traceback (most recent call last):
#012 File "/opt/xensource/bin/static-vdis", line 323, in <module>
#012 add(session, sys.argv[2], sys.argv[3])
#012 File "/opt/xensource/bin/static-vdis", line 152, in add
#012 sr = sr_attach(ty, device_config)