Juan Hernandez has posted comments on this change. Change subject: bootstrap: rewrite bootstrap using the new ovirt-host-deploy package ......................................................................
Patch Set 11: (9 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsDeploy.java Line 109: _vds.gethost_name(), Line 110: vdsmid Line 111: ); Line 112: Line 113: List<VDS> list = LinqUtils.filter( I know, what I suggest is that you make this (and other) local variables final, so if you later try to modify them after the initial assignment the compiler will complain. Line 114: DbFacade.getInstance().getVdsDao().getAllWithUniqueId(vdsmid), Line 115: new Predicate<VDS>() { Line 116: @Override Line 117: public boolean eval(VDS vds) { Line 291: */ Line 292: private Callable _customizationDialog[] = new Callable[] { Line 293: new Callable<Object>() { public Object call() throws Exception { Line 294: if ( Line 295: (Boolean)_parser.cliEnvironmentGet( I would suggest to add a cliEnvironmentGetBoolean method (or similiar) where you can do the casts and avoid them every time you use the cliEnvironmentGet method. Line 296: VdsmEnv.OVIRT_NODE Line 297: ) Line 298: ) { Line 299: _messages.post( Line 297: ) Line 298: ) { Line 299: _messages.post( Line 300: InstallerMessages.Severity.INFO, Line 301: "Host is hypervisor" That is the point, the message is only posted when the host is oVirt node (if I understood correctly) but it says hypervisor, so it could well apply to Fedora or RHEL as well. Line 302: ); Line 303: _setNode(); Line 304: } Line 305: return null; Line 382: }}, Line 383: new Callable<Object>() { public Object call() throws Exception { Line 384: _parser.cliEnvironmentSet( Line 385: VdsmEnv.ENGINE_HOST, Line 386: new URL(Config.<String> GetValue(ConfigValues.VdcBootStrapUrl)).getHost() The place where the host and port are stored is not the options table, but in /etc/sysconfig/ovirt-engine, and it is easier to get their values as I suggested than build a new URL just to extract the host and port from it. Line 387: ); Line 388: return null; Line 389: }}, Line 390: new Callable<Object>() { public Object call() throws Exception { Line 389: }}, Line 390: new Callable<Object>() { public Object call() throws Exception { Line 391: _parser.cliEnvironmentSet( Line 392: VdsmEnv.ENGINE_PORT, Line 393: new URL(Config.<String> GetValue(ConfigValues.VdcBootStrapUrl)).getPort() Yes, I am sure. Line 394: ); Line 395: return null; Line 396: }}, Line 397: new Callable<Object>() { public Object call() throws Exception { Line 426: }}, Line 427: new Callable<Object>() { public Object call() throws Exception { Line 428: _parser.cliEnvironmentSet( Line 429: VdsmEnv.CERTIFICATE_ENROLLMENT, Line 430: org.ovirt.ovirt_host_deploy.constants.Const.CERTIFICATE_ENROLLMENT_INLINE Understood. Line 431: ); Line 432: return null; Line 433: }}, Line 434: new Callable<Object>() { public Object call() throws Exception { Line 462: new Callable<Object>() { public Object call() throws Exception { Line 463: _parser.cliInstall(); Line 464: return null; Line 465: }}, Line 466: null You can put a comma after the last element, it is valid Java syntax, no need for the null. Line 467: }; Line 468: /** Line 469: * Execute the next customization vector entry. Line 470: */ Line 473: if (_customizationShouldAbort) { Line 474: _parser.cliAbort(); Line 475: } Line 476: else { Line 477: _customizationDialog[_customizationIndex++].call(); So the way to stop the iteration is forcing a ArrayOutOfBounds or NullPointer? I don't get it. Can you elaborate, please? Line 478: } Line 479: } Line 480: catch (SoftError e) { Line 481: log.errorFormat( Line 778: String cachedir = System.getenv("ENGINE_CACHE"); Line 779: if (cachedir == null) { Line 780: log.warn("ENGINE_CACHE environment not found using tmpdir"); Line 781: cachedir = System.getProperty("java.io.tmpdir"); Line 782: } Yes, it will always exist, that is what we have the "engine.conf.defaults" file. And it it fails the LocalConfig class will throw an exception and send a clear message to the log. Line 783: s_bootstrapPackage = new CachedTar( Line 784: new File(cachedir, Config.<String> GetValue(ConfigValues.BootstrapPackageName)), Line 785: new File(Config.<String> GetValue(ConfigValues.BootstrapPackageDirectory)) Line 786: ); -- To view, visit http://gerrit.ovirt.org/9175 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If78c62601231f4729ca95da7653907b37856d672 Gerrit-PatchSet: 11 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com> Gerrit-Reviewer: Douglas Schilling Landgraf <dougsl...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches