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/master to 329c6eb
Date Thu, 27 Jun 2013 21:54:35 GMT
Updated Branches:
  refs/heads/master 3160a0c2d -> 329c6eb4d


Adding tracelogging to CitrixResourceBase xapi task handling.

Currently it is very hard to see which tasks are pending in cloudstack
that need to be executed by xapi. Ideally we would like to have a
central overview of all tasks centrally. But for now being able to
enable tracelogging should give some insight in what is going on.


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

Branch: refs/heads/master
Commit: 329c6eb4d3566cdefd6bf624acac5607e3399930
Parents: 3160a0c
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Thu Jun 27 10:27:53 2013 -0700
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Thu Jun 27 14:54:31 2013 -0700

----------------------------------------------------------------------
 .../cloud/hypervisor/xen/resource/CitrixResourceBase.java   | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/329c6eb4/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 af640a2..cbbec7c 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
@@ -3721,8 +3721,14 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
 
     protected void waitForTask(Connection c, Task task, long pollInterval, long timeout)
throws XenAPIException, XmlRpcException {
         long beginTime = System.currentTimeMillis();
+        if (s_logger.isTraceEnabled()) {
+            s_logger.trace("Task " + task.getNameLabel(c) + " (" + task.getType(c) + ") sent
to " + c.getSessionReference() +  " is pending completion with a " + timeout + "ms timeout");
+        }
         while (task.getStatus(c) == Types.TaskStatusType.PENDING) {
             try {
+                if (s_logger.isTraceEnabled()) {
+                    s_logger.trace("Task " + task.getNameLabel(c) + " (" + task.getType(c)
+ ") is pending, sleeping for " + pollInterval + "ms");
+                }
                 Thread.sleep(pollInterval);
             } catch (InterruptedException e) {
             }
@@ -3737,6 +3743,9 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
 
     protected void checkForSuccess(Connection c, Task task) throws XenAPIException, XmlRpcException
{
         if (task.getStatus(c) == Types.TaskStatusType.SUCCESS) {
+            if (s_logger.isTraceEnabled()) {
+                s_logger.trace("Task " + task.getNameLabel(c) + " (" + task.getType(c) +
") completed");
+            }
             return;
         } else {
             String msg = "Task failed! Task record: " + task.getRecord(c);


Mime
View raw message