Juan Hernandez has posted comments on this change.
Change subject: Core: logging an error message when bootstrapPackage directory
is missing
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsInstaller.java
Line 62:
Line 63: protected final VdsInstallerSSH _wrapper = new VdsInstallerSSH();
Line 64: private final OpenSslCAWrapper _caWrapper = new OpenSslCAWrapper();
Line 65: protected String _serverName;
Line 66: private final boolean _rebootAfterInstallation;
This change to "final" doesn't belong into this patch.
Line 67: private final String _rootPassword;
Line 68: private final String remoteFwRulesFilePath;
Line 69: private final String _remoteSSHKey;
Line 70: private boolean isAddOvirtFlow = false;
Line 125: }
Line 126: File bootstrapPackage = new File(cache, Config.<String>
GetValue(ConfigValues.BootstrapPackageName)) ;
Line 127: if (bootstrapPackage.exists()) {
Line 128: s_bootstrapPackage = new CachedTar(
Line 129: new File(cache, Config.<String>
GetValue(ConfigValues.BootstrapPackageName)),
Here you can use the local variable "bootstrapPackage" instead of creating an
new instance of File.
Line 130: new File(Config.<String>
GetValue(ConfigValues.BootstrapPackageDirectory)));
Line 131: }
Line 132: else
Line 133: log.warn(bootstrapPackage + "Does not exist");
Line 129: new File(cache, Config.<String>
GetValue(ConfigValues.BootstrapPackageName)),
Line 130: new File(Config.<String>
GetValue(ConfigValues.BootstrapPackageDirectory)));
Line 131: }
Line 132: else
Line 133: log.warn(bootstrapPackage + "Does not exist");
I would suggest to use the following:
else {
log.....
}
Regarding the message I would suggest to be a bit more verbose:
log.warn("The directory containing bootstrap scripts \"" +
bootstrapPackage.getAbsolutePath() + "\" doesn't exist. Is the package
containing those files installed?");
Line 134:
Line 135: }
Line 136: VdsGroupDAO vdsGroupDao =
DbFacade.getInstance().getVdsGroupDao();
Line 137: Guid vdsGroupId = vds.getvds_group_id();
--
To view, visit http://gerrit.ovirt.org/9086
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2d96ecf67ed18e0bd28853c002e763b3978620dd
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ohad Basan <[email protected]>
Gerrit-Reviewer: Eyal Edri <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Moran Goldboim <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches