Yaniv Bronhaim has posted comments on this change.
Change subject: Validate installed host by requesting for vdsm uuid
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsDeploy.java
Line 886: _iptables = _getIpTables();
Line 887: }
Line 888: }
Line 889:
Line 890: static public String getInstalledVdsIdIfExists(String hostname,
String password) {
where would you put it? VdsUtil.java?
Line 891: try {
Line 892: final int SSH_PORT = 22;
Line 893: final String USER = "root";
Line 894: final String SUCCESS_RESULT = "RESULT=0";
Line 892: final int SSH_PORT = 22;
Line 893: final String USER = "root";
Line 894: final String SUCCESS_RESULT = "RESULT=0";
Line 895: final String ERR_OUTPUT = "RESULT=1";
Line 896: final String VDSM_TOOL = "/usr/bin/vdsm-tool";
not all in db. but ill create parameters also fo ssh port ,root user, and tool
path if you prefer
Line 897:
Line 898: SSHClient client = new SSHClient();
Line 899: Integer timeout = Config.<Integer>
GetValue(ConfigValues.ConnectToServerTimeoutInSeconds) * 1000;
Line 900: client.setHardTimeout(timeout);
Line 905: client.connect();
Line 906: client.authenticate();
Line 907: ByteArrayOutputStream out = new
ConstraintByteArrayOutputStream(50);
Line 908: ByteArrayOutputStream err = new
ConstraintByteArrayOutputStream(50);
Line 909: client.executeCommand(
we need the uuid to check if the host is already registered.. I don't
understand the comment.
Line 910: "TOOL=" + VDSM_TOOL + "; " +
Line 911: "if [ -x $TOOL ]; then " +
Line 912: "$TOOL vdsm-id ; echo RESULT=$?; " +
Line 913: " else echo " + ERR_OUTPUT + "; fi",
--
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: 1
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