Bug 1979251 - [4.8.0] OPENSHIFT_VERSIONS env var overrides AgentServiceConfig osImages: values
Summary: [4.8.0] OPENSHIFT_VERSIONS env var overrides AgentServiceConfig osImages: values
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Advanced Cluster Management for Kubernetes
Classification: Red Hat
Component: Infrastructure Operator
Version: rhacm-2.3
Hardware: x86_64
OS: Linux
high
low
Target Milestone: ---
: rhacm-2.4
Assignee: Michael Filanov
QA Contact: bjacot
Derek
URL:
Whiteboard: AI-Team-Platform
Depends On: 1978691
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-05 12:10 UTC by Ronnie Lazar
Modified: 2021-10-08 03:18 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1978691
Environment:
Last Closed: 2021-10-08 03:18:58 UTC
Target Upstream Version:
Embargoed:
ming: rhacm-2.4+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github open-cluster-management backlog issues 16138 0 None None None 2021-09-15 18:26:37 UTC
Github openshift assisted-service pull 2188 0 None None None 2021-08-25 23:10:57 UTC
Red Hat Bugzilla 1978691 1 high CLOSED [4.9.0] OPENSHIFT_VERSIONS env var overrides AgentServiceConfig osImages: values 2021-10-18 17:38:19 UTC
Red Hat Product Errata RHBA-2021:3511 0 None None None 2021-09-21 08:01:47 UTC

Description Ronnie Lazar 2021-07-05 12:10:02 UTC
+++ This bug was initially created as a clone of Bug #1978691 +++

Description of problem:
The image values set in AgentServiceConfig osImages: are overridden by OPENSHIFT_VERSIONS env var in Assisted Service pod if set below 4.8. 

I understand this is on purpose, but want to get it noted to ensure it is handled before release (or documented somewhere).


Version-Release number of selected component (if applicable):
-Hub Cluster version: 4.8.0-fc.7
-ACM DS snapshot: 2.3.0-DOWNSTREAM-2021-07-01-08-39-58

How reproducible:


Steps to Reproduce:
1. Deploy hub cluster with ACM 
2. Create AgentServiceConfig with below CRD:
    apiVersion: agent-install.openshift.io/v1beta1
    kind: AgentServiceConfig
    metadata:
      name: agent
    spec:
      databaseStorage:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi
      filesystemStorage:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 20Gi
      osImages:
      - openshiftVersion: "4.6"
        rootFSUrl: https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-live-rootfs.x86_64.img
        url: https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso
        version: 46.82.202012051820-0
      - openshiftVersion: "4.7"
        rootFSUrl: https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.7/rhcos-live-rootfs.x86_64.img
        url: https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.13/rhcos-4.7.13-x86_64-live.x86_64.iso
        version: 47.83.202105220305-0
      - openshiftVersion: "4.8"
        rootFSUrl: https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.1/rhcos-live-rootfs.x86_64.img
        url: https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.1/rhcos-4.8.0-rc.1-x86_64-live.x86_64.iso
        version: 48.84.202105062123-0

3. Wait for assisted service pod to start up
4. Check OPENSHIFT_VERSIONS env var in assisted service pod and compare with AgentServiceConfig osImages: values
    oc rsh assisted-service-6fc699877-cmtr8 env | grep OPENSHIFT_VERSION | awk -F= '{print $2}' | jq


Actual results:
OPENSHIFT_VERSIONS = 
{
  "4.6": {
    "display_name": "4.6",
    "release_image": null,
    "release_version": null,
    "rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.1/rhcos-4.8.0-rc.1-x86_64-live.x86_64.iso",
    "rhcos_rootfs": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.1/rhcos-live-rootfs.x86_64.img",
    "rhcos_version": "48.84.202105062123-0",
    "support_level": null
  },
  "4.7": {
    "display_name": "4.7",
    "release_image": null,
    "release_version": null,
    "rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.1/rhcos-4.8.0-rc.1-x86_64-live.x86_64.iso",
    "rhcos_rootfs": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.1/rhcos-live-rootfs.x86_64.img",
    "rhcos_version": "48.84.202105062123-0",
    "support_level": null
  },
  "4.8": {
    "display_name": "4.8",
    "release_image": null,
    "release_version": null,
    "rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.1/rhcos-4.8.0-rc.1-x86_64-live.x86_64.iso",
    "rhcos_rootfs": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.1/rhcos-live-rootfs.x86_64.img",
    "rhcos_version": "48.84.202105062123-0",
    "support_level": null
  }
}


Expected results:
OPENSHIFT_VERSIONS matches what was set in osImages:

Additional info:

Comment 10 errata-xmlrpc 2021-09-21 08:01:46 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.12 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-2021:3511

Comment 11 Yona First 2021-10-07 13:47:30 UTC
Verified with ACM 2.4:

Hub Cluster version: 4.8.0
RHACM version: 2.4.0-DOWNSTREAM-2021-10-06-20-31-30

Output of OPENSHIFT_VERSION env variable in assisted service pod matches what was set in osImages.

{
  "4.6": {
    "display_name": "4.6",
    "release_image": null,
    "release_version": null,
    "rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso",
    "rhcos_rootfs": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-live-rootfs.x86_64.img",
    "rhcos_version": "46.82.202012051820-0",
    "support_level": null
  },
  "4.7": {
    "display_name": "4.7",
    "release_image": null,
    "release_version": null,
    "rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.13/rhcos-4.7.13-x86_64-live.x86_64.iso",
    "rhcos_rootfs": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.7/rhcos-live-rootfs.x86_64.img",
    "rhcos_version": "47.83.202105220305-0",
    "support_level": null
  },
  "4.8": {
    "display_name": "4.8",
    "release_image": null,
    "release_version": null,
    "rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.1/rhcos-4.8.0-rc.1-x86_64-live.x86_64.iso",
    "rhcos_rootfs": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.8.0-rc.1/rhcos-live-rootfs.x86_64.img",
    "rhcos_version": "48.84.202105062123-0",
    "support_level": null
  }
}


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