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

MGMT-13431: ODF storage class not recognizing all available disks in the cluster #5268

Merged
merged 1 commit into from Jun 4, 2023

Conversation

danmanor
Copy link
Contributor

@danmanor danmanor commented Jun 1, 2023

This bug was discovered in assisted-service with OpenShift version 4.12. It relates to a specific situation where the service generates a StorageCluster manifest containing an incorrect number of ODF disks. This issue seems to arise when the service uses the default value of o.config.ODFDisksAvailable in the manifest, as there exists a scenario where this attribute is not properly set with the appropriate count due to the involvement of a separate instance of the service.
As a solution, I added an additional count prior to manifest generation. This ensures an accurate count of disks, regardless of whether it is performed by a single instance or multiple instances of the service.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 1, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 1, 2023

@danmanor: This pull request references MGMT-13431 which is a valid jira issue.

In response to this:

This bug was discovered assisted-service with OpenShift version 4.12. It relates to a specific situation where the service generates a StorageCluster manifest containing an incorrect number of ODF disks. This issue seems to arise when the service uses the default value of o.config.ODFDisksAvailable in the manifest, as there exists a scenario where this attribute is not properly set with the appropriate count due to the involvement of a separate instance of the service.
As a solution, I added an additional count prior to manifest generation. This ensures an accurate count of disks, regardless of whether it is performed by a single instance or multiple instances of the service.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 1, 2023

@danmanor: This pull request references MGMT-13431 which is a valid jira issue.

In response to this:

This bug was discovered assisted-service with OpenShift version 4.12. It relates to a specific situation where the service generates a StorageCluster manifest containing an incorrect number of ODF disks. This issue seems to arise when the service uses the default value of o.config.ODFDisksAvailable in the manifest, as there exists a scenario where this attribute is not properly set with the appropriate count due to the involvement of a separate instance of the service.
As a solution, I added an additional count prior to manifest generation. This ensures an accurate count of disks, regardless of whether it is performed by a single instance or multiple instances of the service.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 1, 2023
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 1, 2023
@danmanor
Copy link
Contributor Author

danmanor commented Jun 1, 2023

/uncc @CrystalChun

@openshift-ci openshift-ci bot removed the request for review from CrystalChun June 1, 2023 09:02
@danmanor
Copy link
Contributor Author

danmanor commented Jun 1, 2023

/cc @omertuc @eliorerz

@openshift-ci openshift-ci bot requested review from eliorerz and omertuc June 1, 2023 09:02
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 1, 2023

@danmanor: This pull request references MGMT-13431 which is a valid jira issue.

In response to this:

This bug was discovered in assisted-service with OpenShift version 4.12. It relates to a specific situation where the service generates a StorageCluster manifest containing an incorrect number of ODF disks. This issue seems to arise when the service uses the default value of o.config.ODFDisksAvailable in the manifest, as there exists a scenario where this attribute is not properly set with the appropriate count due to the involvement of a separate instance of the service.
As a solution, I added an additional count prior to manifest generation. This ensures an accurate count of disks, regardless of whether it is performed by a single instance or multiple instances of the service.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@danmanor
Copy link
Contributor Author

danmanor commented Jun 1, 2023

/cc @eranco74

@openshift-ci openshift-ci bot requested a review from eranco74 June 1, 2023 09:26
@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Merging #5268 (00b35d4) into master (628d8f2) will increase coverage by 0.93%.
The diff coverage is 66.66%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5268      +/-   ##
==========================================
+ Coverage   67.51%   68.44%   +0.93%     
==========================================
  Files         221      221              
  Lines       32972    33836     +864     
==========================================
+ Hits        22260    23160     +900     
+ Misses       8709     8658      -51     
- Partials     2003     2018      +15     
Impacted Files Coverage Δ
internal/operators/odf/odf_operator.go 62.22% <66.66%> (-0.09%) ⬇️

... and 5 files with indirect coverage changes

@eliorerz
Copy link
Contributor

eliorerz commented Jun 1, 2023

Rebase you RP

@danmanor
Copy link
Contributor Author

danmanor commented Jun 3, 2023

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 3, 2023
@danmanor
Copy link
Contributor Author

danmanor commented Jun 3, 2023

/retest edge-e2e-ai-operator-ztp

@openshift-ci
Copy link

openshift-ci bot commented Jun 3, 2023

@danmanor: The /retest command does not accept any targets.
The following commands are available to trigger required jobs:

  • /test e2e-agent-compact-ipv4
  • /test edge-assisted-operator-catalog-publish-verify
  • /test edge-ci-index
  • /test edge-e2e-ai-operator-ztp
  • /test edge-e2e-ai-operator-ztp-sno-day2-workers
  • /test edge-e2e-ai-operator-ztp-sno-day2-workers-late-binding
  • /test edge-e2e-metal-assisted
  • /test edge-e2e-metal-assisted-4-10
  • /test edge-e2e-metal-assisted-4-11
  • /test edge-e2e-metal-assisted-4-12
  • /test edge-e2e-metal-assisted-4-8
  • /test edge-e2e-metal-assisted-4-9
  • /test edge-e2e-metal-assisted-cnv
  • /test edge-e2e-metal-assisted-lvm
  • /test edge-e2e-metal-assisted-ocs
  • /test edge-e2e-metal-assisted-odf
  • /test edge-images
  • /test edge-lint
  • /test edge-subsystem-aws
  • /test edge-subsystem-kubeapi-aws
  • /test edge-unit-test
  • /test edge-verify-generated-code
  • /test images
  • /test mce-images

The following commands are available to trigger optional jobs:

  • /test e2e-agent-ha-dualstack
  • /test e2e-agent-sno-ipv6
  • /test edge-e2e-ai-operator-ztp-3masters
  • /test edge-e2e-ai-operator-ztp-capi
  • /test edge-e2e-ai-operator-ztp-compact-day2-masters
  • /test edge-e2e-ai-operator-ztp-compact-day2-workers
  • /test edge-e2e-ai-operator-ztp-disconnected
  • /test edge-e2e-ai-operator-ztp-hypershift-zero-nodes
  • /test edge-e2e-ai-operator-ztp-ipv4v6-3masters
  • /test edge-e2e-ai-operator-ztp-ipv4v6-3masters-ocp-411
  • /test edge-e2e-ai-operator-ztp-ipv4v6-sno
  • /test edge-e2e-ai-operator-ztp-ipv4v6-sno-ocp-411
  • /test edge-e2e-ai-operator-ztp-multiarch-3masters-ocp-411
  • /test edge-e2e-ai-operator-ztp-multiarch-sno-ocp-411
  • /test edge-e2e-ai-operator-ztp-sno-day2-masters
  • /test edge-e2e-ai-operator-ztp-sno-day2-workers-ignitionoverride
  • /test edge-e2e-metal-assisted-4-13
  • /test edge-e2e-metal-assisted-4-14
  • /test edge-e2e-metal-assisted-day2
  • /test edge-e2e-metal-assisted-day2-arm-workers
  • /test edge-e2e-metal-assisted-day2-single-node
  • /test edge-e2e-metal-assisted-ipv4v6
  • /test edge-e2e-metal-assisted-ipv6
  • /test edge-e2e-metal-assisted-kube-api-late-binding-single-node
  • /test edge-e2e-metal-assisted-kube-api-late-unbinding-ipv4-single-node
  • /test edge-e2e-metal-assisted-kube-api-net-suite
  • /test edge-e2e-metal-assisted-mce
  • /test edge-e2e-metal-assisted-mce-4-10
  • /test edge-e2e-metal-assisted-mce-sno
  • /test edge-e2e-metal-assisted-none
  • /test edge-e2e-metal-assisted-onprem
  • /test edge-e2e-metal-assisted-single-node
  • /test edge-e2e-metal-assisted-static-ip-suite
  • /test edge-e2e-metal-assisted-tang
  • /test edge-e2e-metal-assisted-tpmv2
  • /test edge-e2e-metal-assisted-upgrade-agent
  • /test edge-e2e-nutanix-assisted
  • /test edge-e2e-nutanix-assisted-2workers
  • /test edge-e2e-vsphere-assisted
  • /test edge-e2e-vsphere-assisted-4-12
  • /test edge-e2e-vsphere-assisted-4-13
  • /test edge-e2e-vsphere-assisted-umn
  • /test edge-push-pr-image
  • /test push-pr-image

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-assisted-service-master-e2e-agent-compact-ipv4
  • pull-ci-openshift-assisted-service-master-edge-ci-index
  • pull-ci-openshift-assisted-service-master-edge-e2e-ai-operator-ztp
  • pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted
  • pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-cnv
  • pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-lvm
  • pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-mce
  • pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-ocs
  • pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-odf
  • pull-ci-openshift-assisted-service-master-edge-images
  • pull-ci-openshift-assisted-service-master-edge-lint
  • pull-ci-openshift-assisted-service-master-edge-subsystem-aws
  • pull-ci-openshift-assisted-service-master-edge-subsystem-kubeapi-aws
  • pull-ci-openshift-assisted-service-master-edge-unit-test
  • pull-ci-openshift-assisted-service-master-edge-verify-generated-code
  • pull-ci-openshift-assisted-service-master-images
  • pull-ci-openshift-assisted-service-master-mce-images

In response to this:

/retest edge-e2e-ai-operator-ztp

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.

@danmanor
Copy link
Contributor Author

danmanor commented Jun 3, 2023

/test edge-e2e-ai-operator-ztp

@danmanor
Copy link
Contributor Author

danmanor commented Jun 4, 2023

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 4, 2023
@openshift-ci openshift-ci bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 4, 2023
@danmanor
Copy link
Contributor Author

danmanor commented Jun 4, 2023

/uncc @Avishay @omertuc @eranco74

@danmanor
Copy link
Contributor Author

danmanor commented Jun 4, 2023

/cc @osherdp

@openshift-ci openshift-ci bot requested a review from osherdp June 4, 2023 12:22
@danmanor
Copy link
Contributor Author

danmanor commented Jun 4, 2023

/uncc @avishayt

@openshift-ci openshift-ci bot removed the request for review from avishayt June 4, 2023 12:22
@osherdp
Copy link
Contributor

osherdp commented Jun 4, 2023

/retitle MGMT-13431: ODF storage class not recognizing all available disks in the cluster

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 4, 2023
@openshift-ci openshift-ci bot changed the title MGMT-13431: patching bug - ODF storage class not recognizing all available disks in the cluster MGMT-13431: ODF storage class not recognizing all available disks in the cluster Jun 4, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jun 4, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danmanor, osherdp

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

@openshift-ci
Copy link

openshift-ci bot commented Jun 4, 2023

@danmanor: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit f55e7db into openshift:master Jun 4, 2023
19 checks passed
danielerez pushed a commit to danielerez/assisted-service that referenced this pull request Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants