Alon Bar-Lev has posted comments on this change.
Change subject: oVirt Node Upgrade: Support N configuration
......................................................................
Patch Set 16:
(7 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetoVirtISOsQuery.java
Line 44:
Line 45: RpmVersion vdsOsVersion =
VdsHandler.getOvirtHostOsVersion(vds);
Line 46: String nodeOS = vds.getHostOs();
Line 47: String nodeOsSupported = null;
Line 48: Matcher matcher;
why are these here? the can go into the try block.
Line 49:
Line 50: for (OVirtNodeInfo.Entry info :
OVirtNodeInfo.getInstance().get()) {
Line 51:
Line 52: try {
Line 53: log.infoFormat("nodeOS [{0}]", nodeOS.toLowerCase());
Line 54: log.infoFormat("info.nodePattern [{0}]",
info.nodePattern);
Line 55: matcher =
info.nodePattern.matcher(nodeOS.toLowerCase());
Line 56: matcher.find();
Line 57: nodeOsSupported = matcher.group(0);
why do you need the group? all you need to know if it matches the re.
Line 58: log.infoFormat("nodeOS [{0}] supported node OS [{1}]",
nodeOS.toLowerCase(), nodeOsSupported);
Line 59: } catch (RuntimeException e) {
Line 60: log.infoFormat("Cannot match nodeOS [{0}]]",
nodeOS.toLowerCase());
Line 61: continue;
Line 54: log.infoFormat("info.nodePattern [{0}]",
info.nodePattern);
Line 55: matcher =
info.nodePattern.matcher(nodeOS.toLowerCase());
Line 56: matcher.find();
Line 57: nodeOsSupported = matcher.group(0);
Line 58: log.infoFormat("nodeOS [{0}] supported node OS [{1}]",
nodeOS.toLowerCase(), nodeOsSupported);
please use Pattern.CASE_INSENSITIVE
Line 59: } catch (RuntimeException e) {
Line 60: log.infoFormat("Cannot match nodeOS [{0}]]",
nodeOS.toLowerCase());
Line 61: continue;
Line 62: }
Line 61: continue;
Line 62: }
Line 63:
Line 64: if (nodeOS.toLowerCase().indexOf(nodeOsSupported) != -1
&& info.path.isDirectory()) {
Line 65: log.debugFormat("Looking for list of ISOs in [{0}]",
info.path);
Why do you need: nodeOS.toLowerCase().indexOf(nodeOsSupported) != -1
Line 66: log.debugFormat("regex isoPattern for ISOs: [{0}]",
info.isoPattern);
Line 67: for (File file : info.path.listFiles()) {
Line 68: matcher = info.isoPattern.matcher(file.getName());
Line 69: if (matcher.find()) {
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OVirtNodeInfo.java
Line 15: public static class Entry {
Line 16: public Pattern isoPattern;
Line 17: public File path;
Line 18: public String minimumVersion;
Line 19: public Pattern nodePattern;
osPattern?
Line 20: }
Line 21:
Line 22: private static final Log log =
LogFactory.getLog(OVirtNodeInfo.class);
Line 23: private static volatile OVirtNodeInfo instance;
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
Line 1461: @DefaultValueAttribute("3")
Line 1462: IterationsWithBalloonProblem(525),
Line 1463:
Line 1464: @TypeConverterAttribute(String.class)
Line 1465: @DefaultValueAttribute("^ovirt.*:^rhev.*")
how come you add here two entries?
Line 1466: oVirtNode(525),
Line 1467:
Line 1468: Invalid(65535);
Line 1469:
....................................................
File packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
Line 369: select
fn_db_add_config_value('OvfVirtualSystemType','ENGINE','general');
Line 370: --Handling The ovirt-node installation files path
Line 371: select
fn_db_add_config_value('OvirtInitialSupportedIsoVersion','2.5.5:5.8','general');
Line 372: select
fn_db_add_config_value('OvirtIsoPrefix','^ovirt-node-iso-(.*)\.*\.iso$:^rhevh-(.*)\.*\.iso$','general');
Line 373: select
fn_db_add_config_value('oVirtNode','^ovirt.*:^rhev.*','general');
OvirtNodeOS?
Line 374: select
fn_db_add_config_value('oVirtISOsRepositoryPath','/usr/share/ovirt-node-iso:/usr/share/rhev-hypervisor','general');
Line 375: select
fn_db_add_config_value('oVirtUpgradeScriptName','/usr/share/vdsm-reg/vdsm-upgrade','general');
Line 376: select
fn_db_add_config_value('oVirtUploadPath','/data/updates/ovirt-node-image.iso','general');
Line 377: select
fn_db_add_config_value('OvfUpdateIntervalInMinutes','60','general');
--
To view, visit http://gerrit.ovirt.org/14756
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibfb9dc5d0dc8780b519107acbe0ae866831f782c
Gerrit-PatchSet: 16
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Michael Burns <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[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