Bug 1449538 - [Eventing]: url validation to be done with webhook-add
Summary: [Eventing]: url validation to be done with webhook-add
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: eventsapi
Version: rhgs-3.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Bug Updates Notification Mailing List
QA Contact: Sweta Anandpara
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-10 08:51 UTC by Sweta Anandpara
Modified: 2018-11-19 06:53 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-19 06:53:11 UTC
Embargoed:


Attachments (Terms of Use)

Description Sweta Anandpara 2017-05-10 08:51:12 UTC
Description of problem:
=======================

Currently on an eventing enabled cluster when we would want to test and add a webhook, the command 'gluster-eventapi webhook-test' does catch the exceptions (if any) and errors out with the message. A similar error when committed on the command 'gluster-eventsapi webhook-add' (say, missing schema) does NOT error out but gets executed successfully. From the usability aspect it is expected to print out an error to intimate the user that the command is not successful, and why.

Version-Release number of selected component (if applicable):
=============================================================
3.8.4-23


How reproducible:
=================
Always


Additional info:
================
In the below pasted output, the command 'gluster-eventsapi webhook-add' gets executed successfully even when the webhook-path specified is missing the protocol information.

[root@dhcp47-121 ~]# gluster-eventsapi webhook-test 10.70.35.119:9001/listen
+-----------------------------------+-------------+--------------------------------------------------------------------------+
|                NODE               | NODE STATUS |                                                           WEBHOOK STATUS |
+-----------------------------------+-------------+--------------------------------------------------------------------------+
| dhcp47-113.lab.eng.blr.redhat.com |          UP | NOT OK: No connection adapters were found for '10.70.35.119:9001/listen' |
| dhcp47-114.lab.eng.blr.redhat.com |          UP | NOT OK: No connection adapters were found for '10.70.35.119:9001/listen' |
| dhcp47-115.lab.eng.blr.redhat.com |          UP | NOT OK: No connection adapters were found for '10.70.35.119:9001/listen' |
| dhcp47-116.lab.eng.blr.redhat.com |          UP | NOT OK: No connection adapters were found for '10.70.35.119:9001/listen' |
| dhcp47-117.lab.eng.blr.redhat.com |          UP | NOT OK: No connection adapters were found for '10.70.35.119:9001/listen' |
|             localhost             |          UP | NOT OK: No connection adapters were found for '10.70.35.119:9001/listen' |
+-----------------------------------+-------------+--------------------------------------------------------------------------+
[root@dhcp47-121 ~]# gluster-eventsapi webhook-add 10.70.35.119:9001/listen
+-----------------------------------+-------------+-------------+
|                NODE               | NODE STATUS | SYNC STATUS |
+-----------------------------------+-------------+-------------+
| dhcp47-113.lab.eng.blr.redhat.com |          UP |          OK |
| dhcp47-114.lab.eng.blr.redhat.com |          UP |          OK |
| dhcp47-115.lab.eng.blr.redhat.com |          UP |          OK |
| dhcp47-116.lab.eng.blr.redhat.com |          UP |          OK |
| dhcp47-117.lab.eng.blr.redhat.com |          UP |          OK |
|             localhost             |          UP |          OK |
+-----------------------------------+-------------+-------------+
[root@dhcp47-121 ~]# gluster-eventsapi status
Webhooks: 
http://10.70.35.21:9000/listen
10.70.35.119:9001/listen

+-----------------------------------+-------------+-----------------------+
|                NODE               | NODE STATUS | GLUSTEREVENTSD STATUS |
+-----------------------------------+-------------+-----------------------+
| dhcp47-113.lab.eng.blr.redhat.com |          UP |                    OK |
| dhcp47-114.lab.eng.blr.redhat.com |          UP |                    OK |
| dhcp47-115.lab.eng.blr.redhat.com |          UP |                    OK |
| dhcp47-116.lab.eng.blr.redhat.com |          UP |                    OK |
| dhcp47-117.lab.eng.blr.redhat.com |          UP |                    OK |
|             localhost             |          UP |                    OK |
+-----------------------------------+-------------+-----------------------+
[root@dhcp47-121 ~]#


Note You need to log in before you can comment on or make changes to this bug.