Bug 1377187

Summary: [dedicated-whearntest] Kibana UI can not be launched on dedicated env
Product: OpenShift Online Reporter: Xia Zhao <xiazhao>
Component: LoggingAssignee: Jeff Cantrill <jcantril>
Status: CLOSED CURRENTRELEASE QA Contact: Xia Zhao <xiazhao>
Severity: high Docs Contact:
Priority: high    
Version: 3.xCC: abhgupta, aos-bugs, ewolinet, jeder, jmencak, rlourenc, rmeggins, tstclair, wsun, xiazhao
Target Milestone: ---Keywords: TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-04 13:06:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
configmap
none
events
none
es_pod_log_#1
none
es_pod_log_#2
none
es_pod_log_#1_good
none
es_pod_log_#2_good none

Comment 1 Xia Zhao 2016-09-19 06:50:11 UTC
Created attachment 1202317 [details]
configmap

Comment 2 Xia Zhao 2016-09-19 06:50:34 UTC
Created attachment 1202318 [details]
events

Comment 3 Xia Zhao 2016-09-19 06:50:56 UTC
Created attachment 1202319 [details]
es_pod_log_#1

Comment 4 Xia Zhao 2016-09-19 06:51:18 UTC
Created attachment 1202320 [details]
es_pod_log_#2

Comment 7 Xia Zhao 2016-09-20 01:43:42 UTC
Created attachment 1202661 [details]
es_pod_log_#1_good

Comment 8 Xia Zhao 2016-09-20 01:44:10 UTC
Created attachment 1202662 [details]
es_pod_log_#2_good

Comment 9 Xia Zhao 2016-09-20 01:50:40 UTC
@Eric, sorry for my mistake--refreshed the es pod logs with good ones.

Comment 10 Xia Zhao 2016-09-20 03:30:05 UTC
@Eric, seems the es pod is not recovered now, encountered this exception in its log:

[2016-09-19 15:59:19,414][ERROR][io.fabric8.elasticsearch.plugin.acl.DynamicACLFilter] [Lyja] Error checking ACL when seeding
org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];
	at org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedException(ClusterBlocks.java:151)
	at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.checkGlobalBlock(TransportShardSingleOperationAction.java:103)
	at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.<init>(TransportShardSingleOperationAction.java:132)

Also ES is not connectable from curator:

# oc exec logging-curator-3-hiexf -- curator --host logging-es --use_ssl --certificate /etc/curator/keys/ca --client-cert /etc/curator/keys/cert --client-key /etc/curator/keys/key --loglevel ERROR show indices --all-indices
2016-09-19 22:21:26,084 ERROR     Failed to get indices.
2016-09-19 22:21:26,085 ERROR     No indices found in Elasticsearch
ERROR. No indices found in Elasticsearch.
error: error executing remote command: error executing command in container: Error executing in Docker Container: 1

BTW, I also checked on another OCP environment that the log retention policy of 5 days to the .defaults index, it worked fine to normal indices there...

Comment 12 ewolinet 2016-09-20 17:16:50 UTC
The cluster is back in a 'green' state and I verified that I could connect with Kibana.

Fluentd is not currently scaled up at this time since we are still discussing the policy for retention with the test namespaces that are created as part of a check in this environment.

Comment 13 Xia Zhao 2016-09-21 06:14:27 UTC
@Eric, 

Yes, I'm able to launch the kibana UI now, but get this error: 

Index Patterns 
Warning No default index pattern. You must select or create one to continue.

I wonder if it's caused by the absence of fluentd pod?

And here is the corresponding errors in es:

Error while apply() due to com.floragunn.searchguard.tokeneval.MalformedConfigurationException: no bypass or execute filters at all for action indices:admin/get
com.floragunn.searchguard.tokeneval.MalformedConfigurationException: no bypass or execute filters at all
	at com.floragunn.searchguard.tokeneval.TokenEvaluator$Evaluator.validateAndMerge(TokenEvaluator.java:374)
	at com.floragunn.searchguard.tokeneval.TokenEvaluator$Evaluator.<init>(TokenEvaluator.java:362)
	at com.floragunn.searchguard.tokeneval.TokenEvaluator.getEvaluator(TokenEvaluator.java:310)

Comment 15 ewolinet 2016-09-21 14:37:04 UTC
@Xia,

That exception is a known issue from going to the 'settings' page in Kibana, it is due to not having authorization to look up mappings for the default 'logstash-*' pattern.

The absence of Fluentd pods running would only mean that there are not new log records to view.

Looking in the logs I do see that there is a NPE which was fixed in the OpenShift-Elasticsearch-plugin for the ES 2.x, which is caused by a change in Kibana version when checking for the default index pattern. I'll put in a fix for that today. It is low impact since all it prevents is a user from having their default index pattern set for them in Kibana.

The work around is to manually set the default index pattern in Kibana from the settings page > click on the index pattern you would like to be the default > click on the 'star' icon to set it as your default.

Comment 17 Xia Zhao 2016-09-22 02:02:55 UTC
@Eric,

Thanks to the qucik fix -- kibana UI give me the page with "No results found " in title which is expected with the absence of fluentd.

Comment 18 Xia Zhao 2016-09-23 02:06:33 UTC
Verified on dedicated-whearntest that fluentd pods are back, and be able to get log entries for different indices on kibana UI. Set to verified.