You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by an...@apache.org on 2013/11/14 04:03:36 UTC
[1/5] git commit: updated refs/heads/4.2 to 4918e21
Updated Branches:
refs/heads/4.2 fcb806a6a -> 4918e2145
Revert "Accidentally checked in the wrong file"
This reverts commit 1c3b9b53fe0c1455b783e1cdd21768a0a9b734cb.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a9f473ee
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a9f473ee
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a9f473ee
Branch: refs/heads/4.2
Commit: a9f473ee5d3a8b89168911c84903171bea5a0285
Parents: fcb806a
Author: Anthony Xu <an...@citrix.com>
Authored: Wed Nov 13 18:59:43 2013 -0800
Committer: Anthony Xu <an...@citrix.com>
Committed: Wed Nov 13 18:59:43 2013 -0800
----------------------------------------------------------------------
.../hypervisor/xenserver/xenserver60/NFSSR.py | 64 +++++++++-----------
1 file changed, 29 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a9f473ee/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py b/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py
index 0d6badb..d0c98a1 100755
--- a/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py
+++ b/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py
@@ -1,21 +1,16 @@
#!/usr/bin/python
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
+# Copyright (C) 2006-2007 XenSource Ltd.
+# Copyright (C) 2008-2009 Citrix Ltd.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; version 2.1 only.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
# FileSR: local-file storage repository
import SR, VDI, SRCommand, FileSR, util
@@ -42,8 +37,8 @@ CONFIGURATION = [ [ 'server', 'hostname or IP address of NFS server (required)'
DRIVER_INFO = {
'name': 'NFS VHD',
'description': 'SR plugin which stores disks as VHD files on a remote NFS filesystem',
- 'vendor': 'The Apache Software Foundation',
- 'copyright': 'Copyright (c) 2012 The Apache Software Foundation',
+ 'vendor': 'Citrix Systems Inc',
+ 'copyright': '(C) 2008 Citrix Systems Inc',
'driver_version': '1.0',
'required_api_version': '1.0',
'capabilities': CAPABILITIES,
@@ -112,8 +107,7 @@ class NFSSR(FileSR.FileSR):
def attach(self, sr_uuid):
self.validate_remotepath(False)
- #self.remotepath = os.path.join(self.dconf['serverpath'], sr_uuid)
- self.remotepath = self.dconf['serverpath']
+ self.remotepath = os.path.join(self.dconf['serverpath'], sr_uuid)
util._testHost(self.dconf['server'], NFSPORT, 'NFSTarget')
self.mount_remotepath(sr_uuid)
@@ -181,20 +175,20 @@ class NFSSR(FileSR.FileSR):
pass
raise exn
- #newpath = os.path.join(self.path, sr_uuid)
- #if util.ioretry(lambda: util.pathexists(newpath)):
- # if len(util.ioretry(lambda: util.listdir(newpath))) != 0:
- # self.detach(sr_uuid)
- # raise xs_errors.XenError('SRExists')
- #else:
- # try:
- # util.ioretry(lambda: util.makedirs(newpath))
- # except util.CommandException, inst:
- # if inst.code != errno.EEXIST:
- # self.detach(sr_uuid)
- # raise xs_errors.XenError('NFSCreate',
- # opterr='remote directory creation error is %d'
- # % inst.code)
+ newpath = os.path.join(self.path, sr_uuid)
+ if util.ioretry(lambda: util.pathexists(newpath)):
+ if len(util.ioretry(lambda: util.listdir(newpath))) != 0:
+ self.detach(sr_uuid)
+ raise xs_errors.XenError('SRExists')
+ else:
+ try:
+ util.ioretry(lambda: util.makedirs(newpath))
+ except util.CommandException, inst:
+ if inst.code != errno.EEXIST:
+ self.detach(sr_uuid)
+ raise xs_errors.XenError('NFSCreate',
+ opterr='remote directory creation error is %d'
+ % inst.code)
self.detach(sr_uuid)
def delete(self, sr_uuid):
[3/5] git commit: updated refs/heads/4.2 to 4918e21
Posted by an...@apache.org.
Revert "Removed the hostvmstats method call from the xs plugin vmops in xcposs"
This reverts commit c0602d661a53d751056e6ebf4d6cc5a61918bf00.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/aee7603a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/aee7603a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/aee7603a
Branch: refs/heads/4.2
Commit: aee7603abbb11c51327d241a0354fdd1a0826f92
Parents: d8e2f6b
Author: Anthony Xu <an...@citrix.com>
Authored: Wed Nov 13 19:00:12 2013 -0800
Committer: Anthony Xu <an...@citrix.com>
Committed: Wed Nov 13 19:00:12 2013 -0800
----------------------------------------------------------------------
scripts/vm/hypervisor/xenserver/xcposs/vmops | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aee7603a/scripts/vm/hypervisor/xenserver/xcposs/vmops
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/xcposs/vmops b/scripts/vm/hypervisor/xenserver/xcposs/vmops
index 2f6441a..c5a9f94 100644
--- a/scripts/vm/hypervisor/xenserver/xcposs/vmops
+++ b/scripts/vm/hypervisor/xenserver/xcposs/vmops
@@ -24,6 +24,7 @@ import os, sys, time
import XenAPIPlugin
sys.path.extend(["/usr/lib/xcp/sm/", "/usr/local/sbin/", "/sbin/"])
import base64
+import hostvmstats
import socket
import stat
import tempfile
@@ -42,6 +43,15 @@ def echo(fn):
return wrapped
@echo
+def gethostvmstats(session, args):
+ collect_host_stats = args['collectHostStats']
+ consolidation_function = args['consolidationFunction']
+ interval = args['interval']
+ start_time = args['startTime']
+ result = hostvmstats.get_stats(session, collect_host_stats, consolidation_function, interval, start_time)
+ return result
+
+@echo
def setup_iscsi(session, args):
uuid=args['uuid']
try:
@@ -1460,7 +1470,7 @@ def getDomRVersion(session, args):
return txt
if __name__ == "__main__":
- XenAPIPlugin.dispatch({"pingtest": pingtest, "setup_iscsi":setup_iscsi,
+ XenAPIPlugin.dispatch({"pingtest": pingtest, "setup_iscsi":setup_iscsi, "gethostvmstats": gethostvmstats,
"getgateway": getgateway, "preparemigration": preparemigration,
"setIptables": setIptables, "pingdomr": pingdomr, "pingxenserver": pingxenserver,
"ipassoc": ipassoc, "savePassword": savePassword,
[5/5] git commit: updated refs/heads/4.2 to 4918e21
Posted by an...@apache.org.
Revert "Changed host stats to be collected through the http connection"
This reverts commit 5e44df6de55fdee6302bc567339cb1e5bbdd5254.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4918e214
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4918e214
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4918e214
Branch: refs/heads/4.2
Commit: 4918e2145259cc3a1dad18d7476409090d4243d0
Parents: 14ee68c
Author: Anthony Xu <an...@citrix.com>
Authored: Wed Nov 13 19:00:15 2013 -0800
Committer: Anthony Xu <an...@citrix.com>
Committed: Wed Nov 13 19:00:15 2013 -0800
----------------------------------------------------------------------
.../xen/resource/CitrixResourceBase.java | 249 +++++++++----------
.../hypervisor/xenserver/xenserver60/NFSSR.py | 64 ++---
2 files changed, 146 insertions(+), 167 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4918e214/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index 1666c93..5810845 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -11,93 +11,11 @@
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
+// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.hypervisor.xen.resource;
-import static com.cloud.utils.ReflectUtil.flattenProperties;
-import static com.google.common.collect.Lists.newArrayList;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.StringReader;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Queue;
-import java.util.Random;
-import java.util.Set;
-import java.util.UUID;
-
-import javax.ejb.Local;
-import javax.naming.ConfigurationException;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.log4j.Logger;
-import org.apache.xmlrpc.XmlRpcException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-
-import com.google.gson.Gson;
-import com.trilead.ssh2.SCPClient;
-import com.xensource.xenapi.Bond;
-import com.xensource.xenapi.Connection;
-import com.xensource.xenapi.Console;
-import com.xensource.xenapi.Host;
-import com.xensource.xenapi.HostCpu;
-import com.xensource.xenapi.HostMetrics;
-import com.xensource.xenapi.Network;
-import com.xensource.xenapi.PBD;
-import com.xensource.xenapi.PIF;
-import com.xensource.xenapi.PIF.Record;
-import com.xensource.xenapi.Pool;
-import com.xensource.xenapi.SR;
-import com.xensource.xenapi.Session;
-import com.xensource.xenapi.Task;
-import com.xensource.xenapi.Types;
-import com.xensource.xenapi.Types.BadAsyncResult;
-import com.xensource.xenapi.Types.BadServerResponse;
-import com.xensource.xenapi.Types.ConsoleProtocol;
-import com.xensource.xenapi.Types.IpConfigurationMode;
-import com.xensource.xenapi.Types.OperationNotAllowed;
-import com.xensource.xenapi.Types.SrFull;
-import com.xensource.xenapi.Types.VbdType;
-import com.xensource.xenapi.Types.VmBadPowerState;
-import com.xensource.xenapi.Types.VmPowerState;
-import com.xensource.xenapi.Types.XenAPIException;
-import com.xensource.xenapi.VBD;
-import com.xensource.xenapi.VBDMetrics;
-import com.xensource.xenapi.VDI;
-import com.xensource.xenapi.VIF;
-import com.xensource.xenapi.VLAN;
-import com.xensource.xenapi.VM;
-import com.xensource.xenapi.VMGuestMetrics;
-import com.xensource.xenapi.XenAPIObject;
-
-import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
-import org.apache.cloudstack.storage.to.TemplateObjectTO;
-import org.apache.cloudstack.storage.to.VolumeObjectTO;
-
import com.cloud.agent.IAgentControl;
import com.cloud.agent.api.Answer;
import com.cloud.agent.api.AttachIsoCommand;
@@ -256,6 +174,7 @@ import com.cloud.agent.api.to.VolumeTO;
import com.cloud.exception.InternalErrorException;
import com.cloud.host.Host.Type;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
+import com.cloud.hypervisor.xen.resource.CitrixHelper;
import com.cloud.network.HAProxyConfigurator;
import com.cloud.network.LoadBalancerConfigurator;
import com.cloud.network.Networks;
@@ -289,15 +208,92 @@ import com.cloud.storage.template.TemplateProp;
import com.cloud.template.VirtualMachineTemplate.BootloaderType;
import com.cloud.utils.NumbersUtil;
import com.cloud.utils.Pair;
+import com.cloud.utils.Ternary;
import com.cloud.utils.S3Utils;
import com.cloud.utils.StringUtils;
-import com.cloud.utils.Ternary;
import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.net.NetUtils;
import com.cloud.vm.DiskProfile;
import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachine.State;
import com.cloud.vm.snapshot.VMSnapshot;
+import com.google.gson.Gson;
+import com.trilead.ssh2.SCPClient;
+import com.xensource.xenapi.Bond;
+import com.xensource.xenapi.Connection;
+import com.xensource.xenapi.Console;
+import com.xensource.xenapi.Host;
+import com.xensource.xenapi.HostCpu;
+import com.xensource.xenapi.HostMetrics;
+import com.xensource.xenapi.Network;
+import com.xensource.xenapi.PBD;
+import com.xensource.xenapi.PIF;
+import com.xensource.xenapi.PIF.Record;
+import com.xensource.xenapi.Pool;
+import com.xensource.xenapi.SR;
+import com.xensource.xenapi.Session;
+import com.xensource.xenapi.Task;
+import com.xensource.xenapi.Types;
+import com.xensource.xenapi.Types.BadAsyncResult;
+import com.xensource.xenapi.Types.BadServerResponse;
+import com.xensource.xenapi.Types.ConsoleProtocol;
+import com.xensource.xenapi.Types.IpConfigurationMode;
+import com.xensource.xenapi.Types.OperationNotAllowed;
+import com.xensource.xenapi.Types.SrFull;
+import com.xensource.xenapi.Types.VbdType;
+import com.xensource.xenapi.Types.VmBadPowerState;
+import com.xensource.xenapi.Types.VmPowerState;
+import com.xensource.xenapi.Types.XenAPIException;
+import com.xensource.xenapi.VBD;
+import com.xensource.xenapi.VBDMetrics;
+import com.xensource.xenapi.VDI;
+import com.xensource.xenapi.VIF;
+import com.xensource.xenapi.VLAN;
+import com.xensource.xenapi.VM;
+import com.xensource.xenapi.VMGuestMetrics;
+import com.xensource.xenapi.XenAPIObject;
+import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
+import org.apache.cloudstack.storage.to.TemplateObjectTO;
+import org.apache.cloudstack.storage.to.VolumeObjectTO;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.log4j.Logger;
+import org.apache.xmlrpc.XmlRpcException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+import javax.ejb.Local;
+import javax.naming.ConfigurationException;
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Queue;
+import java.util.Random;
+import java.util.Set;
+import java.util.UUID;
+
+import static com.cloud.utils.ReflectUtil.flattenProperties;
+import static com.google.common.collect.Lists.newArrayList;
/**
* CitrixResourceBase encapsulates the calls to the XenServer Xapi process
@@ -803,7 +799,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
s_logger.error("revert vm " + vmName
+ " to snapshot " + cmd.getTarget().getSnapshotName() + " failed due to " + e.getMessage());
return new RevertToVMSnapshotAnswer(cmd, false, e.getMessage());
- }
+ }
}
private String revertToSnapshot(Connection conn, VM vmSnapshot,
@@ -956,10 +952,10 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
nw = Network.create(conn, rec);
// Plug dom0 vif only when creating network
enableXenServerNetwork(conn, nw, nwName, "tunnel network for account " + key);
- s_logger.debug("### Xen Server network for tunnels created:" + nwName);
+ s_logger.debug("### Xen Server network for tunnels created:" + nwName);
} else {
nw = networks.iterator().next();
- s_logger.debug("Xen Server network for tunnels found:" + nwName);
+ s_logger.debug("Xen Server network for tunnels found:" + nwName);
}
return nw;
} catch (Exception e) {
@@ -1088,10 +1084,10 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
vifr.device = Integer.toString(nic.getDeviceId());
vifr.MAC = nic.getMac();
- // Nicira needs these IDs to find the NIC
+ // Nicira needs these IDs to find the NIC
vifr.otherConfig = new HashMap<String, String>();
vifr.otherConfig.put("nicira-iface-id", nic.getUuid());
- vifr.otherConfig.put("nicira-vm-id", vm.getUuid(conn));
+ vifr.otherConfig.put("nicira-vm-id", vm.getUuid(conn));
vifr.network = getNetwork(conn, nic);
@@ -1315,7 +1311,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
Map<String, String> platform = vmr.platform;
platform.put("cores-per-socket", coresPerSocket);
vmr.platform = platform;
- }
+ }
}
vmr.VCPUsAtStartup = (long) vmSpec.getCpus();
@@ -1458,7 +1454,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
if (network.getNameLabel(conn).startsWith("VLAN")) {
disableVlanNetwork(conn, network);
}
- }
+ }
} catch (Exception e) {
s_logger.warn("VM getRecord failed due to ", e);
}
@@ -1767,7 +1763,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
return new StartAnswer(cmd, msg);
} finally {
synchronized (_cluster.intern()) {
- if (state != State.Stopped) {
+ if (state != State.Stopped) {
s_vms.put(_cluster, _name, vmName, state);
s_logger.debug("2. The VM " + vmName + " is in " + state + " state.");
} else {
@@ -2439,7 +2435,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
s_logger.debug("VIF to deassociate IP with does not exist, return success");
return;
}
- }
+ }
String args = "vpc_ipassoc.sh " + routerIp;
String snatArgs = "vpc_privateGateway.sh " + routerIp;
@@ -2910,33 +2906,10 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
protected String getHostStatsRawXML(Connection conn) {
Date currentDate = new Date();
- String urlStr = "http://" + _host.ip + "/rrd_updates?";
- urlStr += "session_id=" + conn.getSessionReference();
- urlStr += "&host=" + "true";
- urlStr += "&cf=" + _consolidationFunction;
- urlStr += "&interval=" + _pollingIntervalInSeconds;
- urlStr += "&start=" + (currentDate.getTime() / 1000 - 1000 - 100);
-
- URL url;
- try {
- url = new URL(urlStr);
- url.openConnection();
- URLConnection uc = url.openConnection();
- BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
- StringBuilder buff = new StringBuilder();
- String inputLine;
- while ((inputLine = in.readLine()) != null) {
- buff.append(inputLine);
- }
- in.close();
- return buff.toString();
- } catch (MalformedURLException e) {
- s_logger.warn("Malformed URL? come on...." + urlStr);
- return null;
- } catch (IOException e) {
- s_logger.warn("Problems getting stats using " + urlStr, e);
- return null;
- }
+ String startTime = String.valueOf(currentDate.getTime() / 1000 - 1000);
+
+ return callHostPlugin(conn, "vmops", "gethostvmstats", "collectHostStats", String.valueOf("true"), "consolidationFunction", _consolidationFunction, "interval", String
+ .valueOf(_pollingIntervalInSeconds), "startTime", startTime);
}
protected String getVmStatsRawXML(Connection conn) {
@@ -3799,7 +3772,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
other.put("live", "true");
task = vm.poolMigrateAsync(conn, destHost, other);
try {
- // poll every 1 seconds
+ // poll every 1 seconds
long timeout = (_migratewait) * 1000L;
waitForTask(conn, task, 1000, timeout);
checkForSuccess(conn, task);
@@ -4812,7 +4785,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
XsLocalNetwork privateNic = getManagementNetwork(conn);
_privateNetworkName = privateNic.getNetworkRecord(conn).nameLabel;
_host.privatePif = privateNic.getPifRecord(conn).uuid;
- _host.privateNetwork = privateNic.getNetworkRecord(conn).uuid;
+ _host.privateNetwork = privateNic.getNetworkRecord(conn).uuid;
_host.systemvmisouuid = null;
XsLocalNetwork guestNic = null;
@@ -5012,7 +4985,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
}
} catch (Throwable e) {
s_logger.warn("Check for master failed, failing the FULL Cluster sync command");
- }
+ }
StartupStorageCommand sscmd = initializeLocalSR(conn);
if (sscmd != null) {
@@ -5315,7 +5288,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
if(!isNetworkSetupByName(info.getPrivateNetworkName())){
msg = "For Physical Network id:"+ info.getPhysicalNetworkId() + ", Private Network is not configured on the backend by name " + info.getPrivateNetworkName();
errorout = true;
- break;
+ break;
}
if(!isNetworkSetupByName(info.getPublicNetworkName())){
msg = "For Physical Network id:"+ info.getPhysicalNetworkId() + ", Public Network is not configured on the backend by name " + info.getPublicNetworkName();
@@ -5358,7 +5331,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
}
}
return true;
- }
+ }
protected List<File> getPatchFiles() {
return null;
@@ -5682,9 +5655,9 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
return new OvsCreateTunnelAnswer(cmd, false, "Cannot create network", bridge);
}
- configureTunnelNetwork(conn, cmd.getNetworkId(), cmd.getFrom(), cmd.getKey());
+ configureTunnelNetwork(conn, cmd.getNetworkId(), cmd.getFrom(), cmd.getKey());
bridge = nw.getBridge(conn);
- String result = callHostPlugin(conn, "ovstunnel", "create_tunnel", "bridge", bridge, "remote_ip", cmd.getRemoteIp(),
+ String result = callHostPlugin(conn, "ovstunnel", "create_tunnel", "bridge", bridge, "remote_ip", cmd.getRemoteIp(),
"key", cmd.getKey().toString(), "from", cmd.getFrom().toString(), "to", cmd.getTo().toString());
String[] res = result.split(":");
if (res.length == 2 && res[0].equalsIgnoreCase("SUCCESS")) {
@@ -5791,7 +5764,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
PIF pif = nw.getPif(conn);
Record pifRec = pif.getRecord(conn);
s_logger.debug("PIF object:" + pifRec.uuid + "(" + pifRec.device + ")");
- return new OvsFetchInterfaceAnswer(cmd, true, "Interface " + pifRec.device + " retrieved successfully",
+ return new OvsFetchInterfaceAnswer(cmd, true, "Interface " + pifRec.device + " retrieved successfully",
pifRec.IP, pifRec.netmask, pifRec.MAC);
} catch (BadServerResponse e) {
s_logger.error("An error occurred while fetching the interface for " +
@@ -5850,7 +5823,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
if (!_canBridgeFirewall) {
s_logger.warn("Host " + _host.ip + " cannot do bridge firewalling");
- return new SecurityGroupRuleAnswer(cmd, false,
+ return new SecurityGroupRuleAnswer(cmd, false,
"Host " + _host.ip + " cannot do bridge firewalling",
SecurityGroupRuleAnswer.FailureReason.CANNOT_BRIDGE_FIREWALL);
}
@@ -5916,7 +5889,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
if( hr.softwareVersion.get("product_version_text_short") != null ) {
details.put("product_version_text_short", hr.softwareVersion.get("product_version_text_short"));
- cmd.setHypervisorVersion(hr.softwareVersion.get("product_version_text_short"));
+ cmd.setHypervisorVersion(hr.softwareVersion.get("product_version_text_short"));
cmd.setHypervisorVersion(_host.product_version);
}
@@ -6769,7 +6742,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
}
- private long getVMSnapshotChainSize(Connection conn, VolumeTO volumeTo, String vmName)
+ private long getVMSnapshotChainSize(Connection conn, VolumeTO volumeTo, String vmName)
throws BadServerResponse, XenAPIException, XmlRpcException {
Set<VDI> allvolumeVDIs = VDI.getByNameLabel(conn, volumeTo.getName());
long size = 0;
@@ -6897,7 +6870,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
checkForSuccess(conn, task);
String result = task.getResult(conn);
- // extract VM snapshot ref from result
+ // extract VM snapshot ref from result
String ref = result.substring("<value>".length(), result.length() - "</value>".length());
vmSnapshot = Types.toVM(ref);
try {
@@ -7459,7 +7432,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
} finally {
deleteSnapshotBackup(conn, dcId, accountId, volumeId, secondaryStorageMountPath, snapshotBackupUuid);
}
- }
+ }
success = true;
} finally {
if( snapshotSr != null) {
@@ -7823,7 +7796,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
}
protected boolean deleteSnapshotsDir(Connection conn, Long dcId, Long accountId, Long volumeId, String secondaryStorageMountPath) {
- return deleteSecondaryStorageFolder(conn, secondaryStorageMountPath, "snapshots" + "/" + accountId.toString() + "/" + volumeId.toString());
+ return deleteSecondaryStorageFolder(conn, secondaryStorageMountPath, "snapshots" + "/" + accountId.toString() + "/" + volumeId.toString());
}
@@ -8133,7 +8106,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
} catch (Throwable e) {
s_logger.warn("Check for master failed, failing the Cluster sync command");
return new Answer(cmd);
- }
+ }
HashMap<String, Ternary<String, State, String>> newStates = deltaClusterSync(conn);
return new ClusterSyncAnswer(cmd.getClusterId(), newStates);
}
@@ -8163,10 +8136,10 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
}
if (s_logger.isTraceEnabled()) {
s_logger.trace("VM " + vm_name + ": powerstate = " + ps + "; vm state=" + state.toString());
- }
+ }
}
} catch (final Throwable e) {
- String msg = "Unable to get vms through host " + _host.uuid + " due to to " + e.toString();
+ String msg = "Unable to get vms through host " + _host.uuid + " due to to " + e.toString();
s_logger.warn(msg, e);
throw new CloudRuntimeException(msg);
}
@@ -8235,7 +8208,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
s_logger.warn("Detecting a new state but couldn't find a old state so adding it to the changes: " + vm);
changes.put(vm, new Ternary<String, State, String>(host_uuid, newState, null));
} else if (oldState.second() == State.Starting) {
- if (newState == State.Running) {
+ if (newState == State.Running) {
s_logger.debug("12. The VM " + vm + " is in " + State.Running + " state");
s_vms.put(_cluster, host_uuid, vm, newState, xstoolsversion);
} else if (newState == State.Stopped) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4918e214/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py b/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py
index d0c98a1..0d6badb 100755
--- a/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py
+++ b/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py
@@ -1,16 +1,21 @@
#!/usr/bin/python
-# Copyright (C) 2006-2007 XenSource Ltd.
-# Copyright (C) 2008-2009 Citrix Ltd.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published
-# by the Free Software Foundation; version 2.1 only.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
# FileSR: local-file storage repository
import SR, VDI, SRCommand, FileSR, util
@@ -37,8 +42,8 @@ CONFIGURATION = [ [ 'server', 'hostname or IP address of NFS server (required)'
DRIVER_INFO = {
'name': 'NFS VHD',
'description': 'SR plugin which stores disks as VHD files on a remote NFS filesystem',
- 'vendor': 'Citrix Systems Inc',
- 'copyright': '(C) 2008 Citrix Systems Inc',
+ 'vendor': 'The Apache Software Foundation',
+ 'copyright': 'Copyright (c) 2012 The Apache Software Foundation',
'driver_version': '1.0',
'required_api_version': '1.0',
'capabilities': CAPABILITIES,
@@ -107,7 +112,8 @@ class NFSSR(FileSR.FileSR):
def attach(self, sr_uuid):
self.validate_remotepath(False)
- self.remotepath = os.path.join(self.dconf['serverpath'], sr_uuid)
+ #self.remotepath = os.path.join(self.dconf['serverpath'], sr_uuid)
+ self.remotepath = self.dconf['serverpath']
util._testHost(self.dconf['server'], NFSPORT, 'NFSTarget')
self.mount_remotepath(sr_uuid)
@@ -175,20 +181,20 @@ class NFSSR(FileSR.FileSR):
pass
raise exn
- newpath = os.path.join(self.path, sr_uuid)
- if util.ioretry(lambda: util.pathexists(newpath)):
- if len(util.ioretry(lambda: util.listdir(newpath))) != 0:
- self.detach(sr_uuid)
- raise xs_errors.XenError('SRExists')
- else:
- try:
- util.ioretry(lambda: util.makedirs(newpath))
- except util.CommandException, inst:
- if inst.code != errno.EEXIST:
- self.detach(sr_uuid)
- raise xs_errors.XenError('NFSCreate',
- opterr='remote directory creation error is %d'
- % inst.code)
+ #newpath = os.path.join(self.path, sr_uuid)
+ #if util.ioretry(lambda: util.pathexists(newpath)):
+ # if len(util.ioretry(lambda: util.listdir(newpath))) != 0:
+ # self.detach(sr_uuid)
+ # raise xs_errors.XenError('SRExists')
+ #else:
+ # try:
+ # util.ioretry(lambda: util.makedirs(newpath))
+ # except util.CommandException, inst:
+ # if inst.code != errno.EEXIST:
+ # self.detach(sr_uuid)
+ # raise xs_errors.XenError('NFSCreate',
+ # opterr='remote directory creation error is %d'
+ # % inst.code)
self.detach(sr_uuid)
def delete(self, sr_uuid):
[4/5] git commit: updated refs/heads/4.2 to 4918e21
Posted by an...@apache.org.
Revert "Changed vm stats to be collected through the xs http connection"
This reverts commit e82e142b14bd8d806c70bca4ffc0a3e220795dd9.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/14ee68cf
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/14ee68cf
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/14ee68cf
Branch: refs/heads/4.2
Commit: 14ee68cfcf8b2122c23a316dbd7c44f9f1331175
Parents: aee7603
Author: Anthony Xu <an...@citrix.com>
Authored: Wed Nov 13 19:00:14 2013 -0800
Committer: Anthony Xu <an...@citrix.com>
Committed: Wed Nov 13 19:00:14 2013 -0800
----------------------------------------------------------------------
.../xen/resource/CitrixResourceBase.java | 72 +++++++++++++-------
1 file changed, 47 insertions(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14ee68cf/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index 85c57c5..1666c93 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -25,6 +25,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.io.StringReader;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
@@ -48,7 +49,6 @@ import java.util.UUID;
import javax.ejb.Local;
import javax.naming.ConfigurationException;
import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.codec.binary.Base64;
import org.apache.log4j.Logger;
@@ -57,7 +57,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
import com.google.gson.Gson;
import com.trilead.ssh2.SCPClient;
@@ -2804,16 +2803,41 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
/*
* Note: 1 => called from host, hence host stats 2 => called from vm, hence vm stats
*/
- Document doc = null;
+ String stats = "";
try {
- doc = getStatsRawXML(conn, flag == 1 ? true : false);
+ if (flag == 1) {
+ stats = getHostStatsRawXML(conn);
+ }
+ if (flag == 2) {
+ stats = getVmStatsRawXML(conn);
+ }
} catch (Exception e1) {
s_logger.warn("Error whilst collecting raw stats from plugin: ", e1);
return null;
}
- if (doc == null) { //stats are null when the host plugin call fails (host down state)
+ // s_logger.debug("The raw xml stream is:"+stats);
+ // s_logger.debug("Length of raw xml is:"+stats.length());
+
+ //stats are null when the host plugin call fails (host down state)
+ if(stats == null) {
+ return null;
+ }
+
+ StringReader statsReader = new StringReader(stats);
+ InputSource statsSource = new InputSource(statsReader);
+
+ Document doc = null;
+ try {
+ doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(statsSource);
+ } catch (Exception e) {
+ s_logger.warn("Exception caught whilst processing the document via document factory:", e);
+ return null;
+ }
+
+ if(doc==null){
+ s_logger.warn("Null document found after tryinh to parse the stats source");
return null;
}
@@ -2884,47 +2908,45 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
}
- protected Document getStatsRawXML(Connection conn, boolean host) {
+ protected String getHostStatsRawXML(Connection conn) {
Date currentDate = new Date();
String urlStr = "http://" + _host.ip + "/rrd_updates?";
urlStr += "session_id=" + conn.getSessionReference();
- urlStr += "&host=" + (host ? "true" : "false");
+ urlStr += "&host=" + "true";
urlStr += "&cf=" + _consolidationFunction;
urlStr += "&interval=" + _pollingIntervalInSeconds;
urlStr += "&start=" + (currentDate.getTime() / 1000 - 1000 - 100);
URL url;
- BufferedReader in = null;
try {
url = new URL(urlStr);
url.openConnection();
URLConnection uc = url.openConnection();
- in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
- InputSource statsSource = new InputSource(in);
- return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(statsSource);
+ BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
+ StringBuilder buff = new StringBuilder();
+ String inputLine;
+ while ((inputLine = in.readLine()) != null) {
+ buff.append(inputLine);
+ }
+ in.close();
+ return buff.toString();
} catch (MalformedURLException e) {
s_logger.warn("Malformed URL? come on...." + urlStr);
return null;
} catch (IOException e) {
s_logger.warn("Problems getting stats using " + urlStr, e);
return null;
- } catch (SAXException e) {
- s_logger.warn("Problems getting stats using " + urlStr, e);
- return null;
- } catch (ParserConfigurationException e) {
- s_logger.warn("Problems getting stats using " + urlStr, e);
- return null;
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- s_logger.warn("Unable to close the buffer ", e);
- }
- }
}
}
+ protected String getVmStatsRawXML(Connection conn) {
+ Date currentDate = new Date();
+ String startTime = String.valueOf(currentDate.getTime() / 1000 - 1000);
+
+ return callHostPlugin(conn, "vmops", "gethostvmstats", "collectHostStats", String.valueOf("false"), "consolidationFunction", _consolidationFunction, "interval", String
+ .valueOf(_pollingIntervalInSeconds), "startTime", startTime);
+ }
+
protected State convertToState(Types.VmPowerState ps) {
final State state = s_statesTable.get(ps);
return state == null ? State.Unknown : state;
[2/5] git commit: updated refs/heads/4.2 to 4918e21
Posted by an...@apache.org.
Revert "Removed the hostvmstats.py file from the scripts and from all of patch files and from vmops"
This reverts commit eb19545dc0f601cd87e68698e8dc71f31080696c.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d8e2f6b6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d8e2f6b6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d8e2f6b6
Branch: refs/heads/4.2
Commit: d8e2f6b6f668bfb5cebb54a26e272e038f702fa2
Parents: a9f473e
Author: Anthony Xu <an...@citrix.com>
Authored: Wed Nov 13 19:00:10 2013 -0800
Committer: Anthony Xu <an...@citrix.com>
Committed: Wed Nov 13 19:00:10 2013 -0800
----------------------------------------------------------------------
scripts/vm/hypervisor/xenserver/hostvmstats.py | 52 ++++++++++++++++++++
scripts/vm/hypervisor/xenserver/vmops | 12 ++++-
.../vm/hypervisor/xenserver/xenserver56/patch | 1 +
.../hypervisor/xenserver/xenserver56fp1/patch | 1 +
.../vm/hypervisor/xenserver/xenserver60/patch | 1 +
5 files changed, 66 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8e2f6b6/scripts/vm/hypervisor/xenserver/hostvmstats.py
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/hostvmstats.py b/scripts/vm/hypervisor/xenserver/hostvmstats.py
new file mode 100644
index 0000000..38609b1
--- /dev/null
+++ b/scripts/vm/hypervisor/xenserver/hostvmstats.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# $Id: hostvmstats.py 10054 2010-06-29 22:09:31Z abhishek $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/scripts/vm/hypervisor/xenserver/hostvmstats.py $
+
+import XenAPI
+import urllib
+import time
+import logging
+logging.basicConfig(filename='/tmp/xapilog',level=logging.DEBUG)
+
+def get_stats(session, collect_host_stats, consolidation_function, interval, start_time):
+ try:
+
+ if collect_host_stats == "true" :
+ url = "http://localhost/rrd_updates?"
+ url += "session_id=" + session._session
+ url += "&host=" + collect_host_stats
+ url += "&cf=" + consolidation_function
+ url += "&interval=" + str(interval)
+ url += "&start=" + str(int(time.time())-100)
+ else :
+ url = "http://localhost/rrd_updates?"
+ url += "session_id=" + session._session
+ url += "&host=" + collect_host_stats
+ url += "&cf=" + consolidation_function
+ url += "&interval=" + str(interval)
+ url += "&start=" + str(int(time.time())-100)
+
+ logging.debug("Calling URL: %s",url)
+ sock = urllib.URLopener().open(url)
+ xml = sock.read()
+ sock.close()
+ logging.debug("Size of returned XML: %s",len(xml))
+ return xml
+ except Exception,e:
+ logging.exception("get_stats() failed")
+ raise
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8e2f6b6/scripts/vm/hypervisor/xenserver/vmops
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/vmops b/scripts/vm/hypervisor/xenserver/vmops
index 48ca422..3f11960 100755
--- a/scripts/vm/hypervisor/xenserver/vmops
+++ b/scripts/vm/hypervisor/xenserver/vmops
@@ -24,6 +24,7 @@ import os, sys, time
import XenAPIPlugin
sys.path.extend(["/opt/xensource/sm/", "/usr/local/sbin/", "/sbin/"])
import base64
+import hostvmstats
import socket
import stat
import tempfile
@@ -54,6 +55,15 @@ def add_to_VCPUs_params_live(session, args):
return 'true'
@echo
+def gethostvmstats(session, args):
+ collect_host_stats = args['collectHostStats']
+ consolidation_function = args['consolidationFunction']
+ interval = args['interval']
+ start_time = args['startTime']
+ result = hostvmstats.get_stats(session, collect_host_stats, consolidation_function, interval, start_time)
+ return result
+
+@echo
def setup_iscsi(session, args):
uuid=args['uuid']
try:
@@ -1619,7 +1629,7 @@ def bumpUpPriority(session, args):
if __name__ == "__main__":
- XenAPIPlugin.dispatch({"pingtest": pingtest, "setup_iscsi":setup_iscsi,
+ XenAPIPlugin.dispatch({"pingtest": pingtest, "setup_iscsi":setup_iscsi, "gethostvmstats": gethostvmstats,
"getgateway": getgateway, "preparemigration": preparemigration,
"setIptables": setIptables, "pingdomr": pingdomr, "pingxenserver": pingxenserver,
"savePassword": savePassword,
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8e2f6b6/scripts/vm/hypervisor/xenserver/xenserver56/patch
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/xenserver56/patch b/scripts/vm/hypervisor/xenserver/xenserver56/patch
index db2de3e..87b3937 100644
--- a/scripts/vm/hypervisor/xenserver/xenserver56/patch
+++ b/scripts/vm/hypervisor/xenserver/xenserver56/patch
@@ -29,6 +29,7 @@
NFSSR.py=/opt/xensource/sm
vmops=..,0755,/etc/xapi.d/plugins
vmopsSnapshot=..,0755,/etc/xapi.d/plugins
+hostvmstats.py=..,0755,/opt/xensource/sm
systemvm.iso=../../../../../vms,0644,/opt/xensource/packages/iso
id_rsa.cloud=../../../systemvm,0600,/root/.ssh
network_info.sh=..,0755,/opt/xensource/bin
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8e2f6b6/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch b/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch
index 3206a34..6dc9b05 100644
--- a/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch
+++ b/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch
@@ -29,6 +29,7 @@
NFSSR.py=/opt/xensource/sm
vmops=..,0755,/etc/xapi.d/plugins
vmopsSnapshot=..,0755,/etc/xapi.d/plugins
+hostvmstats.py=..,0755,/opt/xensource/sm
systemvm.iso=../../../../../vms,0644,/opt/xensource/packages/iso
id_rsa.cloud=../../../systemvm,0600,/root/.ssh
network_info.sh=..,0755,/opt/xensource/bin
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8e2f6b6/scripts/vm/hypervisor/xenserver/xenserver60/patch
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/xenserver60/patch b/scripts/vm/hypervisor/xenserver/xenserver60/patch
index 457bb26..60a0643 100644
--- a/scripts/vm/hypervisor/xenserver/xenserver60/patch
+++ b/scripts/vm/hypervisor/xenserver/xenserver60/patch
@@ -34,6 +34,7 @@ cloudstack_plugins.conf=..,0644,/etc/xensource
cloudstack_pluginlib.py=..,0755,/etc/xapi.d/plugins
ovstunnel=..,0755,/etc/xapi.d/plugins
vmopsSnapshot=..,0755,/etc/xapi.d/plugins
+hostvmstats.py=..,0755,/opt/xensource/sm
systemvm.iso=../../../../../vms,0644,/opt/xensource/packages/iso
id_rsa.cloud=../../../systemvm,0600,/root/.ssh
network_info.sh=..,0755,/opt/xensource/bin