cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject git commit: updated refs/heads/4.2 to d7c49e4
Date Tue, 20 Aug 2013 22:12:06 GMT
Updated Branches:
  refs/heads/4.2 e3d3a8cb7 -> d7c49e485


CLOUDSTACK-4376: fix cloud-early-config to workaround vSwitch stall in VPC mode. fix potential
NPE in DirectAgentAttache in processing answers from resource


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

Branch: refs/heads/4.2
Commit: d7c49e485a02d9b03de4bca10cc150fdc34d0407
Parents: e3d3a8c
Author: Kelven Yang <kelveny@gmail.com>
Authored: Tue Aug 20 14:51:50 2013 -0700
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Tue Aug 20 14:58:52 2013 -0700

----------------------------------------------------------------------
 .../systemvm/debian/config/etc/init.d/cloud-early-config  | 10 ++++++----
 .../src/com/cloud/agent/manager/DirectAgentAttache.java   |  4 ++++
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d7c49e48/patches/systemvm/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
index 0a76b7f..fb4e343 100755
--- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config
+++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
@@ -196,6 +196,7 @@ patch() {
 
 patch_log4j() {
 log_it "Updating log4j-cloud.xml"
+mkdir -p /usr/local/cloud/systemvm/conf
 cat << "EOF" > /usr/local/cloud/systemvm/conf/temp.xml
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
@@ -933,10 +934,6 @@ setup_router() {
 setup_vpcrouter() {
   log_it "Setting up VPC virtual router system vm"
 
-  if [ "$hyp" == "vmware" ]; then
-    setup_vmware_extra_nics
-  fi
-
   if [ -f /etc/hosts ]; then
     grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts;
   fi
@@ -981,6 +978,11 @@ EOF
      if [ "$hyp" == "vmware" ]
      then
          ip route add $MGMTNET via $LOCAL_GW dev eth0
+         
+          # a hacking way to activate vSwitch under VMware
+         ping -n -c 3 $LOCAL_GW &
+         sleep 3
+         pkill ping
      fi
   fi
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d7c49e48/server/src/com/cloud/agent/manager/DirectAgentAttache.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/agent/manager/DirectAgentAttache.java b/server/src/com/cloud/agent/manager/DirectAgentAttache.java
index 9b7d69f..735c9bc 100755
--- a/server/src/com/cloud/agent/manager/DirectAgentAttache.java
+++ b/server/src/com/cloud/agent/manager/DirectAgentAttache.java
@@ -184,6 +184,10 @@ public class DirectAgentAttache extends AgentAttache {
                     try {
                         if (resource != null) {
                             answer = resource.executeRequest(cmds[i]);
+                            if(answer == null) {
+                            	s_logger.warn("Resource returned null answer!");
+                                answer = new Answer(cmds[i], false, "Resource returned null
answer");
+                            }
                         } else {
                             answer = new Answer(cmds[i], false, "Agent is disconnected");
                         }


Mime
View raw message