Source:
<code>private void connectAndRefreshAllUpHosts(final boolean commandSucceeded) { for (VDS vds : getAllRunningVdssInPool()) { try { if (!_isLastMaster && commandSucceeded) { try { runVdsCommand( VDSCommandType.RefreshStoragePool, new RefreshStoragePoolVDSCommandParameters(vds.getId(), getStoragePool().getId(), _newMasterStorageDomainId, <START> getStoragePool().getmaster_domain_version())); <END> } catch (VDSExceptionBase ex) { if (VdcBllErrors.StoragePoolUnknown == ex.getVdsError().getCode()) { VDSReturnValue returnVal = runVdsCommand( VDSCommandType.ConnectStoragePool, new ConnectStoragePoolVDSCommandParameters(vds.getId(), getStoragePool().getId(), vds.getvds_spm_id(), _newMasterStorageDomainId, getStoragePool() .getmaster_domain_version())); if (!returnVal.getSucceeded()) { log.errorFormat("Post reconstruct actions (connectPool) did not complete on host {0} in the pool. error {1}", vds.getId(), returnVal.getVdsError().getMessage()); } } else { log.errorFormat("Post reconstruct actions (refreshPool)" + " did not complete on host {0} in the pool. error {1}", vds.getId(), ex.getMessage()); } } } if (!getParameters().isInactive()) { StorageHelperDirector.getInstance() .getItem(getStorageDomain().getstorage_type()) .DisconnectStorageFromDomainByVdsId(getStorageDomain(), vds.getId()); } } catch (Exception e) { log.errorFormat("Post reconstruct actions (connectPool,refreshPool,disconnect storage)" + " did not complete on host {0} in the pool. error {1}", vds.getId(), e.getMessage()); } } }</code><technical_language>protected VDSReturnValue runVdsCommand(VDSCommandType commandType, VDSParametersBase parameters) throws VdcBLLException; catching VDSExceptionBase</technical_language>

Target:
private void connectAndRefreshAllUpHosts(final boolean commandSucceeded) { for (VDS vds : getAllRunningVdssInPool()) { try { if (!_isLastMaster && commandSucceeded) { try { runVdsCommand( VDSCommandType.RefreshStoragePool, new RefreshStoragePoolVDSCommandParameters(vds.getId(), getStoragePool().getId(), _newMasterStorageDomainId, getStoragePool().getmaster_domain_version())); } catch (VdcBLLException ex) { if (VdcBllErrors.StoragePoolUnknown == ex.getVdsError().getCode()) { VDSReturnValue returnVal = runVdsCommand( VDSCommandType.ConnectStoragePool, new ConnectStoragePoolVDSCommandParameters(vds.getId(), getStoragePool().getId(), vds.getvds_spm_id(), _newMasterStorageDomainId, getStoragePool() .getmaster_domain_version())); if (!returnVal.getSucceeded()) { log.errorFormat("Post reconstruct actions (connectPool) did not complete on host {0} in the pool. error {1}", vds.getId(), returnVal.getVdsError().getMessage()); } } else { log.errorFormat("Post reconstruct actions (refreshPool)" + " did not complete on host {0} in the pool. error {1}", vds.getId(), ex.getMessage()); } } } if (!getParameters().isInactive()) { StorageHelperDirector.getInstance() .getItem(getStorageDomain().getstorage_type()) .DisconnectStorageFromDomainByVdsId(getStorageDomain(), vds.getId()); } } catch (Exception e) { log.errorFormat("Post reconstruct actions (connectPool,refreshPool,disconnect storage)" + " did not complete on host {0} in the pool. error {1}", vds.getId(), e.getMessage()); } } }