CA-205199: Reattaching an SR fails with error "The SR is not attached"

Set the name and description of the SR after the PBDs have been created and plugged.

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2016-03-30 15:39:00 +01:00
parent 5724885f1f
commit bb434db027

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;
}
}