Alon Bar-Lev has posted comments on this change.
Change subject: Validate installed host by requesting for vdsm uuid
......................................................................
Patch Set 2: (3 inline comments)
Much simpler, no? :)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java
Line 382: try {
Line 383: ByteArrayOutputStream out = new
ConstraintByteArrayOutputStream(256);
Line 384: ByteArrayOutputStream err = new
ConstraintByteArrayOutputStream(256);
Line 385: client.executeCommand(Config.<String>
GetValue(ConfigValues.GetVdsmIdByVdsmToolCommand),
Line 386: null, out, err);
you can pass null as err if you do not use it.
Line 387: return new String(out.toByteArray(), "UTF-8");
Line 388: }
Line 389: catch (Exception e) {
Line 390: // Couldn't retrieve vdsm-id from host due to exception.
Exception can raised when
Line 383: ByteArrayOutputStream out = new
ConstraintByteArrayOutputStream(256);
Line 384: ByteArrayOutputStream err = new
ConstraintByteArrayOutputStream(256);
Line 385: client.executeCommand(Config.<String>
GetValue(ConfigValues.GetVdsmIdByVdsmToolCommand),
Line 386: null, out, err);
Line 387: return new String(out.toByteArray(), "UTF-8");
Charset.forName("UTF-8")
Line 388: }
Line 389: catch (Exception e) {
Line 390: // Couldn't retrieve vdsm-id from host due to exception.
Exception can raised when
Line 391: // the command failed to run. There is no need to log
here, it's an expected behavior for
Line 385: client.executeCommand(Config.<String>
GetValue(ConfigValues.GetVdsmIdByVdsmToolCommand),
Line 386: null, out, err);
Line 387: return new String(out.toByteArray(), "UTF-8");
Line 388: }
Line 389: catch (Exception e) {
Please log exception.
Line 390: // Couldn't retrieve vdsm-id from host due to exception.
Exception can raised when
Line 391: // the command failed to run. There is no need to log
here, it's an expected behavior for
Line 392: // non-installed hosts.
Line 393: return null;
--
To view, visit http://gerrit.ovirt.org/14905
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5c6c0a85daba47fabb9253963ff187a670f28ae6
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches