Skip to content

Updated fedora container-disk and qcow2 to 43#3760

Open
chandramerla wants to merge 3 commits intoRedHatQE:mainfrom
chandramerla:test-fedora-43
Open

Updated fedora container-disk and qcow2 to 43#3760
chandramerla wants to merge 3 commits intoRedHatQE:mainfrom
chandramerla:test-fedora-43

Conversation

@chandramerla
Copy link
Copy Markdown
Member

@chandramerla chandramerla commented Feb 7, 2026

Short description:

As fedora 41 is out of support, moving to newer Fedora. As a first step (less changes) moved cirros workaround from Fedora to alpine, as now with internal-http-server:1.2.0 Fedora/Cirros is replaced with Alpine.

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

Summary by CodeRabbit

  • Chores

    • Updated Fedora base/version to 43 and aligned container image references.
    • Switched S390X Cirros defaults to Alpine-derived images, added Alpine disk demo, reduced default disk/memory sizes, and adjusted S390X image naming.
  • New Features

    • Added a script to build Fedora cloud disk artifacts for multiple architectures.
  • Tests

    • Updated S390X test configuration to target Fedora 43.
  • Bug Fixes

    • Improved detection of qemu-guest-agent on test hosts.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 7, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

S390x image configuration switched from Fedora/Cirros workarounds to Alpine-derived Cirros substitutes, Fedora s390x references updated to Fedora 43, a new Fedora artifact build script was added, tests updated to Fedora 43, and qemu-guest-agent detection now uses rpm -q over SSH.

Changes

Cohort / File(s) Summary
Image & constants
utilities/constants.py
Reworked S390X image entries: replaced Fedora-based Cirros fields with Alpine-derived ArchImages.S390X.Cirros values, added ALPINE_DISK_DEMO, changed S390X DIR to alpine-images, reduced DEFAULT_DV_SIZE and DEFAULT_MEMORY_SIZE, set OS_FLAVOR to Alpine; added FEDORA43_IMG, switched Fedora container image tag to Fedora 43 s390x and set Fedora.LATEST_RELEASE_STR accordingly; renamed s390x CDI QCOW2 image to include -s390x.
Fedora artifact builder (new)
containers/fedora_artifacts/build.sh
New executable Bash script to fetch per-arch Fedora Cloud QCOW2s, verify SHA256 checksums, convert QCOW2→raw via qemu-img, compress artifacts (gzip/xz), and emit arch-tagged outputs into out/.
Tests
tests/global_config_s390x.py
Updated fedora_os_list from ["fedora-42"] to ["fedora-43"].
Runtime detection
utilities/virt.py
check_qemu_guest_agent_installed() now runs rpm -q qemu-guest-agent over SSH and returns True on exit code 0; removed prior package-manager helper usage and sudo toggling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description covers the short description and mentions why the change is needed (Fedora 41 out of support, Alpine Cirros replacement). However, critical template sections remain unfilled: 'More details', 'What this PR does / why we need it', 'Which issue(s) this PR fixes', 'Special notes for reviewer', and 'jira-ticket' are either empty or incomplete. Complete the 'More details' section with technical specifics (Alpine image sources, compatibility details). Expand 'What this PR does' with concrete impact (removed Fedora-based workarounds, added Alpine configuration). Add 'jira-ticket' (even if NONE). List test coverage and any breaking changes in 'Special notes for reviewer'.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Updated fedora container-disk and qcow2 to 43' directly corresponds to the primary change: updating Fedora from version 41/42 to version 43 across container artifacts and configuration.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chandramerla
Copy link
Copy Markdown
Member Author

/wip

/build-and-push-container

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.66%. Comparing base (b4ad2e0) to head (fb18b8a).
⚠️ Report is 92 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3760      +/-   ##
==========================================
+ Coverage   98.63%   98.66%   +0.03%     
==========================================
  Files          25       25              
  Lines        2420     2476      +56     
==========================================
+ Hits         2387     2443      +56     
  Misses         33       33              
Flag Coverage Δ
utilities 98.66% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chandramerla
Copy link
Copy Markdown
Member Author

/build-and-push-container

@chandramerla
Copy link
Copy Markdown
Member Author

/wip

@chandramerla chandramerla marked this pull request as ready for review February 7, 2026 06:25
@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: Enabled categories: branch, can-be-merged, cherry-pick, has-conflicts, hold, needs-rebase, size, verified, wip

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest verify-bugs-are-open - verify-bugs-are-open
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 2 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No WIP, hold, conflict labels
  5. Verified: PR must be marked as verified (if verification is enabled)

📊 Review Process

Approvers and Reviewers

Approvers:

  • dshchedr
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • RoniKishner
  • dshchedr
  • geetikakay
  • rnetser
  • vsibirsk
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is automatically removed on each new commit
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

@chandramerla
Copy link
Copy Markdown
Member Author

/wip

/build-and-push-container

@openshift-virtualization-qe-bot-4 openshift-virtualization-qe-bot-4 changed the title Updated fedora container-disk and qcow2 to 43 WIP: Updated fedora container-disk and qcow2 to 43 Feb 7, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
utilities/constants.py (1)

155-168: ⚠️ Potential issue | 🟡 Minor

MEDIUM: Partial version update creates mixed Fedora versions within the same S390X Cirros object.

QCOW2_IMG now points to Fedora 43-1.6, while RAW_IMG, RAW_IMG_GZ, RAW_IMG_XZ, QCOW2_IMG_GZ, and QCOW2_IMG_XZ still reference Fedora 41-1.4. Any test that exercises compressed variants (gz/xz) of either raw or qcow2 on S390X will use a different OS version than the uncompressed qcow2 path.

I see the PR description notes a follow-up for Fedora.*.(raw|qcow2).(xz.gz) — just calling this out because until that lands, S390X image-format tests could produce inconsistent results across formats. Consider either:

  • Updating all entries here atomically, or
  • Adding a code comment noting the remaining entries are intentionally deferred.
🤖 Fix all issues with AI agents
In `@utilities/constants.py`:
- Line 188: The FEDORA_CONTAINER_IMAGE constant currently points to a personal
quay.io namespace (FEDORA_CONTAINER_IMAGE =
"quay.io/nestor_acuna_blanco/openshift-cnv/fedora:43-s390x"); update it to the
official organization image name matching the existing pattern (e.g.,
"quay.io/openshift-cnv/qe-cnv-tests-fedora:43-s390x") or, if this is a temporary
placeholder, replace or annotate the constant FEDORA_CONTAINER_IMAGE with a
TODO/FIXME comment including a tracking reference (issue/PR ID) indicating
migration to the official quay.io/openshift-cnv image before final release.

Comment thread utilities/constants.py
@openshift-virtualization-qe-bot-4
Copy link
Copy Markdown

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

@chandramerla
Copy link
Copy Markdown
Member Author

/build-and-push-container

@openshift-virtualization-qe-bot-4
Copy link
Copy Markdown

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

@openshift-virtualization-qe-bot
Copy link
Copy Markdown

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/26499

coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 1, 2026
@chandramerla
Copy link
Copy Markdown
Member Author

/verified

I've verified the changes (+ test fixes from #4305 ) on s390x, as mainly changed in constants.py s390x class and global_config_s390x.py and they don't affect tests of x86.

=========================== short test summary info ============================
SKIPPED [1] tests/storage/cdi_import/test_import_http.py:203: Test is not supported on Block volume mode
= 78 passed, 1 skipped, 154 deselected, 112 warnings, 1 subtests passed, 1 quarantined in 5644.65s (1:34:04) =

Tests run args:

          "tests/storage/cdi_import/test_import_http.py",
          "tests/storage/storage_migration/test_storage_class_migration.py",
          "tests/storage/cdi_clone/test_clone.py",
          "tests/storage/test_data_protection.py",
          "tests/storage/test_priority_class.py",
          "tests/storage/test_hotplug.py",
          "tests/storage/upgrade/test_upgrade_storage.py",
          "tests/network/migration/test_masquerade_connectivity_after_migration.py",
          "tests/network/connectivity/test_pod_network.py",
          "tests/network/l2_bridge/vmi_interfaces_stability/",
          "tests/infrastructure/instance_types/supported_os/",
          "tests/infrastructure/instance_types/",
          "tests/virt/node/migration_and_maintenance/test_node_maintenance.py",
          "tests/virt/node/migration_and_maintenance/test_vm_memory_load_with_migration.py",
          "tests/virt/node/migration_and_maintenance/test_vm_disk_load_with_migration.py",
          "tests/virt/node/workload_density/test_free_page_reporting.py",
          "tests/virt/node/workload_density/test_swap.py",
          "tests/virt/node/owner_references/test_vm_owner_references.py",
          "tests/virt/node/node_labeller/cpu_features/test_vm_with_cpu_flag.py",
          "tests/virt/node/node_labeller/cpu_features/test_vm_with_cpu_features.py",
          "tests/virt/node/general/test_machinetype.py",
          "tests/virt/node/general/test_disable_pvspinlock.py",
          "tests/virt/node/general/test_oom.py",
          "tests/virt/node/general/test_container_disk_vm.py",
          "tests/virt/node/general/test_cloud_init_vm.py",
          "tests/virt/node/general/test_cloud_init_disk_vm.py",
          "tests/virt/node/general/test_vm_with_sidecar.py",
          "tests/virt/node/general/test_networkinterfacemultiqueue_feature.py",
          "tests/virt/node/general/test_disk_io_option.py",
          "tests/virt/node/cpu_sockets_threads/test_cpu_support_sockets_threads.py",
          "tests/virt/node/hyperv_support/test_hyperv_features_in_vm.py",
          "tests/virt/node/high_performance_vm/test_numa.py",
          "tests/virt/node/log_verbosity/test_log_virt_launcher.py",
          "tests/virt/node/rng/test_rng.py",
          "tests/virt/node/hotplug/test_cpu_memory_hotplug.py",
          "tests/virt/node/migration_and_maintenance/test_post_copy_migration.py",
          "tests/virt/node/migration_and_maintenance/test_vm_unscheduled_node.py",
          "tests/virt/node/descheduler/",
          "-m=s390x and not special_infra and not high_resource_vm and not ipv6",
          "-s",
          "--tc-file=tests/global_config_s390x.py",
          "-o", "log_cli=true",
          "--storage-class-matrix=ocs-storagecluster-ceph-rbd-virtualization",
          "--leftovers-collector",
          "--tc", "default_storage_class:ocs-storagecluster-ceph-rbd-virtualization",
          "--tc", "default_volume_mode:Block",

@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

@coderabbitai

Test execution plan request details

CRITICAL: You MUST post an inline review comment on the first changed line of the first file.
The inline comment should contain the Test Execution Plan with the smoke tests recommendation.
Do NOT submit a formal review - just post the inline comment directly.

As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
You will post an inline review comment with the test execution plan on the first changed file.
If you fail to run or post a comment, retry.

Analysis Requirements:

  1. Examine code changes in each modified file
  2. Identify affected code paths, functions, and classes
  3. Analyze pytest-specific elements: fixtures (scope, dependencies), parametrization, markers, conftest changes
  4. Trace test dependencies through imports, shared utilities, and fixture inheritance
  5. Detect new tests introduced in the PR
  6. Smoke Test Impact Analysis: Determine if any changes could affect smoke tests by checking:
    • Changes to files/functions used by tests marked with @pytest.mark.smoke
    • Changes to fixtures or utilities imported by smoke tests
    • Changes to conftest.py files that may affect smoke test execution
    • Changes to core infrastructure code (utilities/, libs/) that smoke tests depend on

Your deliverable:
Your change request comment will be based on the following requirements:

Test Execution Plan

  • Run smoke tests: True / False (Based on your smoke test impact analysis - True if any changes may affect smoke tests)
  • path/to/test_file.py - When the entire test file needs verification
  • path/to/test_file.py::TestClass::test_method - When specific test(s) needed
  • path/to/test_file.py::test_function - When specific test(s) needed
  • -m marker - When specific marker(s) can be used to cover multiple cases.

Guidelines:

  • Include only tests directly affected by the changes
  • Use a full file path only if ALL tests in that file require verification
  • Use file path + test name if only specific tests are needed
  • If a test marker can cover multiple files/tests, provide the marker
  • Balance coverage vs over-testing - Keep descriptions minimal

Hardware-Related Checks (SR-IOV, GPU, DPDK):

When PR modifies fixtures for hardware-specific resources:

  • Collection Safety: Fixtures MUST have existence checks (return None when hardware unavailable)
  • Test Plan: MUST verify both WITH and WITHOUT hardware:
    • Run affected tests on cluster WITH hardware
    • Verify collection succeeds on cluster WITHOUT hardware

CRITICAL WORKFLOW COMPLETION RULES:

When responding to this test execution plan request, you MUST follow these rules EXACTLY:

  1. YOUR ONLY DELIVERABLE: Post an inline review comment containing the test execution plan on the first changed line
  2. THEN STOP IMMEDIATELY - Do NOT generate any additional response
  3. FALLBACK ONLY: If submitting the review fails after retrying, post as a regular PR comment
  4. SILENCE = SUCCESS: After successfully submitting the review, your task is complete. No confirmation needed.

ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):

  • ❌ Do NOT post acknowledgment messages like "Test execution plan posted", "Review posted successfully", "I've successfully posted"
  • ❌ Do NOT mention review IDs, URLs, or confirmation of posting in the PR thread
  • ❌ Do NOT add any follow-up comments after submitting the review
  • ❌ Do NOT reply to confirm task completion
  • ❌ Do NOT explain what you did - just do it and stop

Remember: The pull request review is visible to users. Additional comments are redundant noise.

CRITICAL: Before setting "Run smoke tests: True", you MUST use shell scripts to:
- Trace the actual fixture dependency chain from smoke tests to changed fixtures
- Verify that smoke tests actually import/use changed utilities or functions
- Confirm the dependency path exists; do NOT assume based on scope or semantics
- Be conservative: Session-scoped fixtures or infrastructure-sounding names do NOT
automatically mean smoke test impact. Only flag smoke test impact when you can
demonstrate a concrete dependency path.
WRONG: "This session-scoped storage fixture might affect smoke tests"
RIGHT: "Smoke test X uses fixture Y, which depends on the changed fixture Z"

@chandramerla
Copy link
Copy Markdown
Member Author

/wip cancel

Please review!
@jpeimer @rnetser @nestoracunablanco @nekkunti @azhivovk

Comment thread containers/README.md
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 1, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all smoke-marked tests
rg "pytest.mark.smoke" --type=py -l

# Find what references FEDORA43_IMG, LATEST_RELEASE_STR, FEDORA_CONTAINER_IMAGE in tests
rg "FEDORA43_IMG|FEDORA42_IMG|FEDORA41_IMG|LATEST_RELEASE_STR|FEDORA_CONTAINER_IMAGE" --type=py -n -C2

# Check what changed in the PR - which files were modified
git diff HEAD~1 --name-only 2>/dev/null || git show --stat HEAD | head -20

# Check smoke tests for any s390x or fedora image references
rg "pytest.mark.smoke" --type=py -B5 -A5 | grep -E "s390x|fedora|FEDORA|container_disk" -i | head -30

Length of output: 20967


Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@containers/fedora_artifacts/build.sh`:
- Around line 49-50: The script currently renames the upstream qcow2 by using mv
"${OUT_DIR}/${qcow2_name}" "${OUT_DIR}/${img_name}", which removes the original
upstream filename consumers expect; change this so the original ${qcow2_name}
remains in OUT_DIR (e.g., replace the mv with a copy or create a separate
${img_name} while leaving ${qcow2_name} intact). Update the build.sh block
around the echo/mv lines (reference ${qcow2_name}, ${img_name}, OUT_DIR and the
mv invocation) to create the alternate artifact without deleting or overwriting
the upstream qcow2 filename so utilities/constants.py lookups continue to
succeed.

In `@utilities/virt.py`:
- Around line 2552-2554: The check hard-codes "rpm -q qemu-guest-agent" which
breaks on non-RPM guests; replace it with a distro-agnostic flow that queries
ssh_exec.package_manager.info() and uses the detected manager to run the
appropriate query (e.g. use "rpm -q" for RPM families and "dpkg -s" or
equivalent for Debian families), or fall back to a generic package-manager API
if available; specifically update the code that currently calls
ssh_exec.run_command(command=shlex.split("rpm -q qemu-guest-agent")) to inspect
ssh_exec.package_manager.info() and choose the correct check for the
qemu-guest-agent package.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ad37198f-3a93-4285-93e5-c27b854a82e4

📥 Commits

Reviewing files that changed from the base of the PR and between 1900f92 and 1418f09.

⛔ Files ignored due to path filters (2)
  • containers/README.md is excluded by !**/*.md
  • containers/fedora_artifacts/README.md is excluded by !**/*.md
📒 Files selected for processing (4)
  • containers/fedora_artifacts/build.sh
  • tests/global_config_s390x.py
  • utilities/constants.py
  • utilities/virt.py

Comment thread containers/fedora_artifacts/build.sh
Comment thread utilities/virt.py
Comment thread containers/fedora_artifacts/README.md Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
containers/fedora_artifacts/build.sh (1)

49-50: ⚠️ Potential issue | 🟠 Major

HIGH: Keep canonical qcow2 filename; create alias instead of renaming.

Line 49-50 uses mv, which deletes ${qcow2_name} from out/. Consumers still reference upstream names (for example from utilities/constants.py), so artifact lookup can fail.

Proposed fix
-  echo "[${arch}] Renaming qcow2 to ${img_name}..."
-  mv "${OUT_DIR}/${qcow2_name}" "${OUT_DIR}/${img_name}"
+  echo "[${arch}] Creating qcow2 alias ${img_name} (preserve canonical filename)..."
+  cp "${OUT_DIR}/${qcow2_name}" "${OUT_DIR}/${img_name}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@containers/fedora_artifacts/build.sh` around lines 49 - 50, Don't rename the
canonical qcow2 file; replace the mv call with creating an alias so the original
${qcow2_name} remains in ${OUT_DIR}. Specifically, in build.sh where you
currently call mv "${OUT_DIR}/${qcow2_name}" "${OUT_DIR}/${img_name}", create a
symbolic link (or hard link if preferred) named "${OUT_DIR}/${img_name}" that
points to "${OUT_DIR}/${qcow2_name}" (and handle preexisting "${img_name}" by
removing it first), so consumers referencing the upstream ${qcow2_name} continue
to work while you still provide ${img_name}.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@containers/fedora_artifacts/build.sh`:
- Around line 49-50: Don't rename the canonical qcow2 file; replace the mv call
with creating an alias so the original ${qcow2_name} remains in ${OUT_DIR}.
Specifically, in build.sh where you currently call mv "${OUT_DIR}/${qcow2_name}"
"${OUT_DIR}/${img_name}", create a symbolic link (or hard link if preferred)
named "${OUT_DIR}/${img_name}" that points to "${OUT_DIR}/${qcow2_name}" (and
handle preexisting "${img_name}" by removing it first), so consumers referencing
the upstream ${qcow2_name} continue to work while you still provide ${img_name}.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5864dc3b-e780-4030-8887-a8e0483e0aa7

📥 Commits

Reviewing files that changed from the base of the PR and between 1418f09 and e1593b0.

⛔ Files ignored due to path filters (2)
  • containers/README.md is excluded by !**/*.md
  • containers/fedora_artifacts/README.md is excluded by !**/*.md
📒 Files selected for processing (2)
  • containers/fedora_artifacts/build.sh
  • utilities/virt.py

@chandramerla
Copy link
Copy Markdown
Member Author

♻️ Duplicate comments (1)

containers/fedora_artifacts/build.sh (1)> 49-50: ⚠️ Potential issue | 🟠 Major

HIGH: Keep canonical qcow2 filename; create alias instead of renaming.
Line 49-50 uses mv, which deletes ${qcow2_name} from out/. Consumers still reference upstream names (for example from utilities/constants.py), so artifact lookup can fail.

Proposed fix

-  echo "[${arch}] Renaming qcow2 to ${img_name}..."
-  mv "${OUT_DIR}/${qcow2_name}" "${OUT_DIR}/${img_name}"
+  echo "[${arch}] Creating qcow2 alias ${img_name} (preserve canonical filename)..."
+  cp "${OUT_DIR}/${qcow2_name}" "${OUT_DIR}/${img_name}"

🤖 Prompt for AI Agents

Verify each finding against the current code and only fix it if needed.

In `@containers/fedora_artifacts/build.sh` around lines 49 - 50, Don't rename the
canonical qcow2 file; replace the mv call with creating an alias so the original
${qcow2_name} remains in ${OUT_DIR}. Specifically, in build.sh where you
currently call mv "${OUT_DIR}/${qcow2_name}" "${OUT_DIR}/${img_name}", create a
symbolic link (or hard link if preferred) named "${OUT_DIR}/${img_name}" that
points to "${OUT_DIR}/${qcow2_name}" (and handle preexisting "${img_name}" by
removing it first), so consumers referencing the upstream ${qcow2_name} continue
to work while you still provide ${img_name}.

🤖 Prompt for all review comments with AI agents

Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@containers/fedora_artifacts/build.sh`:
- Around line 49-50: Don't rename the canonical qcow2 file; replace the mv call
with creating an alias so the original ${qcow2_name} remains in ${OUT_DIR}.
Specifically, in build.sh where you currently call mv "${OUT_DIR}/${qcow2_name}"
"${OUT_DIR}/${img_name}", create a symbolic link (or hard link if preferred)
named "${OUT_DIR}/${img_name}" that points to "${OUT_DIR}/${qcow2_name}" (and
handle preexisting "${img_name}" by removing it first), so consumers referencing
the upstream ${qcow2_name} continue to work while you still provide ${img_name}.

ℹ️ Review info

Added a comment here as a reply: #3760 (comment)

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (2)
utilities/virt.py (1)

2552-2554: ⚠️ Potential issue | 🟠 Major

HIGH: check_qemu_guest_agent_installed is now RPM-only and can return false negatives on non-RPM guests.

Line 2553 hard-codes rpm -q, so Alpine/Debian-based guests will report “not installed” even when qemu-guest-agent exists. This helper is generic, so distro-coupling here creates fragile behavior as image mix evolves.

Proposed fix
 def check_qemu_guest_agent_installed(ssh_exec: Host) -> bool:
-    """Check if qemu-guest-agent is installed via rpm, bypassing rrmngmnt's `which`-based package manager detection."""
-    rc, _, _ = ssh_exec.run_command(command=shlex.split("rpm -q qemu-guest-agent"))
-    return rc == 0
+    """Check whether qemu-guest-agent is installed on the guest."""
+    package_check_commands = [
+        ["rpm", "-q", "qemu-guest-agent"],
+        ["dpkg-query", "-W", "-f=${Status}", "qemu-guest-agent"],
+        ["apk", "info", "-e", "qemu-guest-agent"],
+    ]
+    for package_check_command in package_check_commands:
+        rc, out, _ = ssh_exec.run_command(command=package_check_command)
+        if rc == 0 and (
+            package_check_command[0] != "dpkg-query" or "installed" in out
+        ):
+            return True
+    return False
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@utilities/virt.py` around lines 2552 - 2554, The helper
check_qemu_guest_agent_installed is RPM-only and may return false negatives on
non-RPM guests; update it to detect distro/package-manager or fall back to a
distro-agnostic check: try rpm -q qemu-guest-agent first (using
ssh_exec.run_command), then if that fails run a fallback like command
-v/qemu-guest-agent or check common binary paths (/usr/sbin/qemu-guest-agent)
and/or systemctl status/qemu-guest-agent.service; ensure the function
(check_qemu_guest_agent_installed) returns true if any of these checks succeed
and false only if all checks fail.
containers/fedora_artifacts/build.sh (1)

49-50: ⚠️ Potential issue | 🟠 Major

HIGH: Keep the upstream qcow2 name and create Fedora-qcow2-${arch}.img as an extra artifact.

mv removes ${qcow2_name} from out/, but utilities/constants.py still references the upstream Fedora filenames for boot sources. After upload, consumers looking for Fedora-Cloud-Base-Generic-*.qcow2 will fail. Create the alias without deleting the original file.

Proposed fix
-  echo "[${arch}] Renaming qcow2 to ${img_name}..."
-  mv "${OUT_DIR}/${qcow2_name}" "${OUT_DIR}/${img_name}"
+  echo "[${arch}] Creating qcow2 alias ${img_name}..."
+  cp "${OUT_DIR}/${qcow2_name}" "${OUT_DIR}/${img_name}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@containers/fedora_artifacts/build.sh` around lines 49 - 50, The script
currently renames the upstream qcow2 with mv which deletes the original
referenced by utilities/constants.py; instead preserve the original and create
the extra artifact by copying or linking "${OUT_DIR}/${qcow2_name}" to
"${OUT_DIR}/${img_name}" (use cp or ln as appropriate) so
Fedora-Cloud-Base-Generic-*.qcow2 remains in out/ while also producing
Fedora-qcow2-${arch}.img; update the line that uses mv in build.sh to perform a
copy/link and ensure variables arch, img_name, qcow2_name and OUT_DIR are used
exactly as currently defined.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@containers/fedora_artifacts/build.sh`:
- Around line 35-39: Add a checksum verification step after downloading the
qcow2 and before running qemu-img: download the corresponding CHECKSUM (from the
same url_base using qcow2_name + ".CHECKSUM" or similar), verify it with
sha256sum --check (or the signed verification flow if available), and abort
(non-zero exit) if the check fails; update the wget/verification logic around
the existing variables/commands (qcow2_name, OUT_DIR, url_base, wget, sha256sum,
qemu-img, raw_name) so qemu-img convert only runs when the integrity check
passes.

In `@utilities/constants.py`:
- Around line 170-178: The Cirros image descriptor has a mixed Alpine/Fedora
configuration (Cirros has DISK_DEMO pointing to Fedora while DIR, QCOW2_IMG,
DEFAULT_MEMORY_SIZE, and OS_FLAVOR were changed to Alpine), which breaks
consumers that read multiple fields together (e.g., tests/utils.py and
utilities/storage.py); fix by splitting the workaround into two distinct
descriptors or restoring a consistent Fedora-backed Cirros entry: either create
a new Alpine-only descriptor (e.g., Images.CirrosAlpine or
Images.AlpineSubstitute) with BASE_VERSIONED_ALPINE_NAME, QCOW2_IMG, DIR,
DEFAULT_MEMORY_SIZE, and OS_FLAVOR set to Alpine and leave Cirros.DISk_DEMO,
DISK_DEMO, and any Fedora-specific fields on the original Cirros descriptor, or
revert the modified fields in Cirros back to the Fedora values so tests that
inspect Images.Cirros (DISK_DEMO, DIR, QCOW2_IMG, DEFAULT_MEMORY_SIZE,
OS_FLAVOR) remain consistent; update references in consumers if you introduce
the new descriptor.

---

Duplicate comments:
In `@containers/fedora_artifacts/build.sh`:
- Around line 49-50: The script currently renames the upstream qcow2 with mv
which deletes the original referenced by utilities/constants.py; instead
preserve the original and create the extra artifact by copying or linking
"${OUT_DIR}/${qcow2_name}" to "${OUT_DIR}/${img_name}" (use cp or ln as
appropriate) so Fedora-Cloud-Base-Generic-*.qcow2 remains in out/ while also
producing Fedora-qcow2-${arch}.img; update the line that uses mv in build.sh to
perform a copy/link and ensure variables arch, img_name, qcow2_name and OUT_DIR
are used exactly as currently defined.

In `@utilities/virt.py`:
- Around line 2552-2554: The helper check_qemu_guest_agent_installed is RPM-only
and may return false negatives on non-RPM guests; update it to detect
distro/package-manager or fall back to a distro-agnostic check: try rpm -q
qemu-guest-agent first (using ssh_exec.run_command), then if that fails run a
fallback like command -v/qemu-guest-agent or check common binary paths
(/usr/sbin/qemu-guest-agent) and/or systemctl status/qemu-guest-agent.service;
ensure the function (check_qemu_guest_agent_installed) returns true if any of
these checks succeed and false only if all checks fail.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f945a03e-a7ed-45d3-8581-51355328b132

📥 Commits

Reviewing files that changed from the base of the PR and between e1593b0 and 9db0c6e.

⛔ Files ignored due to path filters (2)
  • containers/README.md is excluded by !**/*.md
  • containers/fedora_artifacts/README.md is excluded by !**/*.md
📒 Files selected for processing (4)
  • containers/fedora_artifacts/build.sh
  • tests/global_config_s390x.py
  • utilities/constants.py
  • utilities/virt.py

Comment thread containers/fedora_artifacts/build.sh
Comment thread utilities/constants.py
@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

/retest all

Auto-triggered: Files in this PR were modified by merged PR #4404.

Overlapping files

utilities/virt.py

@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

/retest all

Auto-triggered: Files in this PR were modified by merged PR #4463.

Overlapping files

utilities/virt.py

@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

/retest all

Auto-triggered: Files in this PR were modified by merged PR #4567.

Overlapping files

utilities/virt.py

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@containers/fedora_artifacts/build.sh`:
- Around line 45-48: The message printed when expected_hash is empty uses
"WARNING" but this branch is fatal; update the echo in the conditional that
checks expected_hash (the block referencing expected_hash, qcow2_name,
checksum_file) to use "ERROR:" instead of "WARNING:" so the log severity matches
the subsequent exit 1 and aligns with the other mismatch branch.

In `@utilities/constants.py`:
- Around line 171-180: Images.S390X.Cirros.DISK_DEMO is set to ALPINE_DISK_DEMO
which points to an image lacking s390x manifest and causes s390x tests (e.g.,
test_wffc_import_registry_dv marked with `@pytest.mark.s390x`) to fail; update the
constant/assignment so Images.S390X.Cirros.DISK_DEMO uses an image that has a
multi-architecture (includes s390x) manifest or replace it with a known
s390x-capable image (update ALPINE_DISK_DEMO or override the Cirros.DISK_DEMO
assignment), or alternatively remove the `@pytest.mark.s390x` marker from tests
that cannot run on s390x—ensure the change targets the ALPINE_DISK_DEMO constant
and the Images.S390X.Cirros.DISK_DEMO assignment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8a681043-9f8c-4b8c-a39e-ab3616323dc1

📥 Commits

Reviewing files that changed from the base of the PR and between 9db0c6e and c9046a8.

⛔ Files ignored due to path filters (2)
  • containers/README.md is excluded by !**/*.md
  • containers/fedora_artifacts/README.md is excluded by !**/*.md
📒 Files selected for processing (4)
  • containers/fedora_artifacts/build.sh
  • tests/global_config_s390x.py
  • utilities/constants.py
  • utilities/virt.py

Comment thread containers/fedora_artifacts/build.sh
Comment thread utilities/constants.py
Signed-off-by: chandramerla <Chandra.Merla@ibm.com>
Assisted-by: Cursor
The script to build Fedora image related artifacts is added. It downloads Fedora base image for a given version and prepare all artifacts which usually are required for tests in the artifactory:
Fedora-Cloud-Base-Generic-43-1.6.s390x.qcow2.gz
Fedora-Cloud-Base-Generic-43-1.6.s390x.qcow2.xz
Fedora-Cloud-Base-Generic-43-1.6.s390x.raw
Fedora-Cloud-Base-Generic-43-1.6.s390x.raw.gz
Fedora-Cloud-Base-Generic-43-1.6.s390x.raw.xz
Fedora-qcow2-s390x.img

Signed-off-by: chandramerla <Chandra.Merla@ibm.com>
Fixes 'which' package missing on Fedora 43 and CentOS Stream 9 s390x images

Signed-off-by: chandramerla <Chandra.Merla@ibm.com>
@openshift-virtualization-qe-bot-2
Copy link
Copy Markdown
Contributor

Clean rebase detected — no code changes compared to previous head (3cedbc4).
The following labels were preserved: commented-coderabbitai[bot], commented-chandramerla, lgtm-coderabbitai[bot].

@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

/retest all

Auto-triggered: Files in this PR were modified by merged PR #3748.

Overlapping files

utilities/constants.py

@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

/retest all

Auto-triggered: Files in this PR were modified by merged PR #4725.

Overlapping files

tests/global_config_s390x.py
utilities/constants.py

@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

/retest all

Auto-triggered: Files in this PR were modified by merged PR #4746.

Overlapping files

utilities/virt.py

@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

/retest all

Auto-triggered: Files in this PR were modified by merged PR #4756.

Overlapping files

utilities/virt.py

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