Ohad Basan has uploaded a new change for review. Change subject: Core: logging an error message when bootstrapPackage directory is missing ......................................................................
Core: logging an error message when bootstrapPackage directory is missing This patch checks if bootstrap package directory exists prior to the creation of s_bootstrapPackage. If it does't exist - an error is logged. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=870070 Change-Id: I2d96ecf67ed18e0bd28853c002e763b3978620dd Signed-off-by: Ohad Basan <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsInstaller.java 1 file changed, 9 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/86/9086/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsInstaller.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsInstaller.java index b61587f..be2444a 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsInstaller.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsInstaller.java @@ -63,7 +63,7 @@ protected final VdsInstallerSSH _wrapper = new VdsInstallerSSH(); private final OpenSslCAWrapper _caWrapper = new OpenSslCAWrapper(); protected String _serverName; - private boolean _rebootAfterInstallation; + private final boolean _rebootAfterInstallation; private final String _rootPassword; private final String remoteFwRulesFilePath; private final String _remoteSSHKey; @@ -123,12 +123,16 @@ log.warn("ENGINE_CACHE environment not found using tmpdir"); cache = System.getProperty("java.io.tmpdir"); } - s_bootstrapPackage = new CachedTar( + File bootstrapPackage = new File(cache, Config.<String> GetValue(ConfigValues.BootstrapPackageName)) ; + if (bootstrapPackage.exists()) { + s_bootstrapPackage = new CachedTar( new File(cache, Config.<String> GetValue(ConfigValues.BootstrapPackageName)), - new File(Config.<String> GetValue(ConfigValues.BootstrapPackageDirectory)) - ); - } + new File(Config.<String> GetValue(ConfigValues.BootstrapPackageDirectory))); + } + else + log.warn(bootstrapPackage + "Does not exist"); + } VdsGroupDAO vdsGroupDao = DbFacade.getInstance().getVdsGroupDao(); Guid vdsGroupId = vds.getvds_group_id(); VDSGroup vdsGroup = vdsGroupDao.get(vdsGroupId); -- To view, visit http://gerrit.ovirt.org/9086 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d96ecf67ed18e0bd28853c002e763b3978620dd Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ohad Basan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
