Federico Simoncelli has posted comments on this change.
Change subject: core: prevent maintenance when domain is sill in use
......................................................................
Patch Set 1:
(5 comments)
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/DeactivateStorageDomainCommandTest.java
Line 69:
DeactivateStorageDomainCommand<StorageDomainPoolParametersBase> cmd =
Line 70: spy(new
DeactivateStorageDomainCommand<StorageDomainPoolParametersBase>(params));
Line 71:
Line 72:
doReturn(mock(IStorageHelper.class)).when(cmd).getStorageHelper(any(StorageDomain.class));
Line 73: doReturn(dbFacade).when(cmd).getDbFacade();
It wasn't my intention to remove this. I'll put it back.
Line 74: when(dbFacade.getStoragePoolIsoMapDao()).thenReturn(isoMapDAO);
Line 75: when(dbFacade.getStoragePoolDao()).thenReturn(storagePoolDAO);
Line 76: when(dbFacade.getVdsDao()).thenReturn(vdsDAO);
Line 77:
when(dbFacade.getStorageDomainDao()).thenReturn(storageDomainDAO);
Line 77:
when(dbFacade.getStorageDomainDao()).thenReturn(storageDomainDAO);
Line 78: when(dbFacade.getAsyncTaskDao()).thenReturn(asyncTaskDAO);
Line 79: when(storagePoolDAO.get(any(Guid.class))).thenReturn(new
StoragePool());
Line 80:
when(isoMapDAO.get(any(StoragePoolIsoMapId.class))).thenReturn(map);
Line 81: when(storageDomainDAO.getForStoragePool(any(Guid.class),
any(Guid.class))).thenReturn(new StorageDomain());
It wasn't my intention to remove this. I'll put it back.
Line 82: doReturn(backendInternal).when(cmd).getBackend();
Line 83: when(vdsDAO.getAllForStoragePoolAndStatus(any(Guid.class),
any(VDSStatus.class))).thenReturn(new ArrayList<VDS>());
Line 84:
when(backendInternal.getResourceManager()).thenReturn(vdsBrokerFrontend);
Line 85: VDSReturnValue returnValue = new VDSReturnValue();
....................................................
File
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
Line 283:
Line 284: // Now update the status of domains, this code should
not be in
Line 285: // synchronized part of code
Line 286: if (domainsList != null) {
Line 287: IrsBrokerCommand.updateVdsDomainsData(tmpVds,
storagePoolId, domainsList);
In the long run this may go away.
Line 288: }
Line 289: } catch (Exception e) {
Line 290: log.error("Timer update runtimeinfo failed.
Exception:", e);
Line 291: } finally {
....................................................
File
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
Line 92: * @param vds
Line 93: * @param storagePoolId
Line 94: * @param vdsDomainData
Line 95: */
Line 96: public static void updateVdsDomainsData(VDS vds, Guid
storagePoolId,
In the long run this may go away.
Line 97: ArrayList<VDSDomainsData> vdsDomainData) {
Line 98: if (vds.getStatus() == VDSStatus.Up) {
Line 99: IrsProxyData proxy = _irsProxyData.get(storagePoolId);
Line 100: if (proxy != null) {
Line 1118:
poolDomain.getStoragePoolIsoMapData().getId(), StorageDomainStatus.Maintenance);
Line 1119: }
Line 1120: }
Line 1121:
Line 1122: private final Map<Guid, HashSet<Guid>> _domainsInProblem =
new ConcurrentHashMap<Guid, HashSet<Guid>>();
In the long run this may go away.
Line 1123: private final Map<Guid, String> _timers = new HashMap<Guid,
String>();
Line 1124:
Line 1125: public void updateVdsDomainsData(final Guid vdsId, final
String vdsName,
Line 1126: final ArrayList<VDSDomainsData> data) {
--
To view, visit http://gerrit.ovirt.org/22045
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I55cd5aa6a6dc32f374a4bb21b159d3cb30da65f5
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[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