Merge pull request #918 from MihaelaStoica/CA-205199

CA-205199: Reattaching an SR fails with error "The SR is not attached"
This commit is contained in:
Gabor Apati-Nagy 2016-04-04 15:32:59 +01:00
commit b6c52cccd5

View File

@ -73,12 +73,8 @@ namespace XenAdmin.Actions
log.DebugFormat("description = '{0}'", description);
Description = Messages.ACTION_SR_ATTACHING;
// Update the name and description of the SR
XenAPI.SR.set_name_label(Session, sr.opaque_ref, name);
XenAPI.SR.set_name_description(Session, sr.opaque_ref, description);
// Now repair the SR with new PBDs for each host in the pool
// Repair the SR with new PBDs for each host in the pool
PBD pbdTemplate = new PBD();
pbdTemplate.currently_attached = false;
pbdTemplate.device_config = dconf;
@ -102,6 +98,10 @@ namespace XenAdmin.Actions
PollToCompletion(PercentComplete, PercentComplete + delta);
}
// Update the name and description of the SR
XenAPI.SR.set_name_label(Session, sr.opaque_ref, name);
XenAPI.SR.set_name_description(Session, sr.opaque_ref, description);
Description = Messages.ACTION_SR_ATTACH_SUCCESSFUL;
}
}