[pve-devel] about nexentaplugin eval
Alexandre DERUMIER
aderumier at odiso.com
Mon Sep 17 11:18:14 CEST 2012
Hi, I just see you remove
- eval { nexenta_create_zvol($name, $size, $scfg); };
- sleep 1;
- eval { nexenta_create_lu($name, $scfg); };
- sleep 1;
- nexenta_add_lun_mapping_entry($name, $scfg);
+ nexenta_create_zvol($scfg, $name, $size);
+ nexenta_create_lu($scfg, $name);
+ nexenta_add_lun_mapping_entry($scfg, $name);
eval are here, if something goes wrong at last step, nexenta_add_lun_mapping_entry,
and ifyou retry to create disk again,
if no eval, it will hang at step1.
(Or we need to implement a delete_lu, delete_zvol if something goest wrong, but they could fail too)
I look at openstack nexenta plugin, they do it in the same way.
More information about the pve-devel
mailing list