Shubhendu Tripathi has posted comments on this change.
Change subject: gluster: During import check host existence by UUID
......................................................................
Patch Set 1:
(4 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetAddedGlusterServersQuery.java
Line 49: // Keep server details in the map only for the servers which
are reachable
Line 50: Iterator<Map.Entry<String, String>> iterator =
glusterServers.entrySet().iterator();
Line 51: while (iterator.hasNext()) {
Line 52: Map.Entry<String, String> entry = iterator.next();
Line 53: if (entry.getValue() == null) {
Will do the same
Line 54: iterator.remove();
Line 55: }
Line 56: }
Line 57:
Line 87: }
Line 88:
Line 89: private boolean serverExists(GlusterServerInfo glusterServer) {
Line 90: VDSGroup vdsGroup =
getVdsGroupDao().get(getParameters().getClusterId());
Line 91: if
(vdsGroup.getcompatibility_version().compareTo(Version.v3_3) >= 0) {
Will do the changes
Line 92: return getDbUtils().serverExists(glusterServer.getUuid());
Line 93: } else {
Line 94: return
getDbUtils().serverExists(getParameters().getClusterId(),
glusterServer.getHostnameOrIp());
Line 95: }
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GetAddedGlusterServersQueryTest.java
Line 98:
Line 99: private void setupExpectedGlusterServersInfo() {
Line 100: expectedServers = new ArrayList<GlusterServerInfo>();
Line 101: GlusterServerInfo server = new GlusterServerInfo();
Line 102: server = new GlusterServerInfo();
Will remove
Line 103: server.setUuid(server_id3);
Line 104: server.setHostnameOrIp(TEST_SERVER3);
Line 105: server.setStatus(PeerStatus.CONNECTED);
Line 106: expectedServers.add(server);
Line 98:
Line 99: private void setupExpectedGlusterServersInfo() {
Line 100: expectedServers = new ArrayList<GlusterServerInfo>();
Line 101: GlusterServerInfo server = new GlusterServerInfo();
Line 102: server = new GlusterServerInfo();
There was a mismatch between getAddedServers() results and actual return value
of command.
This is because the fingerprint populated for the server in the method
getAddedServers() is empty string. After the new changes only one server would
get dded, so reduced the expected result.
Line 103: server.setUuid(server_id3);
Line 104: server.setHostnameOrIp(TEST_SERVER3);
Line 105: server.setStatus(PeerStatus.CONNECTED);
Line 106: expectedServers.add(server);
--
To view, visit http://gerrit.ovirt.org/20697
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I60f5fdf16c6b2cf717a041b34f9e62e0ac6b78f3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[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