Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1389263 - [3.4] the summary of json report should include total/ok number after certificate expiry check
[3.4] the summary of json report should include total/ok number after certifi...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.4.0
Unspecified Unspecified
medium Severity low
: ---
: 3.4.z
Assigned To: Tim Bielawa
liujia
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-27 06:04 EDT by liujia
Modified: 2017-03-06 11:37 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Total OK/Checked certificates are included in openshift_certificate_expiry role JSON check results. Reason: Increased visibility and easier checking for admins. Result: "Total" and "OK" counts are always included in JSON check results.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-06 11:37:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0448 normal SHIPPED_LIVE Important: ansible and openshift-ansible security and bug fix update 2017-03-06 16:36:25 EST

  None (edit)
Description liujia 2016-10-27 06:04:31 EDT
Description of problem:

Run a playbook with openshift_certificate_expiry role to check certs with json report generated, the report's summary part has only expired&warning numbers but not total numbers and 'ok' numbers. It is not convenient for user to catch the check result.

<--snip-->
"summary": {
    "expired": 0,
    "warning": 0
  }
<--snip-->

So QE suggested to add them to help user quickly know how many certs have been checked just like what is be output in html report:

Checked 14 total certificates. Expired/Warning/OK: 0/0/14. Warning window: 30 days 

Version-Release number of selected component (if applicable):
openshift-ansible-roles-3.4.12-1.git.0.0b5efd2.el7.noarch


How reproducible:
always

Steps to Reproduce:
1.Wrote a playbook to run role openshift_certificate_expiry.
cat playbook.yml
---
- name: Check cert expirys
  hosts: all
  become: yes
  gather_facts: no
  vars:
    openshift_certificate_expiry_show_all: yes
    openshift_certificate_expiry_generate_html_report: yes
    openshift_certificate_expiry_save_json_results: yes
  roles:
    - role: openshift_certificate_expiry

2.It will generate html and json report in default directory.

Actual results:
<--snip-->
"summary": {
    "expired": 0,
    "warning": 0
  }
<--snip-->

Expected results:
Json report should include total/ok number like following:
<--snip-->
"summary": {
    "total": 14
    "expired": 0,
    "warning": 0,
    "ok":14
  }
<--snip-->

Additional info:
Comment 1 Tim Bielawa 2016-12-12 16:41:03 EST
Was working on a patch for this on GitHub:

https://github.com/openshift/openshift-ansible/pull/2829
Comment 2 Tim Bielawa 2016-12-19 13:01:30 EST
Patch has been merged into master.
Comment 4 liujia 2017-02-07 03:00:27 EST
Version:
atomic-openshift-utils-3.4.56-1.git.0.7ba9968.el7.noarch

Steps:
1. Install ocp3.4
2. Wrote a playbook to run role openshift_certificate_expiry.
3. Check result is right and total/ok numbers are added into json report now
<snip>
  },
  "summary": {
    "expired": 0,
    "ok": 14,
    "total": 14,
    "warning": 0
  }
<snip>

Bug has been fixed, change status.
Comment 6 errata-xmlrpc 2017-03-06 11:37:09 EST
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, 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/RHSA-2017:0448

Note You need to log in before you can comment on or make changes to this bug.