Skip to content

adjust dv size to fit GCP minimumSupportedPvcSize #1246

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

Open
wants to merge 1 commit into
base: cnv-4.19
Choose a base branch
from

Conversation

Ahmad-Hafe
Copy link
Contributor

@Ahmad-Hafe Ahmad-Hafe commented Jun 19, 2025

Short description:

this PR is following the new cloud providors storage class, gcp, aro, arm etcc... that is supporting minimumSupportedPvcSize > 4Gi
there are few tests that are failing because they use dv's that are smaller than minimumSupportedPvcSize, 1Gi etc ...

More details:

there are many test that are failing due to small dv size, need to adjust these test accordingly to minimumSupportedPvcSize, size changed dynamiclly + added a function that fetch the minimumSupportedPvcSize from the storage profile

https://docs.google.com/presentation/d/1wDDKB0ZGbRpObNP9hqSu2Rm8OdccRTQ1St-eNEQaFYM/edit?slide=id.g317d1609066_0_17#slide=id.g317d1609066_0_17

https://drive.google.com/file/d/1MT99MArNHn4e85APbvrawDZydQzHxslk/view

What this PR does / why we need it:

there are many test that are failing due to small dv size, need to adjust these test accordingly to minimumSupportedPvcSiz from storgae profile

Which issue(s) this PR fixes:

T2 failuers
https://jenkins-csb-cnvqe-main.dno.corp.redhat.com/job/test-pytest-cnv-4.19-storage-gcp/5/testReport/

Special notes for reviewer:
jira-ticket:

https://issues.redhat.com/browse/CNV-63567

Copy link

coderabbitai bot commented Jun 19, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Choose a reason for hiding this comment

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

D/S test tox -e verify-bugs-are-open failed: cnv-tests-tox-executor/13262

@Ahmad-Hafe
Copy link
Contributor Author

/wip cancel

@openshift-virtualization-qe-bot openshift-virtualization-qe-bot changed the title WIP: adjust dv size to fit GCP minimumSupportedPvcSize adjust dv size to fit GCP minimumSupportedPvcSize Jul 1, 2025
@@ -237,7 +239,7 @@ def test_virtctl_image_upload_pvc(download_image, namespace, storage_class_name_
namespace=namespace.name,
pvc=True,
name=pvc_name,
size="1Gi",
size=storage_profile_minimum_supported_pvc_size,
Copy link
Contributor

Choose a reason for hiding this comment

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

So if we do this now, and the next provisioner will have a 2Gi minimum size limitation - how will we catch it?

Comment on lines 407 to 412
storage_class=storage_class,
access_modes=access_modes,
volume_mode=volume_mode,
client=client,
size=get_default_storage_profile_minimum_supported_pvc_size(),
) as dv:
Copy link
Contributor

Choose a reason for hiding this comment

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

This function gets a storage_class, will get_default_storage_profile_minimum_supported_pvc_size return the value for the same storage_class?

Comment on lines +195 to +201
@pytest.fixture(scope="session")
def xfail_test_if_gcp_sc(cluster_storage_classes):
existing_gcp_sc = [sc.name for sc in cluster_storage_classes if sc.name in StorageClassNames.GCP]
if existing_gcp_sc:
pytest.xfail(
reason=f"This test is X failed due to non supporting GCP storage class dv less than 4Gi'{existing_gcp_sc}'"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

If my cluster has GCP and OCS, and I'm running the test on OCS, this would xfail anyway?

@@ -542,6 +542,7 @@ def test_blank_disk_import_validate_status(data_volume_multi_storage_scope_funct
],
)
def test_vmi_image_size(
xfail_test_if_gcp_sc,
Copy link
Contributor

Choose a reason for hiding this comment

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

For the 13Gi param - this test can still run
What should happen if we requested 64M, but got 4Gi PVC? Should VMI see the 4Gi?

@@ -585,7 +587,7 @@ def create_cirros_vm(
source="http",
url=get_http_image_url(image_directory=Images.Cirros.DIR, image_name=Images.Cirros.QCOW2_IMG),
storage_class=storage_class,
size=Images.Cirros.DEFAULT_DV_SIZE,
size=get_default_storage_profile_minimum_supported_pvc_size(),
Copy link
Contributor

Choose a reason for hiding this comment

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

For http import, storage profile annotation should handle this, no?


def get_default_storage_profile_minimum_supported_pvc_size() -> str:
return StorageProfile(
name=next(iter(py_config["system_storage_class_matrix"][0]))
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of deducing the storage profile name using 'next(item(py_config["system_storage_class_matrix"][0]))' , is that good to pass the storage class name directly to this function and make use of it here ? (i.e) get_default_storage_profile_minimum_supported_pvc_size(storage_class=storage_class)

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.

8 participants