[ 
https://issues.apache.org/jira/browse/KNOX-2357?focusedWorklogId=427511&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-427511
 ]

ASF GitHub Bot logged work on KNOX-2357:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Apr/20 08:08
            Start Date: 27/Apr/20 08:08
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on pull request #326:
URL: https://github.com/apache/knox/pull/326#issuecomment-619809824


   My two cents:
   - checking the `username` and `passwordAlias` here is not enough because in 
CM discovery Knox defaults to `cm.discovery.user` and `cm.discovery.password` 
if they are not defined -> following the new logic, performing the emptyness 
check here does not mean the user does not want service discovery
   - checking the `address` here is not enough because in Ambari discovery Knox 
defaults to the value of `gateway.discovery.default.address` Gateway 
configuration
   
   What if we simply rely on the discovery type. If none is selected -> no 
discovery will be performed. Discovery type is still optional (that is, the 
end-user does not need to select one) and makes the code easier to read and 
understand:
   - `performDiscovery` should only be invoked if discovery type is not `null` 
[here](https://github.com/apache/knox/blob/v1.4.0/gateway-topology-simple/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java#L109)
   - the [default discovery 
type](https://github.com/apache/knox/blob/v1.4.0/gateway-topology-simple/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java#L71)
 should be removed
   - we may want to add some `WARN` level messages in the log in case discovery 
type is not selected but any of the other discovery related configuration is 
present. This check should be implemented in `SimpleDescriptorImpl` instead of 
in `SimpleDescriptorHandler` where only the log should be placed.
   
   Any thoughts?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 427511)
    Time Spent: 50m  (was: 40m)

> Descriptor handler should not default discovery type to Ambari unless there 
> is discovery configuration
> ------------------------------------------------------------------------------------------------------
>
>                 Key: KNOX-2357
>                 URL: https://issues.apache.org/jira/browse/KNOX-2357
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 1.4.0
>            Reporter: Philip Zampino
>            Assignee: Philip Zampino
>            Priority: Major
>             Fix For: 1.5.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> If no discovery-type property is defined in a simple descriptor, then the 
> descriptor handler defaults it to Ambari. The Ambari discovery fails if the 
> other required properties are missing.
> If discovery is no intended for a descriptor (no discovery config), then the 
> discovery should be skipped rather than defaulting to the Ambari 
> implementation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to