ComplianceAsCode / compliance-operator

Operator providing Kubernetes cluster compliance checks
Apache License 2.0
38 stars 23 forks source link

:broom: update golang to 1.21 #491

Closed rhmdnd closed 3 months ago

openshift-ci[bot] commented 8 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhmdnd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/ComplianceAsCode/compliance-operator/blob/master/OWNERS)~~ [rhmdnd] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
BhargaviGudi commented 8 months ago

Verification passed with 4.15.0-rc.5 + code from PR #491

  1. Install CO with PR #491
  2. Create ssb
    $ oc compliance bind -N test -S default-auto-apply profile/ocp4-cis profile/ocp4-cis-node
    Creating ScanSettingBinding test
    $ oc get suite -w
    NAME   PHASE         RESULT
    test   AGGREGATING   NOT-AVAILABLE
    test   AGGREGATING   NOT-AVAILABLE
    test   DONE          NON-COMPLIANT
    test   DONE          NON-COMPLIANT
    $ oc get pods
    NAME                                             READY   STATUS    RESTARTS        AGE
    compliance-operator-754cb8f9bf-stlh5             1/1     Running   1 (6m42s ago)   6m47s
    ocp4-openshift-compliance-pp-64c669c697-msc8d    1/1     Running   0               6m39s
    rhcos4-openshift-compliance-pp-97796b947-5cd8q   1/1     Running   0               6m39s
BhargaviGudi commented 8 months ago

/label qe-approved

rhmdnd commented 5 months ago

This is failing serial and parallel e2e testing due to images with the wrong glibc version:

compliance-operator: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by compliance-operator)
compliance-operator: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by compliance-operator)
rhmdnd commented 5 months ago

We've been bitten by this before - here is an example of what we did to fix:

https://github.com/ComplianceAsCode/compliance-operator/pull/373

rhmdnd commented 3 months ago

Still failing on GLIB issues:

compliance-operator: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by compliance-operator)
compliance-operator: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by compliance-operator)
github-actions[bot] commented 3 months ago

:robot: To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:491
Vincent056 commented 3 months ago
compliance-operator: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by compliance-operator)
compliance-operator: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by compliance-operator)

is it because the builder image has different glibc version from the operator base image

rhmdnd commented 3 months ago

Checking the versions directly.

GLIBC version we were using the golang 1.20:

$ podman run --entrypoint /bin/bash -ti registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.20-openshift-4.14
[root@579d0b336b3b origin]# ldd --version
ldd (GNU libc) 2.28
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
[root@579d0b336b3b origin]# exit
exit

Version with ubi8:

$ podman run -it registry.access.redhat.com/ubi8/ubi-micro
sh-4.4# ldd --version
ldd (GNU libc) 2.28
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
sh-4.4# exit
exit

Version we're using with golang 1.21 and RHEL 9:

$ podman run --entrypoint /bin/bash -ti registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.21-openshift-4.16
[root@23c6e683bd58 origin]# ldd --version
ldd (GNU libc) 2.34
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
[root@23c6e683bd58 origin]# exit
exit

Version with ubi9:

$ podman run -it registry.access.redhat.com/ubi9/ubi-micro
sh-5.1# ldd --version
ldd (GNU libc) 2.34
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
sh-5.1# exit
exit
rhmdnd commented 3 months ago

About to kick this one through https://github.com/openshift/release/pull/54429 and then we can retest to see if the GLIBC error goes away.

rhmdnd commented 3 months ago

/test e2e-rosa /test e2e-aws-serial /test e2e-aws-parallel

rhmdnd commented 3 months ago

Needed to repropose the CI update in https://github.com/openshift/release/pull/54489 due to another PR reverting the update to 1.21

rhmdnd commented 3 months ago

/retest-required

rhmdnd commented 3 months ago

/test e2e-aws-parallel

rhmdnd commented 3 months ago

Looks like we're encountering some issues with metrics that are causing the tests to fail. Need to check if this is applicable to master, or somehow related to the golang bump.

rhmdnd commented 3 months ago

/test e2e-aws-parallel

github-actions[bot] commented 3 months ago

:robot: To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:491
Vincent056 commented 3 months ago

/lgtm