Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1966153

Summary: Conditional gathering
Product: OpenShift Container Platform Reporter: Serhii Zakharov <szakharo>
Component: Insights OperatorAssignee: Serhii Zakharov <szakharo>
Status: CLOSED ERRATA QA Contact: Dmitry Misharov <dmisharo>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.9CC: aos-bugs, ctauchen, inecas, mklika, tremes, wking
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
This PR implements a new gatherer needed by CCXDEV-4431. Right now it collects logs and image streams of namespace "openshift-cluster-samples-operator" if alert "SamplesImagestreamImportFailing" is firing, but it designed in a way that it can be further extended to run X gatherer with Y params on Z condition.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-26 17:22:37 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:

Description Serhii Zakharov 2021-05-31 14:22:23 UTC
This PR implements a new gatherer needed by CCXDEV-4431. Right now it collects logs and image streams of namespace "openshift-cluster-samples-operator" if alert "SamplesImagestreamImportFailing" is firing, but it designed in a way that it can be further extended to run X gatherer with Y params on Z condition.

Comment 7 Dmitry Misharov 2021-10-20 08:20:24 UTC
Verified on 4.9.0-0.nightly-2021-10-20-023733.

Verification steps:

1. Disable Cluster Version Operator
oc scale --replicas 0 deployments/cluster-version-operator -n openshift-cluster-version
2. Disable Cluster Monitoring Operator
oc scale --replicas 0 deployment/cluster-monitoring-operator --namespace openshift-monitoring
3. Disable Prometheus Operator
oc scale --replicas 0 deployment/prometheus-operator --namespace openshift-monitoring
4. Edit "SamplesImagestreamImportFailing" alert in "prometheus-k8s-rulefiles-0" config map of "openshift-monitoring"
   4.1. Trigger the alert unconditionally using the following expression: "1 > bool 0"
   4.2. Decrease trigger time to "1m"
5. Wait until the alert will be firing
6. Create an image stream in "openshift-cluster-samples-operator" namespace
7. Restart the Insights Operator
8. Wait until an archive will be created
9. Download the archive

The archive contains "cluster-samples-operator" logs and the image stream manifest under "conditional" directory.

Comment 9 errata-xmlrpc 2021-10-26 17:22:37 UTC
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.9.4 bug fix update), 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-2021:3935

Comment 10 W. Trevor King 2021-11-02 22:42:34 UTC
Not clear to me why this got linked to the 4.9.4 errata; the backing PR landed in June, long before 4.9 forked off from master [1].  So the code was definitely in 4.9.0 as well.

[1]: https://github.com/openshift/insights-operator/pull/433#event-4950262577