Re: [PR] Update ovftool, virt-v2v version check cmds to run with quotes [cloudstack]
blueorangutan commented on PR #11566: URL: https://github.com/apache/cloudstack/pull/11566#issuecomment-3249321659 Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14830 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Update ovftool, virt-v2v version check cmds to run with quotes [cloudstack]
Copilot commented on code in PR #11566:
URL: https://github.com/apache/cloudstack/pull/11566#discussion_r2318924059
##
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##
@@ -314,15 +314,15 @@ public class LibvirtComputingResource extends
ServerResourceBase implements Serv
public static final String TUNGSTEN_PATH = "scripts/vm/network/tungsten";
-public static final String INSTANCE_CONVERSION_SUPPORTED_CHECK_CMD =
"virt-v2v --version";
+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\"";
Review Comment:
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.
```suggestion
public static final String UBUNTU_NBDKIT_PKG_CHECK_CMD = "dpkg -l
nbdkit";
```
##
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##
@@ -314,15 +314,15 @@ public class LibvirtComputingResource extends
ServerResourceBase implements Serv
public static final String TUNGSTEN_PATH = "scripts/vm/network/tungsten";
-public static final String INSTANCE_CONVERSION_SUPPORTED_CHECK_CMD =
"virt-v2v --version";
+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\"";
Review Comment:
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.
##
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##
@@ -314,15 +314,15 @@ public class LibvirtComputingResource extends
ServerResourceBase implements Serv
public static final String TUNGSTEN_PATH = "scripts/vm/network/tungsten";
-public static final String INSTANCE_CONVERSION_SUPPORTED_CHECK_CMD =
"virt-v2v --version";
+public static final String INSTANCE_CONVERSION_SUPPORTED_CHECK_CMD =
"\"virt-v2v --version\"";
Re: [PR] Update ovftool, virt-v2v version check cmds to run with quotes [cloudstack]
codecov[bot] commented on PR #11566: URL: https://github.com/apache/cloudstack/pull/11566#issuecomment-3249022979 ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/11566?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report :white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 4.00%. Comparing base ([`f24b175`](https://app.codecov.io/gh/apache/cloudstack/commit/f24b1757a0b920d88470033bdf4bd658717a8d20?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c7561ec`](https://app.codecov.io/gh/apache/cloudstack/commit/c7561ecc6183fa61aad792bb941090bb8f4e92b0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)). > :exclamation: There is a different number of reports uploaded between BASE (f24b175) and HEAD (c7561ec). Click for more details. > > HEAD has 1 upload less than BASE > >| Flag | BASE (f24b175) | HEAD (c7561ec) | >|--|--|--| >|unittests|1|0| > Additional details and impacted files ```diff @@ Coverage Diff @@ ## 4.20 #11566 +/- ## = - Coverage 16.17%4.00% -12.17% = Files 5656 402 -5254 Lines49801532635 -465380 Branches 60406 5798-54608 = - Hits 80538 1308-79230 + Misses 40851431177 -377337 + Partials 8963 150 -8813 ``` | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/11566/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/11566/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.00% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/11566/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more. [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/11566?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache). :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache). :rocket: New features to boost your workflow: - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems. - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Update ovftool, virt-v2v version check cmds to run with quotes [cloudstack]
blueorangutan commented on PR #11566: URL: https://github.com/apache/cloudstack/pull/11566#issuecomment-3249009647 @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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] Update ovftool, virt-v2v version check cmds to run with quotes [cloudstack]
sureshanaparti commented on PR #11566: URL: https://github.com/apache/cloudstack/pull/11566#issuecomment-3249002758 @blueorangutan package -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
[PR] Update ovftool, virt-v2v version check cmds to run with quotes [cloudstack]
sureshanaparti opened a new pull request, #11566:
URL: https://github.com/apache/cloudstack/pull/11566
### 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)
- [x] 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
- [x] 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?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
