Maor Lipchuk has posted comments on this change.

Change subject: core: Allow attach of Storage Domain when retrieve fails
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/29563/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AttachStorageDomainToPoolCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AttachStorageDomainToPoolCommand.java:

Line 215:                                 OvfUtils.getOvfEntities((byte[]) 
retrievedByteData.getReturnValue(),
Line 216:                                         
getParameters().getStorageDomainId());
Line 217:                         isOvfDataRetrieved  = true;
Line 218:                     }
Line 219:                 } catch (RuntimeException e) {
> Yikes! Can't we catch something a bit more fine-grained here?
The thing is that we can get VdsExcetpion from the  RetrieveImageData, but we 
can also get a runtime exception when we untar the file at 
OvfUtils.getOvfEntities.
I can re-extract to twop different methods one for Vds the other for the 
getOvfEntities, but we will still have try catch (x2)
I'm willing to consider any other suggestions
Line 220:                     log.errorFormat("Image data could not be 
retrieved for disk id {0} in storage domain id {1}. Error: {2}",
Line 221:                             ovfDisk.getId(),
Line 222:                             getParameters().getStorageDomainId(), e);
Line 223:                 }


-- 
To view, visit http://gerrit.ovirt.org/29563
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8b8c572898a07f5d706e2b58c94ce101da6df5ea
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to