Bug 2117347

Summary: ClusterVersion history pruner does not always retain initial completed update entry
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: Cluster Version OperatorAssignee: Jack Ottofaro <jack.ottofaro>
Status: CLOSED ERRATA QA Contact: Evgeni Vakhonin <evakhoni>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.11CC: aos-team-ota, wking
Target Milestone: ---Keywords: FastFix
Target Release: 4.7.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-13 13:53:37 UTC Type: ---
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: 2109962    
Bug Blocks: 2118489    

Comment 1 Evgeni Vakhonin 2022-08-14 07:32:43 UTC
using the same steps as in https://bugzilla.redhat.com/show_bug.cgi?id=2108292#c1
reproducing on 4.7.0-0.nightly-2022-08-11-164733 4.7.0-0.nightly-2022-08-12-103738

history lenght is 50
last 3 items before prune
[
  {
    "completionTime": "2022-08-14T07:20:03Z",
    "image": "registry.ci.openshift.org/ocp/release@sha256:ae74544205333e4c4c72d5b0017f77e5997958607e56070e7c17660c884a868b",
    "startedTime": "2022-08-14T07:18:56Z",
    "state": "Completed",
    "verified": false,
    "version": "4.7.0-0.nightly-2022-08-11-164733"
  },
  {
    "completionTime": "2022-08-14T07:18:56Z",
    "image": "registry.ci.openshift.org/ocp/release@sha256:1f73ff5f9999f92d6ebbc66e4bd0fca30aed358cd68d2288ab02415c7c96d683",
    "startedTime": "2022-08-14T07:18:36Z",
    "state": "Partial",
    "verified": false,
    "version": "4.7.0-0.nightly-2022-08-12-103738"
  },
  {
    "completionTime": "2022-08-14T06:32:31Z",
    "image": "registry.ci.openshift.org/ocp/release@sha256:ae74544205333e4c4c72d5b0017f77e5997958607e56070e7c17660c884a868b",
    "startedTime": "2022-08-14T06:05:25Z",
    "state": "Completed",
    "verified": false,
    "version": "4.7.0-0.nightly-2022-08-11-164733"
  }
]

sending upgrade command to 4.7.0-0.nightly-2022-08-11-164733 ok
waiting for upgrade to start: 4.7.0-0.nightly-2022-08-11-164733
history lenght still 50
last 3 items after prune
[
  {
    "completionTime": "2022-08-14T07:20:28Z",
    "image": "registry.ci.openshift.org/ocp/release@sha256:1f73ff5f9999f92d6ebbc66e4bd0fca30aed358cd68d2288ab02415c7c96d683",
    "startedTime": "2022-08-14T07:20:11Z",
    "state": "Partial",
    "verified": false,
    "version": "4.7.0-0.nightly-2022-08-12-103738"
  },
  {
    "completionTime": "2022-08-14T07:20:03Z",
    "image": "registry.ci.openshift.org/ocp/release@sha256:ae74544205333e4c4c72d5b0017f77e5997958607e56070e7c17660c884a868b",
    "startedTime": "2022-08-14T07:18:56Z",
    "state": "Completed",
    "verified": false,
    "version": "4.7.0-0.nightly-2022-08-11-164733"
  },
  {
    "completionTime": "2022-08-14T07:18:56Z",
    "image": "registry.ci.openshift.org/ocp/release@sha256:1f73ff5f9999f92d6ebbc66e4bd0fca30aed358cd68d2288ab02415c7c96d683",
    "startedTime": "2022-08-14T07:18:36Z",
    "state": "Partial",
    "verified": false,
    "version": "4.7.0-0.nightly-2022-08-12-103738"
  }
]

reproduced successfully - the last "Completed" item was pruned.



pre-merge verifying on 4.7.0-0.ci.test-2022-08-14-055924-ci-ln-h541hp2-latest to 4.7.0-0.ci.test-2022-08-14-060647-ci-ln-96x0wx2-latest

history lenght is 50
last 3 items before prune
[
  {
    "completionTime": "2022-08-14T06:58:46Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-h541hp2/release@sha256:64f042625b80c5b03364a2bf8734215ca89dddcd1c5c83a0c23e095cc2fc9a6d",
    "startedTime": "2022-08-14T06:57:41Z",
    "state": "Completed",
    "verified": false,
    "version": "4.7.0-0.ci.test-2022-08-14-055924-ci-ln-h541hp2-latest"
  },
  {
    "completionTime": "2022-08-14T06:57:41Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-96x0wx2/release@sha256:d22ea2a17282aaf6bd488693e8f1db17d738e65834c60d7ab528173088b5d22a",
    "startedTime": "2022-08-14T06:57:18Z",
    "state": "Partial",
    "verified": false,
    "version": "4.7.0-0.ci.test-2022-08-14-060647-ci-ln-96x0wx2-latest"
  },
  {
    "completionTime": "2022-08-14T06:40:07Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-h541hp2/release@sha256:64f042625b80c5b03364a2bf8734215ca89dddcd1c5c83a0c23e095cc2fc9a6d",
    "startedTime": "2022-08-14T06:12:21Z",
    "state": "Completed",
    "verified": false,
    "version": "4.7.0-0.ci.test-2022-08-14-055924-ci-ln-h541hp2-latest"
  }
]
sending upgrade command to 4.7.0-0.ci.test-2022-08-14-055924-ci-ln-h541hp2-latest ok
waiting for upgrade to start: 4.7.0-0.ci.test-2022-08-14-055924-ci-ln-h541hp2-latest
history lenght still 50
last 3 items after prune
[
  {
    "completionTime": "2022-08-14T06:59:12Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-96x0wx2/release@sha256:d22ea2a17282aaf6bd488693e8f1db17d738e65834c60d7ab528173088b5d22a",
    "startedTime": "2022-08-14T06:59:01Z",
    "state": "Partial",
    "verified": false,
    "version": "4.7.0-0.ci.test-2022-08-14-060647-ci-ln-96x0wx2-latest"
  },
  {
    "completionTime": "2022-08-14T06:58:46Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-h541hp2/release@sha256:64f042625b80c5b03364a2bf8734215ca89dddcd1c5c83a0c23e095cc2fc9a6d",
    "startedTime": "2022-08-14T06:57:41Z",
    "state": "Completed",
    "verified": false,
    "version": "4.7.0-0.ci.test-2022-08-14-055924-ci-ln-h541hp2-latest"
  },
  {
    "completionTime": "2022-08-14T06:40:07Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-h541hp2/release@sha256:64f042625b80c5b03364a2bf8734215ca89dddcd1c5c83a0c23e095cc2fc9a6d",
    "startedTime": "2022-08-14T06:12:21Z",
    "state": "Completed",
    "verified": false,
    "version": "4.7.0-0.ci.test-2022-08-14-055924-ci-ln-h541hp2-latest"
  }
]

Verified successfully - the last "Completed" item was preserved, while the next "Partial" was pruned as expected.

Comment 8 errata-xmlrpc 2022-09-13 13:53: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 (Moderate: OpenShift Container Platform 4.7.59 bug fix and security 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/RHSA-2022:6322