Bug 1835166

Summary: [wmco] bundle image verify failed
Product: OpenShift Container Platform Reporter: gaoshang <sgao>
Component: Windows ContainersAssignee: Pratik Mahajan <pmahajan>
Status: CLOSED ERRATA QA Contact: gaoshang <sgao>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, aravindh, gmarkley, rgudimet
Target Milestone: ---   
Target Release: 4.6.0   
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: 2020-10-27 15:59:18 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 gaoshang 2020-05-13 09:50:20 UTC
Description of problem:
According to README in https://github.com/openshift/windows-machine-config-operator/, when creating a bundle image, verify that the new bundle is valid failed
# operator-sdk bundle validate quay.io/sgaoshang/wmco-bundle:1.0.0 --image-builder podman
INFO[0000] Unpacked image layers                         bundle-dir=/tmp/bundle-126314210 container-tool=podman
INFO[0000] running podman pull                           bundle-dir=/tmp/bundle-126314210 container-tool=podman
INFO[0001] running podman save                           bundle-dir=/tmp/bundle-126314210 container-tool=podman
FATA[0002] Bundle content validation failed: Bundle validation errors: cannot convert int64 to float64  bundle-dir=/tmp/bundle-126314210 container-tool=podman

Version-Release number of selected component (if applicable):
# operator-sdk version
operator-sdk version: "v0.17.0", commit: "2fd7019f856cdb6f6618e2c3c80d15c3c79d1b6c", kubernetes version: "unknown", go version: "go1.13.10 linux/amd64"
# podman --version
podman version 1.6.4
windows-machine-config-operator git commit: 23198397cb0394cb2405ba700265bda24712ea9a

How reproducible:
always

Steps to Reproduce:
1. Build wmco operator image and push to quay.io
$ operator-sdk build quay.io/sgaoshang/wmco:latest
$ docker push quay.io/sgaoshang/wmco

2. Create a bundle image and push to quay.io, verify that the new bundle is valid
Replace REPLACE_IMAGE to quay.io/sgaoshang/wmco in deploy/olm-catalog/windows-machine-config-operator/0.0.0/windows-machine-config-operator.v0.0.0.clusterserviceversion.yaml
$ sed -i "s/REPLACE_IMAGE/quay.io\/sgaoshang\/wmco/g" deploy/olm-catalog/windows-machine-config-operator/0.0.0/windows-machine-config-operator.v0.0.0.clusterserviceversion.yaml
$ operator-sdk bundle create quay.io/sgaoshang/wmco-bundle:1.0.0 -d deploy/olm-catalog/windows-machine-config-operator/0.0.0 --channels alpha --default-channel alpha --image-builder podman
$ podman push quay.io/sgaoshang/wmco-bundle:1.0.0
$ operator-sdk bundle validate quay.io/sgaoshang/wmco-bundle:1.0.0 --image-builder podman

# operator-sdk bundle validate quay.io/sgaoshang/wmco-bundle:1.0.0 --image-builder podman
INFO[0000] Unpacked image layers                         bundle-dir=/tmp/bundle-126314210 container-tool=podman
INFO[0000] running podman pull                           bundle-dir=/tmp/bundle-126314210 container-tool=podman
INFO[0001] running podman save                           bundle-dir=/tmp/bundle-126314210 container-tool=podman
FATA[0002] Bundle content validation failed: Bundle validation errors: cannot convert int64 to float64  bundle-dir=/tmp/bundle-126314210 container-tool=podman

Actual results:
Bundle content validation failed

Expected results:
Bundle content validation succeed

Additional info:
If deleting "minimum: 0" in deploy/olm-catalog/windows-machine-config-operator/0.0.0/wmc.openshift.io_windowsmachineconfigs_crd.yaml before creating bundle image, bundle validation succeed

# operator-sdk bundle validate quay.io/sgaoshang/wmco-bundle:1.0.0 --image-builder podman
INFO[0000] Unpacked image layers                         bundle-dir=/tmp/bundle-215323615 container-tool=podman
INFO[0000] running podman pull                           bundle-dir=/tmp/bundle-215323615 container-tool=podman
INFO[0002] running podman save                           bundle-dir=/tmp/bundle-215323615 container-tool=podman
INFO[0003] All validation tests have completed successfully  bundle-dir=/tmp/bundle-215323615 container-tool=podman

Comment 3 Aravindh Puthiyaparambil 2020-05-29 19:44:19 UTC
@gaoshang, this bug can only be verified after we move to using operator-sdk v0.18 (https://issues.redhat.com/browse/WINC-407). Seems like https://github.com/openshift/windows-machine-config-operator/pull/53 did not actually fix the issue. Should this bug be moved back to ASSIGNED?

Comment 4 gaoshang 2020-06-01 02:14:21 UTC
(In reply to Aravindh Puthiyaparambil from comment #3)
> @gaoshang, this bug can only be verified after we move to using operator-sdk
> v0.18 (https://issues.redhat.com/browse/WINC-407). Seems like
> https://github.com/openshift/windows-machine-config-operator/pull/53 did not
> actually fix the issue. Should this bug be moved back to ASSIGNED?

Thanks for the information, I'll move it back to ASSIGNED.

Comment 5 Scott Dodson 2020-06-01 23:49:05 UTC
Moving to 4.6.0 Target Release now that things have forked, if we want to bring this back to 4.5 it will need to have a fixed bug in 4.6 anyway.

Comment 6 Pratik Mahajan 2020-06-23 15:13:49 UTC
this bug should be fixed after bumping the operator-sdk to version 0.18.1

Should we move this to modified state ?

Comment 7 Aravindh Puthiyaparambil 2020-06-23 15:52:38 UTC
If you associate the SDK bump PR and issues a "/bugzilla refresh" then it should move this to modified.

Comment 9 gaoshang 2020-06-30 05:23:15 UTC
This bug has been verified and passed, thanks.

Version:
windows-machine-config-operator git commit: c848857d659ee53fba6e6ec59d1a0ad7187df9bd
# operator-sdk version
operator-sdk version: "v0.18.1", commit: "7bf7b6886d647dc202525daec16fab67dcc52a3d", kubernetes version: "v1.18.2", go version: "go1.13.6 linux/amd64"

Steps:
1. Build wmco operator image and push to quay.io
# operator-sdk build quay.io/sgaoshang/wmco:latest
# docker push quay.io/sgaoshang/wmco

2. Create a bundle image and push to quay.io, verify that the new bundle is valid
# sed -i "s/REPLACE_IMAGE/quay.io\/sgaoshang\/wmco/g" deploy/olm-catalog/windows-machine-config-operator/manifests/windows-machine-config-operator.clusterserviceversion.yaml
# operator-sdk bundle create quay.io/sgaoshang/wmco-bundle:1.0.0 -d deploy/olm-catalog/windows-machine-config-operator/manifests --channels alpha --default-channel alpha --image-builder podman
# podman push quay.io/sgaoshang/wmco-bundle:1.0.0
# operator-sdk bundle validate quay.io/sgaoshang/wmco-bundle:1.0.0 --image-builder podman
INFO[0000] Unpacking image layers                       
INFO[0000] running /usr/bin/podman pull quay.io/sgaoshang/wmco-bundle:1.0.0  bundle-dir=/tmp/bundle-127848765 container-tool=podman
INFO[0000] running podman save                           bundle-dir=/tmp/bundle-127848765 container-tool=podman
INFO[0001] Found annotations file                        bundle-dir=/tmp/bundle-127848765 container-tool=podman
INFO[0001] Could not find optional dependencies file     bundle-dir=/tmp/bundle-127848765 container-tool=podman
INFO[0001] All validation tests have completed successfully

Comment 13 errata-xmlrpc 2020-10-27 15:59:18 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.6 GA Images), 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-2020:4196