Change in ovirt-engine[master]: gluster: resolve hostname before checking ip in db

sanjal at redhat.com sanjal at redhat.com
Mon Feb 18 15:00:49 UTC 2013


Shireesh Anjal has submitted this change and it was merged.

Change subject: gluster: resolve hostname before checking ip in db
......................................................................


gluster: resolve hostname before checking ip in db

At two places, we are checking if a server with given ip address exists
in the engine DB. However it is possible that the value passed is a
hostname, and it's not same as what is present in the host_name field.
To handle such cases, modified the code to make sure that we resolve
the given ip/hostname, and check for the resolved ip addr in db.

As part of this change, performed following refactoring:
- Renamed GlusterUtils to GlusterDBUtils and moved it to dao module
- Modified the test case in GetAddedGlusterServersQueryTest accordingly

Change-Id: Iab25afc5cb0acb5be288c005d1110c1ad0a54b2d
Signed-off-by: Shireesh Anjal <sanjal at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetAddedGlusterServersQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterManager.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeCommand.java
D backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/GlusterUtils.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GetAddedGlusterServersQueryTest.java
A backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterDBUtils.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumesListReturnForXmlRpc.java
9 files changed, 155 insertions(+), 151 deletions(-)

Approvals:
  Shireesh Anjal: Verified; Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/12021
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab25afc5cb0acb5be288c005d1110c1ad0a54b2d
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shireesh Anjal <sanjal at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose at redhat.com>
Gerrit-Reviewer: Shireesh Anjal <sanjal at redhat.com>



More information about the Engine-commits mailing list