Bug 2098581
Summary: | APIRemovedInNextEUSReleaseInUse alert fired for openshift-compliance cronjobs | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Junqi Zhao <juzhao> |
Component: | Compliance Operator | Assignee: | Matt Rogers <mrogers> |
Status: | CLOSED ERRATA | QA Contact: | |
Severity: | low | Docs Contact: | Jeana Routh <jrouth> |
Priority: | low | ||
Version: | 4.10 | CC: | jhrozek, jrouth, lbragsta, mrogers, wenshen, xiyuan |
Target Milestone: | --- | ||
Target Release: | 4.12.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
* Previously, the Compliance Operator used an old version of the Operator SDK, which is a dependency for building Operators. This caused alerts about deprecated Kubernetes functionality used by the Operator SDK. With this release, the Compliance Operator is upgraded to version 0.1.55, which includes an updated version of the Operator SDK.
(link:https://bugzilla.redhat.com/show_bug.cgi?id=2098581[*BZ#2098581*])
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2022-11-02 16:00:53 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
Junqi Zhao
2022-06-20 06:54:03 UTC
This will be fixed once we merge the operator-sdk upgrade Assigning to Matt who works on the SDK upgrade. Hi Jakub, Tried to verify with 4.12.0-0.nightly-2022-09-25-071630 and compliance-operator.v0.1.55, the alert still exists. Could you please help to double check? Thanks. $ token=`oc create token prometheus-k8s -n openshift-monitoring` $ oc -n openshift-compliance exec compliance-operator-7489d57b55-6c2j5 -- curl -k -H "Authorization: Bearer $token" 'https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/query?' --data-urlencode 'query=ALERTS{alertname="APIRemovedInNextEUSReleaseInUse",resource="cronjobs"}' | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 403 0 308 100 95 1974 608 --:--:-- --:--:-- --:--:-- 2583 { "status": "success", "data": { "resultType": "vector", "result": [ { "metric": { "__name__": "ALERTS", "alertname": "APIRemovedInNextEUSReleaseInUse", "alertstate": "pending", "group": "batch", "namespace": "openshift-kube-apiserver", "resource": "cronjobs", "severity": "info", "version": "v1beta1" }, "value": [ 1664161876.437, "1" ] } ] } } $ oc get apirequestcounts cronjobs.v1beta1.batch -o yaml apiVersion: apiserver.openshift.io/v1 kind: APIRequestCount metadata: creationTimestamp: "2022-09-26T02:35:22Z" generation: 1 name: cronjobs.v1beta1.batch resourceVersion: "66324" uid: 4ff4faaf-1b43-4ed6-8523-54bbd1d83e66 spec: numberOfUsersToReport: 10 status: currentHour: byNode: - byUser: - byVerb: - requestCount: 1 verb: watch requestCount: 1 userAgent: compliance-operator/v0.0.0 username: system:serviceaccount:openshift-compliance:compliance-operator nodeName: 10.0.0.6 requestCount: 1 requestCount: 1 last24h: - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - byUser: - byVerb: - requestCount: 2 verb: create - requestCount: 1 verb: delete - requestCount: 1 verb: list - requestCount: 4 verb: watch requestCount: 8 userAgent: compliance-operator/v0.0.0 username: system:serviceaccount:openshift-compliance:compliance-operator nodeName: 10.0.0.6 requestCount: 8 requestCount: 8 - byNode: - byUser: - byVerb: - requestCount: 1 verb: watch requestCount: 1 userAgent: compliance-operator/v0.0.0 username: system:serviceaccount:openshift-compliance:compliance-operator nodeName: 10.0.0.6 requestCount: 1 requestCount: 1 - requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 - byNode: - nodeName: 10.0.0.6 requestCount: 0 requestCount: 0 removedInRelease: "1.25" requestCount: 9 $ oc explain cronjobs KIND: CronJob VERSION: batch/v1 DESCRIPTION: CronJob represents the configuration of a single cron job. ... Thanks, I posted a new patch. bug verification pass with pre-merge process.The APIRemovedInNextEUSReleaseInUse alert won't fired for openshift-compliance cronjobs $ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.12.0-0.nightly-2022-09-25-071630 True False 11h Cluster version is 4.12.0-0.nightly-2022-09-25-071630 $ oc get pod NAME READY STATUS RESTARTS AGE compliance-operator-d47877fbd-4db77 1/1 Running 1 (6m25s ago) 6m33s ocp4-openshift-compliance-pp-7cb94bcdc6-nhjwj 1/1 Running 0 6m13s rhcos4-openshift-compliance-pp-67c79bc97b-4qtl4 1/1 Running 0 6m13s $ token=`oc create token prometheus-k8s -n openshift-monitoring` $ oc -n openshift-compliance exec compliance-operator-d47877fbd-4db77 -- curl -k -H "Authorization: Bearer $token" 'https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/query?' --data-urlencode 'query=ALERTS{alertname="APIRemovedInNextEUSReleaseInUse",resource="cronjobs"}' | jq time="2022-09-26T13:17:59Z" level=error msg="exec failed: unable to start container process: exec: \"curl\": executable file not found in $PATH" command terminated with exit code 255 Verification pass with 4.12.0-0.nightly-2022-09-26-111919 + compliance-operator.v0.1.56 $ token=`oc create token prometheus-k8s -n openshift-monitoring` $ oc -n openshift-compliance exec compliance-operator-7799fd4cd9-wsb9b -- curl -k -H "Authorization: Bearer $token" 'https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/query?' --data-urlencode 'query=ALERTS{alertname="APIRemovedInNextEUSReleaseInUse",resource="cronjobs"}' | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 158 0 63 100 95 1285 1938 --:--:-- --:--:-- --:--:-- 3224 { "status": "success", "data": { "resultType": "vector", "result": [] } } 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 Compliance Operator 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-2022:6657 |