Bug 2109962

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.8.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-08-09 12:52:44 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: 2108619    
Bug Blocks: 2117347    

Comment 1 Evgeni Vakhonin 2022-07-25 10:12:00 UTC
using the same method as in https://bugzilla.redhat.com/show_bug.cgi?id=2108292#c1

reproducing on 4.8.45 to 4.8.46


history lenght is 50
last 3 items before prune
[
  {
    "completionTime": "2022-07-25T06:59:41Z",
    "image": "quay.io/openshift-release-dev/ocp-release@sha256:e9bcc5d74c4d6651f15601392e7eec52a9feacbf583ca5323ddeb9d3a878d75d",
    "startedTime": "2022-07-25T06:58:35Z",
    "state": "Completed",
    "verified": true,
    "version": "4.8.45"
  },
  {
    "completionTime": "2022-07-25T06:58:35Z",
    "image": "quay.io/openshift-release-dev/ocp-release@sha256:28573253c8d670d2d0ff227295476cc3b4a77d98703f041e665da4da95907f26",
    "startedTime": "2022-07-25T06:58:09Z",
    "state": "Partial",
    "verified": true,
    "version": "4.8.46"
  },
  {
    "completionTime": "2022-07-25T06:42:15Z",
    "image": "quay.io/openshift-release-dev/ocp-release@sha256:e9bcc5d74c4d6651f15601392e7eec52a9feacbf583ca5323ddeb9d3a878d75d",
    "startedTime": "2022-07-25T06:19:16Z",
    "state": "Completed",
    "verified": false,
    "version": "4.8.45"
  }
]

sending upgrade command to 4.8.45 ok
waiting for upgrade to start: 4.8.45
history lenght still 50
last 3 items after prune
[
  {
    "completionTime": "2022-07-25T07:00:03Z",
    "image": "quay.io/openshift-release-dev/ocp-release@sha256:28573253c8d670d2d0ff227295476cc3b4a77d98703f041e665da4da95907f26",
    "startedTime": "2022-07-25T06:59:49Z",
    "state": "Partial",
    "verified": true,
    "version": "4.8.46"
  },
  {
    "completionTime": "2022-07-25T06:59:41Z",
    "image": "quay.io/openshift-release-dev/ocp-release@sha256:e9bcc5d74c4d6651f15601392e7eec52a9feacbf583ca5323ddeb9d3a878d75d",
    "startedTime": "2022-07-25T06:58:35Z",
    "state": "Completed",
    "verified": true,
    "version": "4.8.45"
  },
  {
    "completionTime": "2022-07-25T06:58:35Z",
    "image": "quay.io/openshift-release-dev/ocp-release@sha256:28573253c8d670d2d0ff227295476cc3b4a77d98703f041e665da4da95907f26",
    "startedTime": "2022-07-25T06:58:09Z",
    "state": "Partial",
    "verified": true,
    "version": "4.8.46"
  }
]

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







pre-merge verifying on 4.8.0-0.ci.test-2022-07-25-062140-ci-ln-wl25ky2-latest to 4.8.0-0.ci.test-2022-07-25-070923-ci-ln-17wi70k-latest. same method.

history lenght is 50
last 3 items before prune
[
  {
    "completionTime": "2022-07-25T08:50:41Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-wl25ky2/release@sha256:bc9d48d97297dba3eb82cf56766607b3979f580267b0a849d541534d843999ef",
    "startedTime": "2022-07-25T08:49:42Z",
    "state": "Completed",
    "verified": false,
    "version": "4.8.0-0.ci.test-2022-07-25-062140-ci-ln-wl25ky2-latest"
  },
  {
    "completionTime": "2022-07-25T08:49:42Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-17wi70k/release@sha256:c96c5367a712f9f3f713231f32dfb95a91c70655965ffdd8afc010af0b26967c",
    "startedTime": "2022-07-25T08:49:28Z",
    "state": "Partial",
    "verified": false,
    "version": "4.8.0-0.ci.test-2022-07-25-070923-ci-ln-17wi70k-latest"
  },
  {
    "completionTime": "2022-07-25T08:36:26Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-wl25ky2/release@sha256:bc9d48d97297dba3eb82cf56766607b3979f580267b0a849d541534d843999ef",
    "startedTime": "2022-07-25T08:13:19Z",
    "state": "Completed",
    "verified": false,
    "version": "4.8.0-0.ci.test-2022-07-25-062140-ci-ln-wl25ky2-latest"
  }
]
sending upgrade command to 4.8.0-0.ci.test-2022-07-25-062140-ci-ln-wl25ky2-latest ok
waiting for upgrade to start: 4.8.0-0.ci.test-2022-07-25-062140-ci-ln-wl25ky2-latest
history lenght still 50
last 3 items after prune
[
  {
    "completionTime": "2022-07-25T08:51:11Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-17wi70k/release@sha256:c96c5367a712f9f3f713231f32dfb95a91c70655965ffdd8afc010af0b26967c",
    "startedTime": "2022-07-25T08:50:58Z",
    "state": "Partial",
    "verified": false,
    "version": "4.8.0-0.ci.test-2022-07-25-070923-ci-ln-17wi70k-latest"
  },
  {
    "completionTime": "2022-07-25T08:50:41Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-wl25ky2/release@sha256:bc9d48d97297dba3eb82cf56766607b3979f580267b0a849d541534d843999ef",
    "startedTime": "2022-07-25T08:49:42Z",
    "state": "Completed",
    "verified": false,
    "version": "4.8.0-0.ci.test-2022-07-25-062140-ci-ln-wl25ky2-latest"
  },
  {
    "completionTime": "2022-07-25T08:36:26Z",
    "image": "registry.build05.ci.openshift.org/ci-ln-wl25ky2/release@sha256:bc9d48d97297dba3eb82cf56766607b3979f580267b0a849d541534d843999ef",
    "startedTime": "2022-07-25T08:13:19Z",
    "state": "Completed",
    "verified": false,
    "version": "4.8.0-0.ci.test-2022-07-25-062140-ci-ln-wl25ky2-latest"
  }
]

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

Comment 6 errata-xmlrpc 2022-08-09 12:52:44 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.8.47 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:5889