Skip to content

Conversation

sureshanaparti
Copy link
Contributor

Description

This PR updates ovftool, virt-v2v version check cmds to run with quotes.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link

codecov bot commented Sep 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.17%. Comparing base (f24b175) to head (c7561ec).
⚠️ Report is 1 commits behind head on 4.20.

Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #11566   +/-   ##
=========================================
  Coverage     16.17%   16.17%           
- Complexity    13284    13286    +2     
=========================================
  Files          5656     5656           
  Lines        498015   498015           
  Branches      60406    60406           
=========================================
+ Hits          80538    80541    +3     
+ Misses       408514   408513    -1     
+ Partials       8963     8961    -2     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.02% <ø> (+<0.01%) ⬆️

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds double quotes around shell command strings used for version checking of ovftool and virt-v2v tools. This enhancement ensures proper command execution when these commands contain special characters or spaces that could be misinterpreted by the shell.

  • Wraps existing version check commands in double quotes for safe shell execution
  • Updates commands for ovftool, virt-v2v, and package checking utilities
  • Maintains backward compatibility while improving command reliability

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +317 to +325
public static final String INSTANCE_CONVERSION_SUPPORTED_CHECK_CMD = "\"virt-v2v --version\"";
// virt-v2v --version => sample output: virt-v2v 1.42.0rhel=8,release=22.module+el8.10.0+1590+a67ab969
public static final String OVF_EXPORT_SUPPORTED_CHECK_CMD = "ovftool --version";
public static final String OVF_EXPORT_SUPPORTED_CHECK_CMD = "\"ovftool --version\"";
// ovftool --version => sample output: VMware ovftool 4.6.0 (build-21452615)
public static final String OVF_EXPORT_TOOl_GET_VERSION_CMD = "ovftool --version | awk '{print $3}'";
public static final String OVF_EXPORT_TOOl_GET_VERSION_CMD = "\"ovftool --version | awk '{print $3}'\"";

public static final String WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "rpm -qa | grep -i virtio-win";
public static final String UBUNTU_WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "dpkg -l virtio-win";
public static final String UBUNTU_NBDKIT_PKG_CHECK_CMD = "dpkg -l nbdkit";
public static final String WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "\"rpm -qa | grep -i virtio-win\"";
public static final String UBUNTU_WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "\"dpkg -l virtio-win\"";
public static final String UBUNTU_NBDKIT_PKG_CHECK_CMD = "\"dpkg -l nbdkit\"";
Copy link
Preview

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

Adding quotes around entire commands may cause issues depending on how these constants are used. If these strings are passed to ProcessBuilder or similar APIs that handle arguments separately, the quotes will be interpreted literally rather than as shell quoting. Consider reviewing how these constants are consumed to ensure the quoting approach is appropriate for the execution method.

Copilot uses AI. Check for mistakes.

Comment on lines +317 to +325
public static final String INSTANCE_CONVERSION_SUPPORTED_CHECK_CMD = "\"virt-v2v --version\"";
// virt-v2v --version => sample output: virt-v2v 1.42.0rhel=8,release=22.module+el8.10.0+1590+a67ab969
public static final String OVF_EXPORT_SUPPORTED_CHECK_CMD = "ovftool --version";
public static final String OVF_EXPORT_SUPPORTED_CHECK_CMD = "\"ovftool --version\"";
// ovftool --version => sample output: VMware ovftool 4.6.0 (build-21452615)
public static final String OVF_EXPORT_TOOl_GET_VERSION_CMD = "ovftool --version | awk '{print $3}'";
public static final String OVF_EXPORT_TOOl_GET_VERSION_CMD = "\"ovftool --version | awk '{print $3}'\"";

public static final String WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "rpm -qa | grep -i virtio-win";
public static final String UBUNTU_WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "dpkg -l virtio-win";
public static final String UBUNTU_NBDKIT_PKG_CHECK_CMD = "dpkg -l nbdkit";
public static final String WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "\"rpm -qa | grep -i virtio-win\"";
public static final String UBUNTU_WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "\"dpkg -l virtio-win\"";
public static final String UBUNTU_NBDKIT_PKG_CHECK_CMD = "\"dpkg -l nbdkit\"";
Copy link
Preview

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

Adding quotes around entire commands may cause issues depending on how these constants are used. If these strings are passed to ProcessBuilder or similar APIs that handle arguments separately, the quotes will be interpreted literally rather than as shell quoting. Consider reviewing how these constants are consumed to ensure the quoting approach is appropriate for the execution method.

Copilot uses AI. Check for mistakes.

Comment on lines +317 to +325
public static final String INSTANCE_CONVERSION_SUPPORTED_CHECK_CMD = "\"virt-v2v --version\"";
// virt-v2v --version => sample output: virt-v2v 1.42.0rhel=8,release=22.module+el8.10.0+1590+a67ab969
public static final String OVF_EXPORT_SUPPORTED_CHECK_CMD = "ovftool --version";
public static final String OVF_EXPORT_SUPPORTED_CHECK_CMD = "\"ovftool --version\"";
// ovftool --version => sample output: VMware ovftool 4.6.0 (build-21452615)
public static final String OVF_EXPORT_TOOl_GET_VERSION_CMD = "ovftool --version | awk '{print $3}'";
public static final String OVF_EXPORT_TOOl_GET_VERSION_CMD = "\"ovftool --version | awk '{print $3}'\"";

public static final String WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "rpm -qa | grep -i virtio-win";
public static final String UBUNTU_WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "dpkg -l virtio-win";
public static final String UBUNTU_NBDKIT_PKG_CHECK_CMD = "dpkg -l nbdkit";
public static final String WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "\"rpm -qa | grep -i virtio-win\"";
public static final String UBUNTU_WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "\"dpkg -l virtio-win\"";
public static final String UBUNTU_NBDKIT_PKG_CHECK_CMD = "\"dpkg -l nbdkit\"";
Copy link
Preview

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

Adding quotes around entire commands may cause issues depending on how these constants are used. If these strings are passed to ProcessBuilder or similar APIs that handle arguments separately, the quotes will be interpreted literally rather than as shell quoting. Consider reviewing how these constants are consumed to ensure the quoting approach is appropriate for the execution method.

Copilot uses AI. Check for mistakes.

Comment on lines +323 to +325
public static final String WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "\"rpm -qa | grep -i virtio-win\"";
public static final String UBUNTU_WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "\"dpkg -l virtio-win\"";
public static final String UBUNTU_NBDKIT_PKG_CHECK_CMD = "\"dpkg -l nbdkit\"";
Copy link
Preview

Copilot AI Sep 3, 2025

Choose a reason for hiding this comment

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

Adding quotes around entire commands may cause issues depending on how these constants are used. If these strings are passed to ProcessBuilder or similar APIs that handle arguments separately, the quotes will be interpreted literally rather than as shell quoting. Consider reviewing how these constants are consumed to ensure the quoting approach is appropriate for the execution method.

Suggested change
public static final String WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "\"rpm -qa | grep -i virtio-win\"";
public static final String UBUNTU_WINDOWS_GUEST_CONVERSION_SUPPORTED_CHECK_CMD = "\"dpkg -l virtio-win\"";
public static final String UBUNTU_NBDKIT_PKG_CHECK_CMD = "\"dpkg -l nbdkit\"";
public static final String UBUNTU_NBDKIT_PKG_CHECK_CMD = "dpkg -l nbdkit";

Copilot uses AI. Check for mistakes.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14830

@sureshanaparti sureshanaparti changed the title Update ovftool, virt-v2v version check cmds to run with quotes [WIP] Update ovftool, virt-v2v version check cmds to run with quotes Sep 4, 2025
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.

2 participants