Ori Liel has posted comments on this change.

Change subject: restapi: Host Power-Management Refactor (#977674) - WIP
......................................................................


Patch Set 18:

(42 comments)

http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java:

Line 311:         getCompensationContext().snapshotNewEntity(vdsStatistics);
Line 312:     }
Line 313: 
Line 314:     private void addFencingAgentsToDb() {
Line 315:         if (getParameters().getFencingAgents() != null && 
!getParameters().getFencingAgents().isEmpty()) {
> Please remove isEmpty() test, for loop will handle this
Done (This methods was apparently unused, it was deleted.)
Line 316:             for (FencingAgent agent : 
getParameters().getvds().getFencingAgents()) {
Line 317:                 
DbFacade.getInstance().getFencingAgentDao().save(agent);
Line 318:             }
Line 319:         }


Line 312:     }
Line 313: 
Line 314:     private void addFencingAgentsToDb() {
Line 315:         if (getParameters().getFencingAgents() != null && 
!getParameters().getFencingAgents().isEmpty()) {
Line 316:             for (FencingAgent agent : 
getParameters().getvds().getFencingAgents()) {
> Why are testing getParameters().getFencingAgents() and after that iterating
Done
Line 317:                 
DbFacade.getInstance().getFencingAgentDao().save(agent);
Line 318:             }
Line 319:         }
Line 320:     }


Line 313: 
Line 314:     private void addFencingAgentsToDb() {
Line 315:         if (getParameters().getFencingAgents() != null && 
!getParameters().getFencingAgents().isEmpty()) {
Line 316:             for (FencingAgent agent : 
getParameters().getvds().getFencingAgents()) {
Line 317:                 
DbFacade.getInstance().getFencingAgentDao().save(agent);
> Liran wrote an infrastructure for batch DB operations , I think it cam be u
Done
Line 318:             }
Line 319:         }
Line 320:     }
Line 321: 


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java:

Line 329:         // condition.
Line 330:         try (EngineLock lock = 
GlusterUtil.getInstance().acquireGlusterLockWait(sourceClusterId)) {
Line 331:             String hostName =
Line 332:                     (getVds().getHostName().isEmpty()) ? 
getPowerManagementIp()
Line 333:                             : getVds().getHostName();
> Agree, but since this appears in original code , fix should be done in a se
I agree with both of you
Line 334:             VDS runningHostInSourceCluster = 
getClusterUtils().getUpServer(sourceClusterId);
Line 335:             if (runningHostInSourceCluster == null) {
Line 336:                 log.error("Cannot remove host from source cluster, no 
host in Up status found in source cluster");
Line 337:                 handleError(-1, "No host in Up status found in source 
cluster");


Line 359:         // condition.
Line 360:         try (EngineLock lock = 
GlusterUtil.getInstance().acquireGlusterLockWait(targetClusterId)) {
Line 361:             String hostName =
Line 362:                     (getVds().getHostName().isEmpty()) ? 
getPowerManagementIp()
Line 363:                             : getVds().getHostName();
> See my comment above
Same
Line 364:             VDS runningHostInTargetCluster = 
getClusterUtils().getUpServer(targetClusterId);
Line 365:             if (runningHostInTargetCluster == null) {
Line 366:                 log.error("Cannot add host to target cluster, no host 
in Up status found in target cluster");
Line 367:                 handleError(-1, "No host in Up status found in target 
cluster");


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java:

Line 142:                     if (proxyHost != null) {
Line 143:                         break;
Line 144:                     }
Line 145:                     // do not retry getting proxy for Status 
operation.
Line 146:                     if (!withRetries)
> There is a patch that adds 3 retries for temporary status failures, I see t
I think you're mixing things up, the change you are talking about has been 
inserted by you to a different class: FenceVdsBaseCommand.java
        
(see: http://gerrit.ovirt.org/#/c/33486/3)
Line 147:                         break;
Line 148:                     log.infoFormat("Attempt {0} to find fence proxy 
host failed...", ++count);
Line 149:                     try {
Line 150:                         Thread.sleep(delayInMs);


Line 171:     private void logProxySelection(String proxy, String origin) {
Line 172:         AuditLogableBase logable = new AuditLogableBase();
Line 173:         logable.addCustomValue("Proxy", proxy);
Line 174:         logable.addCustomValue("Origin", origin);
Line 175:         logable.setVdsId(_vds.getId());
> why did you remove the "command" from logging , it will say if that was a s
I've separated proxy selection logic from fence logic itself. When selecting a 
proxy for a fence operation, I don't care what the fence operation is (in the 
next patch the logic is already split to two different classes). Therefore, 
it's not the right place to log the command.
Line 176:         AuditLogDirector.log(logable, 
AuditLogType.PROXY_HOST_SELECTION);
Line 177:         log.infoFormat("Using Host {0} from {1} as proxy for Host 
{2}",
Line 178:                 proxy, origin, _vds.getName());
Line 179:     }


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java:

Line 124:                         
addCanDoActionMessage(VdcBllMessages.VDS_NO_VDS_PROXY_FOUND);
Line 125:                     }
Line 126:                 } else {
Line 127:                     
addCanDoActionMessage(VdcBllMessages.VDS_FENCE_DISABLED_AT_QUIET_TIME);
Line 128:                     addCanDoActionMessage(String.format("$seconds 
%1$s", secondsLeftToNextPmOp));
> why did you added this format , as far as I see this is not used like that 
Good catch, I have no idea where this change came from. Must have been drunk :)
Line 129:                 }
Line 130:             } else {
Line 131:                 
addCanDoActionMessage(VdcBllMessages.VDS_FENCE_DISABLED_AT_SYSTEM_STARTUP_INTERVAL);
Line 132:             }


Line 181:                     AlertIfPowerManagementOperationFailed();
Line 182:                 }
Line 183:             }
Line 184:             // Successful fencing with reboot or shutdown op. Clear 
the power management policy flag
Line 185:             else if ((getParameters().getAction() == 
FenceActionType.Restart
> what is the change here , as far as I see this is identical to original exc
you're right
Line 186:                     || getParameters().getAction() == 
FenceActionType.Stop)
Line 187:                     && getParameters().getKeepPolicyPMEnabled() == 
false) {
Line 188:                 getVds().setPowerManagementControlledByPolicy(false);
Line 189:                 
getDbFacade().getVdsDynamicDao().updateVdsDynamicPowerManagementPolicyFlag(


Line 662: 
Line 663:     /**
Line 664:      * Determines according to the return status from VDSM whether 
the fencing-operation has been skipped due to policy.
Line 665:      */
Line 666:     protected boolean wasSkippedDueToPolicy(VDSFenceReturnValue 
vdsReturnValue) {
> Instead of two methods wasSkippedDueToPolicy wouldn't be better only one wi
Advantages and disadvantages in both approaches. As it is currently written 
there is more type-safety but it's a bit less compact than it could be. I think 
either approach could work. If you feel this is important, I'll change it.
Line 667:         if (vdsReturnValue.getFenceResult().getReturnValue() 
instanceof FenceStatusReturnValue) {
Line 668:             FenceStatusReturnValue fenceStatus =
Line 669:                     (FenceStatusReturnValue) 
vdsReturnValue.getFenceResult().getReturnValue();
Line 670:             return fenceStatus.getIsSkipped();


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNewVdsFenceStatusQuery.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNewVdsFenceStatusQuery.java:

Line 36:     }
Line 37: 
Line 38:     private void handleError(VDSFenceReturnValue result) {
Line 39:         if (!result.isProxyHostFound()) {
Line 40:             getQueryReturnValue().setSucceeded(false);
> why did you removed :
Done
Line 41:             getQueryReturnValue().setReturnValue(new 
FenceStatusReturnValue("unknown",
Line 42:                     
AuditLogDirector.getMessage(AuditLogType.VDS_ALERT_FENCE_NO_PROXY_HOST)));
Line 43:         } else {
Line 44:             getQueryReturnValue().setSucceeded(false);


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterVdsQuery.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterVdsQuery.java:

Line 251: 
Line 252:         UpdateVdsActionParameters p = new 
UpdateVdsActionParameters(vdsByUniqueId.getStaticData(), "", false);
Line 253:         if (vdsByUniqueId.isFencingAgentsExist()) {
Line 254:             p.setFencingAgents(vdsByUniqueId.getFencingAgents());
Line 255:         } // TODO: what about agent deletion?
> what about this TODO :-)
done, removed
Line 256:         
p.setTransactionScopeOption(TransactionScopeOption.RequiresNew);
Line 257:         VdcReturnValueBase rc = 
Backend.getInstance().runInternalAction(VdcActionType.UpdateVds, p);
Line 258: 
Line 259:         if (rc == null || !rc.getSucceeded()) {


Line 364:                         parameters.setShouldBeLogged(false);
Line 365:                         
parameters.setTransactionScopeOption(TransactionScopeOption.RequiresNew);
Line 366:                         if (vds_byHostName.isFencingAgentsExist()) {
Line 367:                             
parameters.setFencingAgents(vds_byHostName.getFencingAgents());
Line 368:                         } // TODO: what about agent deletion?
> same
done, removed
Line 369: 
Line 370:                         // If host exists in InstallingOs status, 
remove it from DB and move on
Line 371:                         final VDS foundVds = 
DbFacade.getInstance().getVdsDao().getByName(parameters.getVdsStaticData().getName());
Line 372:                         if ((foundVds != null) && 
(foundVds.getDynamicData().getStatus() == VDSStatus.InstallingOS)) {


Line 455:                     UpdateVdsActionParameters parameters =
Line 456:                             new 
UpdateVdsActionParameters(hostToRegister.getStaticData(), "", false);
Line 457:                     if (hostToRegister.isFencingAgentsExist()) {
Line 458:                         
parameters.setFencingAgents(hostToRegister.getFencingAgents());
Line 459:                     } // TODO: what about agent deletion?
> same
done, removed
Line 460:                     VdcReturnValueBase ret = 
Backend.getInstance().runInternalAction(VdcActionType.UpdateVds, parameters);
Line 461:                     if (ret == null || !ret.getSucceeded()) {
Line 462:                         error = 
AuditLogType.VDS_REGISTER_ERROR_UPDATING_NAME;
Line 463:                         logable.addCustomValue("VdsName2", newName);


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java:

Line 256:         });
Line 257: 
Line 258:     }
Line 259: 
Line 260:     protected boolean isPowerManagementLegal(VdsStatic vdsStatic,
> Please pass boolean pmEnabled as a parameter instead of whole VdsStatic
Done
Line 261:             List<FencingAgent> fencingAgents,
Line 262:             String clusterCompatibilityVersion) {
Line 263:         if (vdsStatic.isPmEnabled()) {
Line 264:             if (fencingAgents.isEmpty()) {


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/pm/PmHealthCheckManager.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/pm/PmHealthCheckManager.java:

Line 291:     public static PmHealthCheckManager getInstance() {
Line 292:         return instance;
Line 293:     }
Line 294: 
Line 295:     private class PmHealth {
> Please make this class static as findbugs suggest
Done
Line 296:         public PmHealth(VDS host) {
Line 297:             super();
Line 298:             this.host = host;
Line 299:         }


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java:

Line 912
Line 913
Line 914
Line 915
Line 916
> Not part of the patch
Done


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java:

Line 88:     VdsKdumpDetection(132, QuotaDependency.NONE),
Line 89:     AddFencingAgent(133, ActionGroup.EDIT_HOST_CONFIGURATION, 
QuotaDependency.NONE),
Line 90:     RemoveFencingAgent(134, ActionGroup.EDIT_HOST_CONFIGURATION, 
QuotaDependency.NONE),
Line 91:     RemoveFencingAgentsByVdsId(136, 
ActionGroup.EDIT_HOST_CONFIGURATION, QuotaDependency.NONE),
Line 92:     UpdateFencingAgent(135, ActionGroup.EDIT_HOST_CONFIGURATION, 
QuotaDependency.NONE),
> please order , first 135 and after it 136
Done
Line 93: 
Line 94:     // Network
Line 95:     UpdateNetworkToVdsInterface(149, 
ActionGroup.CONFIGURE_HOST_NETWORK, QuotaDependency.NONE),
Line 96:     AttachNetworkToVdsInterface(150, 
ActionGroup.CONFIGURE_HOST_NETWORK, QuotaDependency.NONE),


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/FencingAgent.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/FencingAgent.java:

Line 11: import org.ovirt.engine.core.common.validation.annotation.HostnameOrIp;
Line 12: import 
org.ovirt.engine.core.common.validation.group.PowerManagementCheck;
Line 13: import org.ovirt.engine.core.compat.Guid;
Line 14: 
Line 15: public class FencingAgent implements BusinessEntity<Guid> {
> Agree, there was a patch by me for 3.2 that renamed all fencing to fence ..
Done
Line 16: 
Line 17:     private static final long serialVersionUID = -5910560758520427911L;
Line 18:     private Guid id;
Line 19:     private Guid hostId;


Line 16: 
Line 17:     private static final long serialVersionUID = -5910560758520427911L;
Line 18:     private Guid id;
Line 19:     private Guid hostId;
Line 20:     private Integer order;
> Wouldn't primitive int be better?
No because I don't want it unintentionally set to 0 on initialization (or any 
other number)
Line 21: 
Line 22:     @EditableField
Line 23:     private HashMap<String, String> optionsMap;
Line 24: 


Line 184: 
Line 185:     public static class FencingAgentOrderComparator implements 
Comparator<FencingAgent> {
Line 186: 
Line 187:         @Override
Line 188:         public int compare(FencingAgent agent1, FencingAgent agent2) {
> Why not use Integer.compareTo() method?
Good call, done
Line 189:             if (agent1.getOrder() < agent2.getOrder()) {
Line 190:                 return -1;
Line 191:             } else if (agent1.getOrder() == agent2.getOrder()) {
Line 192:                 return 0;


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java:

Line 1306:     public void setBalloonEnabled(boolean enableBalloon) {
Line 1307:         this.balloonEnabled = enableBalloon;
Line 1308:     }
Line 1309: 
Line 1310:     public boolean isFencingAgentsExist() {
> Please remove this method, executing just getFencingAgents.isEmpty() is bet
Agree with use of isEmpty() as opposed to .size()>1 (changed that), but I don't 
see a problem with providing a utility method that checks if this VDS has 
agents or not.
Line 1311:         return this.getFencingAgents().size() > 0;
Line 1312:     }
Line 1313: 


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java:

Line 343:     VDS_CANNOT_AUTHENTICATE_TO_SERVER(ErrorType.CONFLICT),
Line 344:     VDS_SECURITY_CONNECTION_ERROR(ErrorType.CONFLICT),
Line 345:     VDS_REMOVE_FENCING_AGENT_ID_REQUIRED(ErrorType.BAD_PARAMETERS),
Line 346:     
VDS_REMOVE_FENCING_AGENTS_VDS_ID_REQUIRED(ErrorType.BAD_PARAMETERS),
Line 347:     
VDS_ADD_FENCING_AGENT_MANDATORY_PARAMETERS_MISSING(ErrorType.BAD_PARAMETERS),
> on all FENCING => FENCE
Done
Line 348:     VAR__ACTION__MANUAL_FENCE,
Line 349:     VAR__ACTION__MAINTENANCE,
Line 350:     
ACTION_TYPE_FAILED_PM_ENABLED_WITHOUT_AGENT(ErrorType.BAD_PARAMETERS),
Line 351:     
ACTION_TYPE_FAILED_PM_ENABLED_WITHOUT_AGENT_CREDENTIALS(ErrorType.BAD_PARAMETERS),


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java:

Line 53:     GetServerSSHPublicKey,
Line 54:     GetServerSSHKeyFingerprint,
Line 55:     GetCpuStatisticsByVdsId,
Line 56:     GetFencingAgentById,
Line 57:     GetFencingAgentsByVdsId,
> FENCING => FENCE
Done
Line 58: 
Line 59:     // VdsStatic Queries
Line 60:     GetVdsStaticByName,
Line 61: 


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AlertDirector.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AlertDirector.java:

Line 23:     public static void Alert(AuditLogableBase auditLogable, 
AuditLogType logType, String message) {
Line 24:         AuditLogDirector.log(auditLogable, logType, message);
Line 25:     }
Line 26: 
Line 27:     public static void AddVdsAlert(Guid vdsId, AuditLogType type) {
> why this is needed ???
I overloaded the method to spare the client the need to pass a new, empty 
AuditLogableBase, if a case where the client doesn't have custom parameters 
that it wishes to set.
Line 28:         AddVdsAlert(vdsId, type, new AuditLogableBase());
Line 29:     }
Line 30: 
Line 31:     /**


Line 48:     public static void RemoveVdsAlert(Guid vdsId, AuditLogType type) {
Line 49:         
DbFacade.getInstance().getAuditLogDao().removeAllOfTypeForVds(vdsId, 
type.getValue());
Line 50:     }
Line 51: 
Line 52:     public static void RemoveVdsAlert(Guid vdsId, AuditLogType type, 
AuditLogableBase alert) {
> same....
Removed
Line 53:         // TODO: implement! //!!
Line 54:     }
Line 55: 
Line 56:     /**


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java:

Line 31: /**
Line 32:  * <code>VdsDAODbFacadeImpl</code> provides an implementation of 
{@code VdsDAO} that uses previously written code from
Line 33:  * {@code DbFacade}.
Line 34:  */
Line 35: public class VdsDAODbFacadeImpl extends BaseDAODbFacade implements 
VdsDAO {
> We don't need to break backward compatibility. I think that following steps
I'm looking into this
Line 36: 
Line 37:     @Override
Line 38:     public VDS get(Guid id) {
Line 39:         return get(id, null, false);


Line 51:         if (vdsList.size()==0) {
Line 52:             return null;
Line 53:         } else {
Line 54:             return uniteAgentsSingleVds(vdsList);
Line 55:         }
> please define as a separate method since this block is duplicated below
Changed to trinary if, now it's one line, no need for method

return vdsList.size() == 0 ? null : uniteAgentsSingleVds(vdsList);
Line 56:     }
Line 57: 
Line 58:     @Override
Line 59:     public VDS getByName(String name) {


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/dal/src/main/jdbc-resources/engine-daos.properties
File backend/manager/modules/dal/src/main/jdbc-resources/engine-daos.properties:

Line 88: 
ExternalVariableDao=org.ovirt.engine.core.dao.ExternalVariableDaoDbFacadeImpl
Line 89: 
VdsKdumpStatusDao=org.ovirt.engine.core.dao.VdsKdumpStatusDaoDbFacadeImpl
Line 90: 
DiskProfileDao=org.ovirt.engine.core.dao.profiles.DiskProfileDaoDbFacadeImpl
Line 91: 
CpuProfileDao=org.ovirt.engine.core.dao.profiles.CpuProfileDaoDbFacadeImpl
Line 92: FencingAgentDAO=org.ovirt.engine.core.dao.FencingAgentDaoDbFacadeImpl
> Fencing => Fence
Done


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
File 
backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties:

Line 924: VDS_REGISTER_UNIQUE_ID_AMBIGUOUS=Cannot add host which has the same 
unique ID as one of the hosts:  ${HostNameList}.\nThis might occur in case this 
host was already added to the system.
Line 925: VDS_CANNOT_CONNECT_TO_SERVER=Cannot ${action} ${type}. Connecting to 
host via SSH has failed, verify that the host is reachable (IP address, 
routable address etc.) You may refer to the engine.log file for further details.
Line 926: VDS_CANNOT_AUTHENTICATE_TO_SERVER=Cannot ${action} ${type}. SSH 
authentication failed, verify authentication parameters are correct 
(Username/Password, public-key etc.) You may refer to the engine.log file for 
further details.
Line 927: VDS_SECURITY_CONNECTION_ERROR=Cannot ${action} ${type}. SSH 
connection failed, ${ErrorMsg}.
Line 928: VDS_REMOVE_FENCING_AGENT_ID_REQUIRED=Cannot Remove Fencing-Agent. 
Agent ID not provided.  
> Please remove spaces at end
Done
Line 929: VDS_REMOVE_FENCING_AGENTS_VDS_ID_REQUIRED=Cannot Remove 
Fencing-Agents. Host ID not provided.
Line 930: VDS_ADD_FENCING_AGENT_MANDATORY_PARAMETERS_MISSING=Cannot Add 
Fencing-Agent. One or more mandatory parameters were not provided. Mandatory 
parameters are: type, order, ip, username, address, password. 
Line 931: AUTO_MIGRATE_DISABLED=Cannot migrate - check relevant configuration 
options.
Line 932: AUTO_MIGRATE_VDS_NOT_FOUND=Cannot migrate - Host not found.


Line 926: VDS_CANNOT_AUTHENTICATE_TO_SERVER=Cannot ${action} ${type}. SSH 
authentication failed, verify authentication parameters are correct 
(Username/Password, public-key etc.) You may refer to the engine.log file for 
further details.
Line 927: VDS_SECURITY_CONNECTION_ERROR=Cannot ${action} ${type}. SSH 
connection failed, ${ErrorMsg}.
Line 928: VDS_REMOVE_FENCING_AGENT_ID_REQUIRED=Cannot Remove Fencing-Agent. 
Agent ID not provided.  
Line 929: VDS_REMOVE_FENCING_AGENTS_VDS_ID_REQUIRED=Cannot Remove 
Fencing-Agents. Host ID not provided.
Line 930: VDS_ADD_FENCING_AGENT_MANDATORY_PARAMETERS_MISSING=Cannot Add 
Fencing-Agent. One or more mandatory parameters were not provided. Mandatory 
parameters are: type, order, ip, username, address, password. 
> On all fencing = > fence
Done
Line 931: AUTO_MIGRATE_DISABLED=Cannot migrate - check relevant configuration 
options.
Line 932: AUTO_MIGRATE_VDS_NOT_FOUND=Cannot migrate - Host not found.
Line 933: AUTO_MIGRATE_ALREADY_RUNNING_ON_VDS=Cannot migrate - VM already 
running on Host.
Line 934: AUTO_MIGRATE_UNSUCCESSFUL=Cannot migrate - Previous migration was 
unsuccessful.


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
File 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties:

Line 620: VDS_ALERT_FENCE_NO_PROXY_HOST=There is no other host in the data 
center that can be used to test the power management settings.
Line 621: VDS_ALERT_FENCE_STATUS_VERIFICATION_FAILED=Failed to verify Host 
${Host} ${Status} status, Please ${Status} Host ${Host} manually.
Line 622: VDS_ALERT_SECONDARY_AGENT_USED_FOR_FENCE_OPERATION=Secondary fence 
agent was used to ${Operation} Host ${VdsName}
Line 623: VDS_ALERT_PM_HEALTH_CHECK_FENCING_AGENT_NON_RESPONSIVE=Health check 
on Host ${VdsName} indicates that Fencing-Agent ${AgentId} is non-responsive.
Line 624: VDS_ALERT_PM_HEALTH_CHECK_START_MIGHT_FAIL=Health check on Host 
${VdsName} indicates that future attempts to Start this host using 
Power-Management are expected to fail.  
> Please remove spaces at end
Done
Line 625: VDS_ALERT_PM_HEALTH_CHECK_STOP_MIGHT_FAIL=Health check on Host 
${VdsName} indicates that future attempts to Stop this host using 
Power-Management are expected to fail.
Line 626: VDS_ALERT_PM_HEALTH_CHECK_RESTART_MIGHT_FAIL=Health check on Host 
${VdsName} indicates that future attempts to Restart this host using 
Power-Management are expected to fail.
Line 627: VDS_ALERT_FENCE_OPERATION_SKIPPED_BROKEN_CONNECTIVITY=Host ${VdsName} 
became non responsive and was not restarted due to Fencing Policy: ${Percents} 
percents of the Hosts in the Cluster have connectivity issues.
Line 628: VDS_ALERT_NOT_RESTARTED_DUE_TO_POLICY=Host ${VdsName} became non 
responsive and was not restarted due to the Cluster Fencing Policy.


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties
File 
backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties:

Line 116: job.RemoveDiskSnapshots=Removing Disks from Snapshot(s) ${Snapshots} 
of VM ${VM}
Line 117: job.VdsKdumpDetection=Detecting kdump flow on host ${VDS}
Line 118: job.AddFencingAgent=Adding fencing agent to host ${VDS}
Line 119: job.RemoveFencingAgent=Removing fencing agent from host ${VDS}
Line 120: job.UpdateFencingAgent=Updating fencing agent of host ${VDS}
> same Fencing => Fence
Done
Line 121: 
Line 122: # Step types
Line 123: step.VALIDATING=Validating
Line 124: step.EXECUTING=Executing


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/FencingAgentResource.java
File 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/FencingAgentResource.java:

Line 3: import org.ovirt.engine.api.model.Agent;
Line 4: 
Line 5: public interface FencingAgentResource extends UpdatableResource<Agent> {
Line 6: 
Line 7: }
> class name : Fencing => Fence
Done


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/FencingAgentsResource.java
File 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/FencingAgentsResource.java:

> same , Fencing => Fence
Done
Line 1: package org.ovirt.engine.api.resource;
Line 2: 
Line 3: import java.util.List;
Line 4: 


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/HostResource.java
File 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/HostResource.java:

Line 95:     @Path("permissions")
Line 96:     public AssignedPermissionsResource getPermissionsResource();
Line 97: 
Line 98:     @Path("fencingagents")
Line 99:     public FencingAgentsResource getFencingAgentsResource();
> same here
Done


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd:

> Please remove spaces at ends of changed lines
Done
Line 1: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Line 2: <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema";
Line 3:            xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
Line 4:            xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";


http://gerrit.ovirt.org/#/c/27578/18/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/utils/AgentComparator.java
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/utils/AgentComparator.java:

Line 6: 
Line 7: public class AgentComparator implements Comparator<Agent> {
Line 8: 
Line 9:     @Override
Line 10:     public int compare(Agent agent1, Agent agent2) {
> Please use Integer.compareTo()
Done
Line 11:         if (agent1.getOrder() < agent2.getOrder()) {
Line 12:             return -1;
Line 13:         } else if (agent1.getOrder() == agent2.getOrder()) {
Line 14:             return 0;


http://gerrit.ovirt.org/#/c/27578/18/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java:

Line 1802:                 
getPmSecondaryUserName().setEntity(secondaryAgent.getUser());
Line 1803:                 
getPmSecondaryPassword().setEntity(secondaryAgent.getPassword());
Line 1804:                 
getPmSecondaryType().setSelectedItem(secondaryAgent.getType());
Line 1805:                 
setPmSecondaryOptionsMap(secondaryAgent.getOptionsMap());
Line 1806:                 
getPmSecondaryConcurrent().setEntity(secondaryAgent.getOrder() == 
primaryAgent.getOrder());
> If you really need to user Integer instead of int, then you should use equa
Done
Line 1807:             }
Line 1808:         }
Line 1809:         
getDisableAutomaticPowerManagement().setEntity(vds.isDisablePowerManagementPolicy());
Line 1810:         getPmKdumpDetection().setEntity(vds.isPmKdumpDetection());


http://gerrit.ovirt.org/#/c/27578/18/packaging/dbscripts/fencing_agents_sp.sql
File packaging/dbscripts/fencing_agents_sp.sql:

Line 36:       v_vds_id UUID ,
Line 37:       v_agent_order INTEGER ,
Line 38:       v_ip VARCHAR(255) ,
Line 39:       v_type VARCHAR(255) ,
Line 40:       v_agent_user VARCHAR(255) ,
> please remove all TWS from the code below
Done
Line 41:       v_agent_password text , 
Line 42:       v_options VARCHAR(255) ,
Line 43:       v_port INTEGER)
Line 44: RETURNS VOID


http://gerrit.ovirt.org/#/c/27578/18/packaging/dbscripts/vds_sp.sql
File packaging/dbscripts/vds_sp.sql:

Line 395: 
Line 396: Create or replace FUNCTION InsertVdsStatic(
Line 397:     v_free_text_comment text,
Line 398:     v_vds_id UUID,
Line 399:     v_host_name VARCHAR(255),    
> TWS
Done
Line 400:     v_vds_unique_id VARCHAR(128) ,
Line 401:     v_port INTEGER,
Line 402:     v_protocol SMALLINT,
Line 403:     v_vds_group_id UUID,


Line 552:    AS $procedure$
Line 553: BEGIN
Line 554: RETURN QUERY SELECT vds_static.*
Line 555:    FROM vds_static
Line 556:    WHERE vds_id = v_vds_id;   
> same
Done
Line 557: 
Line 558:    RETURN;
Line 559: END; $procedure$
Line 560: LANGUAGE plpgsql;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id0b384347a52db8b0aa6ae684fad40a5491dd2f7
Gerrit-PatchSet: 18
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <ol...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Martin Peřina <mper...@redhat.com>
Gerrit-Reviewer: Ori Liel <ol...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to