Bug 1848186
| Summary: | Web console generates bad YAML for default clusterlogging CR - results in bad retentionPolicy configuration where infra and app indices never get created. | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Mike Fiedler <mifiedle> | |
| Component: | Logging | Assignee: | Periklis Tsirakidis <periklis> | |
| Status: | CLOSED ERRATA | QA Contact: | Anping Li <anli> | |
| Severity: | high | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 4.5 | CC: | anli, aos-bugs, periklis, qitang | |
| Target Milestone: | --- | |||
| Target Release: | 4.6.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | No Doc Update | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1864284 (view as bug list) | Environment: | ||
| Last Closed: | 2020-10-27 16:08:03 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: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1864284 | |||
|
Description
Mike Fiedler
2020-06-17 21:24:09 UTC
Hi @Mike, I didn't hit this issue.
I noticed in your clusterlogging yaml file, it has:
retentionPolicy:
logs.app:
maxAge: 1d
I'm afraid the format is not correct, could you please try again with the below format?
retentionPolicy:
application:
maxAge: 1d
Besides, if you only specify retentionPolicy for app logs, then only app logs will be received, details are in https://bugzilla.redhat.com/show_bug.cgi?id=1845788#c0 and https://bugzilla.redhat.com/show_bug.cgi?id=1845788#c4 .
The default yaml generated in the console turned out to be the issue (as hinted at by Qiaoling in comment 2). Changing this bz to reflect the root issue - let me know if you prefer a new bz. I think this is mustfix for 4.5 GA After installing CLO and ELO, going to Installed Operators -> Cluster Logging-> YAML view presents the user with this ClusterLogging yaml: apiVersion: logging.openshift.io/v1 kind: ClusterLogging metadata: namespace: openshift-logging name: instance labels: {} spec: collection: logs: type: fluentd curation: curator: schedule: 30 3 * * * type: curator logStore: elasticsearch: nodeCount: 3 redundancyPolicy: SingleRedundancy storage: size: 200G storageClassName: gp2 retentionPolicy: logs.app: maxAge: 7d type: elasticsearch managementState: Managed visualization: kibana: replicas: 1 type: kibana The retentionPolicy is incorrect (API change since 4.4? upgrade issue?) and results in a logging config where the infra-* and app-* indices never get created. See https://bugzilla.redhat.com/show_bug.cgi?id=1845788#c0 and https://bugzilla.redhat.com/show_bug.cgi?id=1845788#c4. Changing the retentionPolicy to the one below allows logging to work correctly. retentionPolicy: application: maxAge: 1d infra: maxAge: 3h audit: maxAge: 2w Test in 4.6. the spec created from console.
#oc get clusterlogging instance -o json | jq '.spec'
{
"collection": {
"logs": {
"type": "fluentd"
}
},
"curation": {
"curator": {
"schedule": "30 3 * * *"
},
"type": "curator"
},
"logStore": {
"elasticsearch": {
"nodeCount": 3,
"redundancyPolicy": "SingleRedundancy",
"storage": {
"size": "200G",
"storageClassName": "gp2"
}
},
"retentionPolicy": {
"application": {
"maxAge": "7d"
}
},
"type": "elasticsearch"
},
"managementState": "Managed",
"visualization": {
"kibana": {
"replicas": 1
},
"type": "kibana"
}
}
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4196 |