You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/04/22 12:30:00 UTC

[jira] [Work logged] (KNOX-2351) Prevent the CM configuration monitor from being suspended

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

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

                Author: ASF GitHub Bot
            Created on: 22/Apr/20 12:29
            Start Date: 22/Apr/20 12:29
    Worklog Time Spent: 10m 
      Work Description: smolnar82 opened a new pull request #324:
URL: https://github.com/apache/knox/pull/324


   ## What changes were proposed in this pull request?
   
   Surrounding the CM configuration check logic with a `try/catch` block and logging if any issue occurred during the operation.
   
   ## How was this patch tested?
   
   Manually tested:
   
   1. deployed Knox w/o the in #319 and deployed a descriptor pointing to a CM cluster where I made a configuration change in one the services
   2. waited until CM configuration change monitoring occurred
   3. as expected, the monitoring failed. This time the monitoring thread did not get suspended and the appropriate log message was shown:
   
   ```
   2020-04-21 15:38:00,270 DEBUG discovery.cm (PollingConfigurationAnalyzer.java:run(169)) - Checking Cluster 1 @ http://$CM_HOST:7180 for configuration changes...
   2020-04-21 15:38:00,274 DEBUG discovery.cm (PollingConfigurationAnalyzer.java:getRelevantEvents(373)) - Querying restart events from Cluster 1 @ http://$CM_HOST:7180 since 2020-04-21T13:37:00.010Z
   2020-04-21 15:38:45,440 ERROR discovery.cm (PollingConfigurationAnalyzer.java:run(201)) - Error while monitoring ClouderaManager configuration changes: java.lang.NullPointerException
   java.lang.NullPointerException
   	at org.apache.knox.gateway.topology.discovery.cm.monitor.PollingConfigurationAnalyzer.isRelevantEvent(PollingConfigurationAnalyzer.java:398)
   	at org.apache.knox.gateway.topology.discovery.cm.monitor.PollingConfigurationAnalyzer.getRelevantEvents(PollingConfigurationAnalyzer.java:383)
   	at org.apache.knox.gateway.topology.discovery.cm.monitor.PollingConfigurationAnalyzer.run(PollingConfigurationAnalyzer.java:180)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)
   ```
   


----------------------------------------------------------------
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:
users@infra.apache.org


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

            Worklog Id:     (was: 426142)
    Remaining Estimate: 0h
            Time Spent: 10m

> Prevent the CM configuration monitor from being suspended
> ---------------------------------------------------------
>
>                 Key: KNOX-2351
>                 URL: https://issues.apache.org/jira/browse/KNOX-2351
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: cm-discovery
>    Affects Versions: 1.4.0
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 1.5.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> While debugging the root cause of KNOX-2350, I found out that if there was any uncaught issue while monitoring CM configuration in {{PollingConfigurationAnalyzer}} the entire thread became suspended and there was no easy way to figure out what the problem was.
> This needs to be fixed.



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