cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject git commit: updated refs/heads/bugfix/CID-1249800 to 320544f
Date Wed, 29 Oct 2014 08:39:15 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/bugfix/CID-1249800 [created] 320544fa5


CID-1249800 Fix a coverity bug, but disable the code its used in as it
needs rethinking

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/320544fa
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/320544fa
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/320544fa

Branch: refs/heads/bugfix/CID-1249800
Commit: 320544fa51e534bd72928329beba515e173973a7
Parents: bde0c3c
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Wed Oct 29 09:38:40 2014 +0100
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Wed Oct 29 09:38:40 2014 +0100

----------------------------------------------------------------------
 .../kvm/resource/LibvirtComputingResource.java    | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/320544fa/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index a3bfa14..62c1b53 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -966,7 +966,9 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
         String[] kernelVersions = unameKernelVersion.split("[\\.\\-]");
         _kernelVersion = Integer.parseInt(kernelVersions[0]) * 1000 * 1000 + (long)Integer.parseInt(kernelVersions[1])
* 1000 + Integer.parseInt(kernelVersions[2]);
 
-        getOsVersion();
+        /* Disable this, the code using this is pretty bad and non portable
+         * getOsVersion();
+         */
         return true;
     }
 
@@ -3611,7 +3613,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
     private void getOsVersion() {
         String version = Script.runSimpleBashScript("cat /etc/redhat-release | awk '{print
$7}'");
         if (version != null) {
-            String[] versions = version.split(".");
+            String[] versions = version.split("\\.");
             if (versions.length == 2) {
                 String major = versions[0];
                 String minor = versions[1];
@@ -3705,11 +3707,13 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
         features.addFeatures("apic");
         features.addFeatures("acpi");
         //for rhel 6.5 and above, hyperv enlightment feature is added
-        if (vmTO.getOs().contains("Windows Server 2008") && hostOsVersion != null
&& ((hostOsVersion.first() == 6 && hostOsVersion.second() >= 5) || (hostOsVersion.first()
>= 7))) {
-            LibvirtVMDef.HyperVEnlightenmentFeatureDef hyv = new LibvirtVMDef.HyperVEnlightenmentFeatureDef();
-            hyv.setRelaxed(true);
-            features.addHyperVFeature(hyv);
-        }
+        /*
+         * if (vmTO.getOs().contains("Windows Server 2008") && hostOsVersion != null
&& ((hostOsVersion.first() == 6 && hostOsVersion.second() >= 5) || (hostOsVersion.first()
>= 7))) {
+         *    LibvirtVMDef.HyperVEnlightenmentFeatureDef hyv = new LibvirtVMDef.HyperVEnlightenmentFeatureDef();
+         *    hyv.setRelaxed(true);
+         *    features.addHyperVFeature(hyv);
+         * }
+         */
         vm.addComp(features);
 
         TermPolicy term = new TermPolicy();


Mime
View raw message