Skip to content

Add windows vm to test_metrics file tests #730

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

Merged
merged 31 commits into from
Jun 8, 2025

Conversation

OhadRevah
Copy link
Contributor

@OhadRevah OhadRevah commented Apr 10, 2025

Short description:

Add windows vm for metrics in test_metrics file
that use a vm.
Some of the metrics have a bug:
kubevirt_vmi_memory_actual_balloon_bytes,
kubevirt_vmi_memory_domain_byte,
kubevirt_vmi_memory_pgmajfault_total,
kubevirt_vmi_memory_pgminfault_total,
kubevirt_vmi_memory_swap_in_traffic_bytes,
kubevirt_vmi_memory_swap_out_traffic_bytes,
kubevirt_vmi_memory_swap_out_traffic_bytes,
kubevirt_vmi_memory_unused_bytes
kubevirt_vmi_memory_usable_bytes
kubevirt_vmi_network_receive_bytes_total,
kubevirt_vmi_network_receive_packets_dropped_total,
kubevirt_vmi_network_transmit_bytes_total,
kubevirt_vmi_network_transmit_packets_dropped_total,
kubevirt_vmi_storage_flush_requests_total,
kubevirt_vmi_storage_flush_times_seconds_total,
kubevirt_vmi_storage_iops_read_total,
kubevirt_vmi_storage_iops_write_total,
kubevirt_vmi_storage_read_traffic_bytes_total,
kubevirt_vmi_storage_write_traffic_bytes_total,
kubevirt_vmi_vcpu_wait_seconds_total,

More details:

kubevirt_vmi_memory_swap_in_traffic_bytes, opened bug
kubevirt_vmi_memory_swap_out_traffic_bytes, opened bug
kubevirt_vmi_memory_swap_out_traffic_bytes, opened bug
kubevirt_vmi_memory_unused_bytes, opened bug
kubevirt_vmi_memory_usable_bytes, opened bug
kubevirt_vmi_memory_pgmajfault_total, opened bug

What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket:

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

Summary by CodeRabbit

  • New Features

    • Added new monitoring metrics constants for network, memory, storage, and CPU wait times.
    • Created a comprehensive list of monitoring metrics for testing purposes.
    • Implemented fixtures to identify and handle known metric issues on Windows VMs.
  • Refactor

    • Shifted test structure to focus on separate classes for Linux and Windows VM metrics validation.
    • Updated fixtures to account for Windows VM metric bugs.
    • Introduced helper functions to streamline VM metric assertions.
  • Bug Fixes

    • Included conditional test expectations for known Windows VM metric bugs.
  • Chores

    • Extended constants module with new metric identifiers and grouped list.
    • Removed obsolete constants related to deprecated metrics.

Added windows vm to these metrics tests- test_metrics:
kubevirt_vmi_network_receive_packets_dropped_total
kubevirt_vmi_network_transmit_packets_dropped_total
kubevirt_vmi_memory_domain_bytes
kubevirt_vmi_memory_unused_bytes
kubevirt_vmi_memory_usable_bytes
kubevirt_vmi_memory_actual_balloon_bytes
kubevirt_vmi_memory_pgmajfault_total
kubevirt_vmi_storage_flush_requests_total
kubevirt_vmi_storage_flush_times_seconds_total
kubevirt_vmi_network_receive_bytes_total
kubevirt_vmi_network_transmit_bytes_total
kubevirt_vmi_storage_iops_write_total
kubevirt_vmi_storage_iops_read_total
kubevirt_vmi_storage_write_traffic_bytes_total
kubevirt_vmi_storage_read_traffic_bytes_total
kubevirt_vmi_vcpu_wait_seconds_total
kubevirt_vmi_memory_swap_in_traffic_bytes
kubevirt_vmi_memory_swap_out_traffic_bytes
Add windows vm for metrics in test_metrics file
that use a vm.
Some of the metrics have a bug:
kubevirt_vmi_memory_actual_balloon_bytes,
kubevirt_vmi_memory_domain_byte,
kubevirt_vmi_memory_pgmajfault_total, opened bug
kubevirt_vmi_memory_pgminfault_total,
kubevirt_vmi_memory_swap_in_traffic_bytes, opened bug
kubevirt_vmi_memory_swap_out_traffic_bytes, opened bug
kubevirt_vmi_memory_unused_bytes, opened bug
kubevirt_vmi_memory_usable_bytes, opened bug
kubevirt_vmi_network_receive_bytes_total,
kubevirt_vmi_network_receive_packets_dropped_total,
kubevirt_vmi_network_transmit_bytes_total,
kubevirt_vmi_network_transmit_packets_dropped_total,
kubevirt_vmi_storage_flush_requests_total,
kubevirt_vmi_storage_flush_times_seconds_total,
kubevirt_vmi_storage_iops_read_total,
kubevirt_vmi_storage_iops_write_total,
kubevirt_vmi_storage_read_traffic_bytes_total,
kubevirt_vmi_storage_write_traffic_bytes_total,
kubevirt_vmi_vcpu_wait_seconds_total,
@ghost
Copy link

ghost commented Apr 10, 2025

Report bugs in Issues

The following are automatically added:

  • Add reviewers from OWNER file (in the root of the repository) under reviewers section.
  • Set PR size label.
  • New issue is created for the PR. (Closed when PR is merged/closed)
  • Run pre-commit if .pre-commit-config.yaml exists in the repo.

Available user actions:

  • To mark PR as WIP comment /wip to the PR, To remove it from the PR comment /wip cancel to the PR.
  • To block merging of PR comment /hold, To un-block merging of PR comment /hold cancel.
  • To mark PR as verified comment /verified to the PR, to un-verify comment /verified cancel to the PR.
    verified label removed on each new commit push.
  • To cherry pick a merged PR comment /cherry-pick <target branch to cherry-pick to> in the PR.
    • Multiple target branches can be cherry-picked, separated by spaces. (/cherry-pick branch1 branch2)
    • Cherry-pick will be started when PR is merged
  • To build and push container image command /build-and-push-container in the PR (tag will be the PR number).
    • You can add extra args to the Podman build command
      • Example: /build-and-push-container --build-arg OPENSHIFT_PYTHON_WRAPPER_COMMIT=<commit_hash>
  • To add a label by comment use /<label name>, to remove, use /<label name> cancel
  • To assign reviewers based on OWNERS file use /assign-reviewers
  • To check if PR can be merged use /check-can-merge
  • to assign reviewer to PR use /assign-reviewer @<reviewer>
Supported /retest check runs
  • /retest tox: Retest tox
  • /retest build-container: Retest build-container
  • /retest all: Retest all
Supported labels
  • hold
  • verified
  • wip
  • lgtm

@OhadRevah OhadRevah changed the title Test metrics windows Add windows vm to test_metrics file tests Apr 10, 2025
@rnetser
Copy link
Collaborator

rnetser commented Jun 6, 2025

/approve
/lgtm

@vsibirsk vsibirsk merged commit b084519 into RedHatQE:main Jun 8, 2025
8 of 9 checks passed
@openshift-virtualization-qe-bot-2

Successfully removed PR tag: quay.io/openshift-cnv/openshift-virtualization-tests:pr-730.

@openshift-virtualization-qe-bot-2

New container for quay.io/openshift-cnv/openshift-virtualization-tests:latest published

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.