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.
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to