Bug 1891814

Summary: Enable YAML probe to work with sets of values
Product: Red Hat Enterprise Linux 8 Reporter: Juan Antonio Osorio <josorior>
Component: openscapAssignee: Evgeny Kolesnikov <ekolesni>
Status: CLOSED ERRATA QA Contact: Matus Marhefka <mmarhefk>
Severity: high Docs Contact:
Priority: medium    
Version: 8.2CC: ekolesni, matyc, mhaicman
Target Milestone: rcKeywords: ZStream
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openscap-1.3.4-1.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1895715 (view as bug list) Environment:
Last Closed: 2021-05-18 15:29:12 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: 1895715    

Description Juan Antonio Osorio 2020-10-27 12:43:40 UTC
Description of problem:

The current YAML probe has the limitation that it cannot work with sets of values. Meaning, we cannot verify values when we depend on more than one value to be set.

One instance is checking that the apiserver is in an upgradable state:

apiVersion: config.openshift.io/v1
kind: ClusterOperator
...
status:
  conditions:
  - lastTransitionTime: "2020-10-27T11:36:45Z"
    reason: AsExpected
    status: "False"
    type: Degraded
  - lastTransitionTime: "2020-10-27T11:44:12Z"
    reason: AsExpected
    status: "False"
    type: Progressing
  - lastTransitionTime: "2020-10-27T11:43:38Z"
    reason: AsExpected
    status: "True"
    type: Available
  - lastTransitionTime: "2020-10-27T11:36:43Z"
    reason: AsExpected
    status: "True"
    type: Upgradeable

In this case, we have to iterate through the conditions and check that the type is "Upgradeable and the status is "True".


How reproducible:
100%


Additional info:
Besides the aforementioned example, there are other examples where such a functionality is needed. Without this, we'll be quite limited in the checks we can write for OCP4.

Comment 1 Juan Antonio Osorio 2020-10-27 12:44:14 UTC
This is addressed by https://github.com/OpenSCAP/openscap/pull/1552

Comment 14 errata-xmlrpc 2021-05-18 15:29:12 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 (openscap bug fix and enhancement 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/RHEA-2021:1784