rposudnevskiy / RBDSR

RBDSR - XenServer/XCP-ng Storage Manager plugin for CEPH
GNU Lesser General Public License v2.1
58 stars 24 forks source link

sr-introduce: sr_attach, sr_detach, vdi_activate hangs #68

Closed blodone closed 6 years ago

blodone commented 6 years ago

When falsly trying to attach a SR double with RBDSR 2.0 and XenServer 7.2 the SR turns into task hanging when attaching or detaching. Also the VDI attach is not working anymore

when running ps auxwww i see: /usr/bin/python /opt/xensource/sm/RBDSR <methodCall><methodName>sr_detach</methodName><params><param><value><struct><member><name>host_ref</name><value>OpaqueRef:f57a557b-500d-747e-277a-d3ada731556d</value></member><member><name>command</name><value>sr_detach</value></member><member><name>args</name><value><array><data/></array></value></member><member><name>device_config</name><value><struct><member><name>SRmaster</name><value>true</value></member></struct></value></member><member><name>session_ref</name><value>OpaqueRef:e127464c-0cf7-8ece-6f55-7493c4d711c0</value></member><member><name>sr_ref</name><value>OpaqueRef:762d1185-bbc0-7646-0348-1e48501e8d2e</value></member><member><name>sr_uuid</name><value>edcf45e6-ca5b-43f9-bafe-c553b1e5dd84</value></member><member><name>subtask_of</name><value>DummyRef:|ef5d4da5-13be-8c06-fe02-70bd0ac921f7|SR.detach</value></member></struct></value></param></params></methodCall>

I would expect an error when falsly double mounting or a non destructive action to the SR so the mounted SR works on.

blodone commented 6 years ago

now, i cleaned the whole ceph pool, tried to setup only with a single xenserver but the vdi_activate hangs:

root     17464  0.0  0.1  50292  6712 ?        S    12:12   0:00 /usr/sbin/forkexecd
root     17465  0.4  0.4 118588 17184 ?        Ss   12:12   0:01 /usr/bin/python /opt/xensource/sm/RBDSR <methodCall><methodName>vdi_activate</methodName><params><param><value><struct><member><name>host_ref</name><value>OpaqueRef:f57a557b-500d-747e-277a-d3ada731556d</value></member><member><name>command</name><value>vdi_activate</value></member><member><name>args</name><value><array><data><value>true</value></data></array></value></member><member><name>device_config</name><value><struct><member><name>SRmaster</name><value>true</value></member></struct></value></member><member><name>session_ref</name><value>OpaqueRef:5e3f026e-f7b4-a873-4ae6-a0fbfd2b7b2f</value></member><member><name>sr_ref</name><value>OpaqueRef:3d653da1-b35d-e14b-bed9-b5d9419ad603</value></member><member><name>sr_uuid</name><value>edcf45e6-ca5b-43f9-bafe-c553b1e5dd84</value></member><member><name>vdi_ref</name><value>OpaqueRef:f9d0d7ef-34a7-5986-adde-ced305d318e1</value></member><member><name>vdi_location</name><value>725948c1-6c52-4428-a7e6-905355049d72</value></member><member><name>vdi_uuid</name><value>725948c1-6c52-4428-a7e6-905355049d72</value></member><member><name>subtask_of</name><value>DummyRef:|cd8f1661-1756-a826-47fd-eb8d5116c4b8|VDI.activate</value></member><member><name>vdi_on_boot</name><value>persist</value></member><member><name>vdi_allow_caching</name><value>false</value></member></struct></value></param></params></methodCall>

xensource.log

Mar 27 12:30:32 xen-s37 xapi: [error|xen-s37|804 |Async.VM.start R:6054ed28e536|xenops] Re-raising as SR_BACKEND_FAILURE_46 [ ; The VDI is not available [opterr=Failed to map RBD sr_uuid=edcf45e6-ca5b-43f9-bafe-c553b1e5dd84, vdi_uuid=3dc499a7-4e30-4136-b325-aabb33f2f59f,                                                                host_uuid=478089b2-ef3d-4e2d-a711-fbc08c02e376 (['XENAPI_PLUGIN_FAILURE', 'map', 'KeyError', "'dmmode'"])];  ]
Mar 27 12:30:32 xen-s37 xapi: [error|xen-s37|804 ||backtrace] Async.VM.start R:6054ed28e536 failed with exception Server_error(SR_BACKEND_FAILURE_46, [ ; The VDI is not available [opterr=Failed to map RBD sr_uuid=edcf45e6-ca5b-43f9-bafe-c553b1e5dd84, vdi_uuid=3dc499a7-4e30-4136-b325-aabb33f2f59f,                                                                host_uuid=478089b2-ef3d-4e2d-a711-fbc08c02e376 (['XENAPI_PLUGIN_FAILURE', 'map', 'KeyError', "'dmmode'"])];  ])
blodone commented 6 years ago

seems like i installed version 1.0 and switched to version 2.0 but the files did not get updated... had to remove yum repo jewel and some links... a new file (rbd_info) appeared on the pool... gonna do some more testing

-> starting works

blodone commented 6 years ago

closing, it was an error related from 1.0 to 2.0 ... i'll do a pull request with better installation