Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1940746

Summary: Graph builder is created successfully when the graph data version is not supported
Product: OpenShift Container Platform Reporter: Yang Yang <yanyang>
Component: OpenShift Update ServiceAssignee: W. Trevor King <wking>
OpenShift Update Service sub component: operand QA Contact: Yang Yang <yanyang>
Status: CLOSED ERRATA Docs Contact: Kathryn Alexander <kalexand>
Severity: low    
Priority: medium CC: lmohanty
Version: 4.6   
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1940747 (view as bug list) Environment:
Last Closed: 2021-10-15 16:20:30 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:
Bug Depends On:    
Bug Blocks: 1940747    
Attachments:
Description Flags
graph builder log file none

Description Yang Yang 2021-03-19 04:20:37 UTC
Description of problem (please be detailed as possible and provide log
snippests):

Changed the graph data version to 1.2.0 and built the graph data image. Then created the updateservice instance with that graph data image. The graph builder is up and running and there's no error about "unrecognized graph-data version" logged. 

Version of all relevant components (if applicable):

cincinnati-openshift-update-service:v4.6.0-8


Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?


Is there any workaround available to the best of your knowledge?


Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?


Can this issue reproducible?

Yes

Can this issue reproduce from the UI?


If this is a regression, please provide more details to justify this:


Steps to Reproduce:

1. Create osus operator
2. Build graph data image
# git clone https://github.com/openshift/cincinnati-graph-data
 
Change the version to 1.2.0
# cat cincinnati-graph-data/version
1.2.0
 
# tar cvfz cincinnati-graph-data.tar.gz cincinnati-graph-data
 
$ cat <<EOF > Dockerfile
FROM registry.access.redhat.com/ubi8/ubi:8.1
COPY cincinnati-graph-data.tar.gz /tmp/
RUN mkdir -p /var/lib/cincinnati/graph-data/
CMD exec /bin/bash -c "tar xvzf /tmp/cincinnati-graph-data.tar.gz -C /var/lib/cincinnati/graph-data/ --strip-components=1"
EOF
 
$ podman build -f Dockerfile -t ${DIS_REGISTRY}/openshift-update-service/cincinnati-graph-data-container:v1.2.0
 
$ podman push ${DIS_REGISTRY}/openshift-update-service/cincinnati-graph-data-container:v1.2.0

3. Create updateservice instance
# skopeo copy --all docker://registry-proxy.engineering.redhat.com/rh-osbs/cincinnati-openshift-update-service:v4.6.0-8 docker://${DIS_REGISTRY}/openshift-update-service/cincinnati-openshift-update-service:v4.6.0-8 --src-tls-verify=false
 
# oc adm release mirror --from=quay.io/openshift-release-dev/ocp-release:4.6.21-x86_64 --to=yangyang0316.mirror-registry.qe.gcp.devcluster.openshift.com:5000/openshift-release-dev/ocp-release --to-release-image=yangyang0316.mirror-registry.qe.gcp.devcluster.openshift.com:5000/ocp-release:4.6.21-x86_64 -a ./pull_secret.json
 
Follow the prompts to add following ICSP
$ oc edit imagecontentsourcepolicies.operator.openshift.io image-policy-aosqe
- mirrors:
    - ${DIS_REGISTRY}/openshift-release-dev/ocp-release
    source: quay.io/openshift-release-dev/ocp-release
  - mirrors:
    - ${DIS_REGISTRY}/openshift-release-dev/ocp-release
    source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
 
# cat cincy.yaml
apiVersion: updateservice.operator.openshift.io/v1
kind: UpdateService
metadata:
  namespace: openshift-update-service
  name: osus
spec:
  graphDataImage: yangyang0316.mirror-registry.qe.gcp.devcluster.openshift.com:5000/openshift-update-service/cincinnati-graph-data-container:v1.2.0
  releases: yangyang0316.mirror-registry.qe.gcp.devcluster.openshift.com:5000/ocp-release
  replicas: 1
 
 
# oc create -f cincy.yaml
 


Actual results:

Update service instance is created successfully
# oc get all
NAME                                          READY   STATUS    RESTARTS   AGE
pod/osus-5cd97c4b59-gjqgz                     2/2     Running   0          4h29m
pod/updateservice-operator-84b5b9d47c-qlm22   1/1     Running   0          27h
 
NAME                                     TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
service/osus-graph-builder               ClusterIP   172.30.161.220   <none>        8080/TCP,9080/TCP   4h29m
service/osus-policy-engine               ClusterIP   172.30.144.216   <none>        80/TCP,9081/TCP     4h29m
service/updateservice-operator-metrics   ClusterIP   172.30.193.34    <none>        8443/TCP            2d2h
 
NAME                                     READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/osus                     1/1     1            1           4h29m
deployment.apps/updateservice-operator   1/1     1            1           2d2h
 
NAME                                                DESIRED   CURRENT   READY   AGE
replicaset.apps/osus-5cd97c4b59                     1         1         1       4h29m
replicaset.apps/updateservice-operator-84b5b9d47c   1         1         1       2d2h
 
NAME                                                HOST/PORT                                                                                             PATH   SERVICES             PORT            TERMINATION   WILDCARD
route.route.openshift.io/osus-policy-engine-route   osus-policy-engine-route-openshift-update-service.apps.yangyang0316.qe.gcp.devcluster.openshift.com          osus-policy-engine   policy-engine   edge/None     None

Expected results:

An error prompts that the graph data version is not supported

Additional info:

Comment 1 Yang Yang 2021-03-19 04:23:00 UTC
Created attachment 1764557 [details]
graph builder log file

Comment 2 W. Trevor King 2021-03-19 04:26:07 UTC
Ah, the issue is that we did not backport that change to 4.6:

  $ git --no-pager log --oneline origin/master | grep 'version.*parsing'
  60a9aca3 openshift_secondary_metadata_parser: Add 'version' parsing
  $ git --no-pager log --oneline origin/release-4.6 | grep 'version.*parsing'

Comment 3 W. Trevor King 2021-07-02 22:24:59 UTC
I'm going to set this MODIFIED for 4.7:

$ git log --oneline origin/master | grep 'version.*parsing'
60a9aca3 openshift_secondary_metadata_parser: Add 'version' parsing
$ git log --oneline origin/release-4.7 | grep 'version.*parsing'
60a9aca3 openshift_secondary_metadata_parser: Add 'version' parsing

Comment 4 Yang Yang 2021-09-29 09:39:54 UTC
Verifying with osus-v4.9.0-1 passed.

Graph-builder is not running
# oc get pod
NAME                                     READY   STATUS    RESTARTS   AGE
service-69dc4885b7-48txd                 1/2     Running   0          9m56s
updateservice-operator-c5bdff748-wl2bj   1/1     Running   0          30m

# oc logs pod/service-69dc4885b7-48txd graph-builder

a. if version is changed to 1.2.0, then got the error:
ERROR graph_builder::graph] unrecognized graph-data version 1.2.0
    ; supported versions: ["1.0.0", "1.1.0"]

b. if version is changed to 2.0.0, then got the error:
ERROR graph_builder::graph] unrecognized graph-data version 2.0.0
    ; supported versions: ["1.0.0", "1.1.0"]

c. if version is changed to 0.9.0. then got the error:
ERROR graph_builder::graph] unrecognized graph-data version 0.9.0
    ; supported versions: ["1.0.0", "1.1.0"]

d. if version is changed to 1.0.0, then osus is deployed successfully:
# oc get pod
NAME                                     READY   STATUS    RESTARTS   AGE
service-57cc56c77c-m6q8n                 2/2     Running   0          39s
updateservice-operator-c5bdff748-wl2bj   1/1     Running   0          43m

Moving it to verified state.

Comment 7 errata-xmlrpc 2021-10-15 16:20:30 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 (RHEA: OSUS enhancement 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:3735