Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 2247737: add APIs to scheme, role and role binding to bundle #38

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

leelavg
Copy link
Contributor

@leelavg leelavg commented Nov 2, 2023

  • Add missing ClusterVersion and ClusterServiceVersion APIs to status reporter Scheme
  • Add missing Role and RoleBinding to Kustomize and generate CSV Bundle

- ClusterVersion and ClusterServiceVersion APIs addition to scheme is
missing in status reporter job

Signed-off-by: Leela Venkaiah G <[email protected]>
- Status reporter role and role binding is missing in generated CSV bundle

Signed-off-by: Leela Venkaiah G <[email protected]>
Copy link
Member

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes LGTM, please let me know once testing is done

@nb-ohad
Copy link
Contributor

nb-ohad commented Nov 2, 2023

LGTM

@leelavg leelavg changed the title add APIs to scheme, role and role binding to bundle Bug 2247737: add APIs to scheme, role and role binding to bundle Nov 3, 2023
Copy link

openshift-ci bot commented Nov 3, 2023

@leelavg: This pull request references Bugzilla bug 2247737, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

2 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @nehaberry

In response to this:

Bug 2247737: add APIs to scheme, role and role binding to bundle

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

openshift-ci bot commented Nov 3, 2023

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: nehaberry.

Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@leelavg: This pull request references Bugzilla bug 2247737, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

2 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @nehaberry

In response to this:

Bug 2247737: add APIs to scheme, role and role binding to bundle

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@leelavg
Copy link
Contributor Author

leelavg commented Nov 3, 2023

Without fix:

$ k logs storageclient-abf16dbc3c286256-status-reporter-28316498-qj82x
W1103 05:39:24.428516       1 main.go:90] Failed to list csv resources: no kind is registered for the type v1alpha1.ClusterServiceVersionList in scheme "/remote-source/app/service/status-report/main.go:45"
W1103 05:39:24.428604       1 main.go:100] Unable to find csv with prefix "ocs-client-operator"
W1103 05:39:24.428613       1 main.go:107] Failed to get clusterVersion: no kind is registered for the type v1.ClusterVersion in scheme "/remote-source/app/service/status-report/main.go:45"
W1103 05:39:24.428620       1 main.go:117] Unable to find ocp version with completed update
F1103 05:39:24.438907       1 main.go:134] Failed to report status of storageClient 1cbb0e37-301b-427f-9b96-2161e4d48236: rpc error: code = InvalidArgument desc = Malformed ClientPlatformVersion: Version string empty

With fix:

$ cat storageclient-29011.yaml
apiVersion: batch/v1
kind: CronJob
metadata:
  name: storageclient-29011-status-reporter
  namespace: openshift-storage-client
spec:
  concurrencyPolicy: Allow
  failedJobsHistoryLimit: 1
  jobTemplate:
    metadata:
      creationTimestamp: null
    spec:
      template:
        metadata:
          creationTimestamp: null
        spec:
          containers:
          - command:
            - /status-reporter
            env:
            - name: STORAGE_CLIENT_NAMESPACE
              value: openshift-storage-client
            - name: STORAGE_CLIENT_NAME
              value: storageclient
            - name: OPERATOR_NAMESPACE
              value: openshift-storage-client
            image: quay.io/rhn_support_lgangava/code:29011
            imagePullPolicy: IfNotPresent
            name: heartbeat
          serviceAccount: ocs-client-operator-status-reporter
          serviceAccountName: ocs-client-operator-status-reporter
          terminationGracePeriodSeconds: 30
          restartPolicy: OnFailure
  schedule: '* * * * *'
  successfulJobsHistoryLimit: 3
  suspend: false
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  creationTimestamp: null
  name: ocs-client-operator-status-reporter
  namespace: openshift-storage-client
rules:
- apiGroups:
  - operators.coreos.com
  resources:
  - clusterserviceversions
  verbs:
  - get
  - list
  - watch
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: ocs-client-operator-status-reporter
  namespace: openshift-storage-client
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: ocs-client-operator-status-reporter
subjects:
  - kind: ServiceAccount
    name: ocs-client-operator-status-reporter
    namespace: openshift-storage-client
---
$ k logs storageclient-29011-status-reporter-28316499-87v9d
[....EMPTY...]
$ k get storageconsumer storageconsumer-f4aec37d-d6de-4ea2-9d4c-4210170a4f92 -oyaml | yq 'del(.metadata.annotations)'
apiVersion: ocs.openshift.io/v1alpha1
kind: StorageConsumer
metadata:
  creationTimestamp: "2023-10-29T03:49:30Z"
  generation: 2
  name: storageconsumer-f4aec37d-d6de-4ea2-9d4c-4210170a4f92
  namespace: openshift-storage
  resourceVersion: "21003071"
  uid: 1cbb0e37-301b-427f-9b96-2161e4d48236
spec:
  enable: true
status:
  cephResources:
    - kind: CephClient
      name: 126102a1ddafcaa8045be5cfb98746c0
      status: Ready
  client:
    operatorVersion: 4.14.0-160.hci
    platformVersion: 4.14.0-rc.7
  lastHeartbeat: "2023-11-03T05:41:24Z"
  state: Ready

@Madhu-1
Copy link
Member

Madhu-1 commented Nov 3, 2023

F1103 05:39:24.438907 1 main.go:134] Failed to report status of storageClient 1cbb0e37-301b-427f-9b96-2161e4d48236: rpc error: code = InvalidArgument desc = Malformed ClientPlatformVersion: Version string empty

@leelavg As we have multiple problems, Are we going to have a different PR for the above problem?

@leelavg
Copy link
Contributor Author

leelavg commented Nov 3, 2023

F1103 05:39:24.438907 1 main.go:134] Failed to report status of storageClient 1cbb0e37-301b-427f-9b96-2161e4d48236: rpc error: code = InvalidArgument desc = Malformed ClientPlatformVersion: Version string empty

@leelavg As we have multiple problems, Are we going to have a different PR for the above problem?

  • this particular problem is kinda expected and it'll be fixed as part of BZ 2247743

@nb-ohad
Copy link
Contributor

nb-ohad commented Nov 5, 2023

/lgtm

@leelavg
Copy link
Contributor Author

leelavg commented Nov 6, 2023

@Madhu-1 if above testing isn't enough for the vote, I tested deploying via OLM

# date; ko logs ocs-provider-server-766fcb944d-d2t5g | grep 'consumer.go:226'
Monday 06 November 2023 09:57:18 AM IST
I1106 04:25:01.129650       1 consumer.go:226] successfully updated Status for StorageConsumer storageconsumer-b67a611e-3c50-4eb6-aa74-5c789aaf7b3c
I1106 04:26:01.071069       1 consumer.go:226] successfully updated Status for StorageConsumer storageconsumer-b67a611e-3c50-4eb6-aa74-5c789aaf7b3c
I1106 04:27:01.271745       1 consumer.go:226] successfully updated Status for StorageConsumer storageconsumer-b67a611e-3c50-4eb6-aa74-5c789aaf7b3c

@Madhu-1
Copy link
Member

Madhu-1 commented Nov 6, 2023

/approved

@Madhu-1
Copy link
Member

Madhu-1 commented Nov 6, 2023

/approve

1 similar comment
@Madhu-1
Copy link
Member

Madhu-1 commented Nov 6, 2023

/approve

@Madhu-1
Copy link
Member

Madhu-1 commented Nov 6, 2023

/approve

@openshift-ci openshift-ci bot removed the approved label Nov 6, 2023
@Madhu-1
Copy link
Member

Madhu-1 commented Nov 6, 2023

/approve

Copy link

openshift-ci bot commented Nov 6, 2023

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: leelavg, Madhu-1, nb-ohad

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Madhu-1
Copy link
Member

Madhu-1 commented Nov 6, 2023

/tide refresh

@Madhu-1 Madhu-1 merged commit 1969a71 into red-hat-storage:fusion-hci-4.14 Nov 6, 2023
15 checks passed
Copy link

openshift-ci bot commented Nov 6, 2023

@leelavg: All pull requests linked via external trackers have merged:

Bugzilla bug 2247737 has been moved to the MODIFIED state.

In response to this:

Bug 2247737: add APIs to scheme, role and role binding to bundle

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants