Change in vdsm[ovirt-3.5]: vdsm: making PM 'on' and 'off' sync
Eli Mesika has uploaded a new change for review. Change subject: vdsm: making PM 'on' and 'off' sync .. vdsm: making PM 'on' and 'off' sync Consider the following scenario: DC1 with H1 (with PM) and H2 on cluster C1 another host H3 on DC1 cluster C2 When we are blocking the communication with iptables from H2 to H1 PM card and use the default proxy preferences (cluster, dc) a Restart operation will always fail. VDSM should perform start/stop sync and return the correct script returned code in order that engine will know that H2 fails to perform the operation and will try to use H3 as a proxy for the failed operation This patch changes the fenceNode function to be sync when 'on' 'off' operation are used in the same manner of 'status' operation and return the correct exit code of the invoked fencing script to the caller. Change-Id: I81d45977664c99c954c4663a26642e6e21cc65e3 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1139643 Signed-off-by: Eli Mesika emes...@redhat.com --- M vdsm/API.py 1 file changed, 16 insertions(+), 15 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/69/33469/1 diff --git a/vdsm/API.py b/vdsm/API.py index 6378f2c..5d948f8 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -1205,19 +1205,19 @@ inp += 'secure=yes\n' inp += options +try: +rc, out, err = fence(script, inp) +except OSError as e: +if e.errno == os.errno.ENOENT: +return errCode['fenceAgent'] +raise +self.log.debug('rc %s in %s out %s err %s', rc, + hidePasswd(inp), out, err) +if not 0 = rc = 2: +return {'status': {'code': 1, + 'message': out + err}} +message = doneCode['message'] if action == 'status': -try: -rc, out, err = fence(script, inp) -except OSError as e: -if e.errno == os.errno.ENOENT: -return errCode['fenceAgent'] -raise -self.log.debug('rc %s in %s out %s err %s', rc, - hidePasswd(inp), out, err) -if not 0 = rc = 2: -return {'status': {'code': 1, - 'message': out + err}} -message = doneCode['message'] if rc == 0: power = 'on' elif rc == 2: @@ -1227,9 +1227,10 @@ message = out + err return {'status': {'code': 0, 'message': message}, 'power': power} -threading.Thread(target=fence, args=(script, inp)).start() -return {'status': doneCode, 'power': 'unknown', -'operationStatus': 'initiated'} +if rc != 0: +message = out + err +return {'status': {'code': rc, 'message': message}, +'power': 'unknown', 'operationStatus': 'initiated'} def ping(self): Ping the server. Useful for tests -- To view, visit http://gerrit.ovirt.org/33469 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81d45977664c99c954c4663a26642e6e21cc65e3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Eli Mesika emes...@redhat.com ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: vdsm: making PM 'on' and 'off' sync
Eli Mesika has posted comments on this change. Change subject: vdsm: making PM 'on' and 'off' sync .. Patch Set 1: Verified+1 -- To view, visit http://gerrit.ovirt.org/33469 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I81d45977664c99c954c4663a26642e6e21cc65e3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Eli Mesika emes...@redhat.com Gerrit-Reviewer: Eli Mesika emes...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: vdsm: making PM 'on' and 'off' sync
Dan Kenigsberg has posted comments on this change. Change subject: vdsm: making PM 'on' and 'off' sync .. Patch Set 1: Code-Review+1 -- To view, visit http://gerrit.ovirt.org/33469 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I81d45977664c99c954c4663a26642e6e21cc65e3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Eli Mesika emes...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Eli Mesika emes...@redhat.com Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: vdsm: making PM 'on' and 'off' sync
Yaniv Bronhaim has submitted this change and it was merged. Change subject: vdsm: making PM 'on' and 'off' sync .. vdsm: making PM 'on' and 'off' sync Consider the following scenario: DC1 with H1 (with PM) and H2 on cluster C1 another host H3 on DC1 cluster C2 When we are blocking the communication with iptables from H2 to H1 PM card and use the default proxy preferences (cluster, dc) a Restart operation will always fail. VDSM should perform start/stop sync and return the correct script returned code in order that engine will know that H2 fails to perform the operation and will try to use H3 as a proxy for the failed operation This patch changes the fenceNode function to be sync when 'on' 'off' operation are used in the same manner of 'status' operation and return the correct exit code of the invoked fencing script to the caller. Change-Id: I81d45977664c99c954c4663a26642e6e21cc65e3 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1139643 Signed-off-by: Eli Mesika emes...@redhat.com Reviewed-on: http://gerrit.ovirt.org/33469 Reviewed-by: Dan Kenigsberg dan...@redhat.com Reviewed-by: Yaniv Bronhaim ybron...@redhat.com --- M vdsm/API.py 1 file changed, 16 insertions(+), 15 deletions(-) Approvals: Eli Mesika: Verified Yaniv Bronhaim: Looks good to me, approved Dan Kenigsberg: Looks good to me, but someone else must approve -- To view, visit http://gerrit.ovirt.org/33469 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81d45977664c99c954c4663a26642e6e21cc65e3 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Eli Mesika emes...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Eli Mesika emes...@redhat.com Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com Gerrit-Reviewer: automat...@ovirt.org ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: vdsm: making PM 'on' and 'off' sync
Yaniv Bronhaim has posted comments on this change. Change subject: vdsm: making PM 'on' and 'off' sync .. Patch Set 1: Code-Review+2 -- To view, visit http://gerrit.ovirt.org/33469 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I81d45977664c99c954c4663a26642e6e21cc65e3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Eli Mesika emes...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Eli Mesika emes...@redhat.com Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: vdsm: making PM 'on' and 'off' sync
oVirt Jenkins CI Server has posted comments on this change. Change subject: vdsm: making PM 'on' and 'off' sync .. Patch Set 2: Build Failed http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-el6-x86_64_merged/20/ : FAILURE http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-fc19-x86_64_merged/16/ : FAILURE http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-fc20-x86_64_merged/15/ : FAILURE http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-el7-x86_64_merged/20/ : FAILURE -- To view, visit http://gerrit.ovirt.org/33469 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I81d45977664c99c954c4663a26642e6e21cc65e3 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Eli Mesika emes...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Eli Mesika emes...@redhat.com Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com Gerrit-Reviewer: Yaniv Bronhaim ybron...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches