cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject git commit: updated refs/heads/master to f999a01
Date Thu, 23 Jan 2014 11:52:20 GMT
Updated Branches:
  refs/heads/master 538092b73 -> f999a0183


Added Fix for CLOUDSTACK-5875

Added fix for exception and listing. Mentioned details under bug.
Post the fix, simulator works fine.

Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Signed-off-by: Koushik Das <koushik@apache.org>


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

Branch: refs/heads/master
Commit: f999a01837e60f0c51ef0eb4ad19c29e43ca3037
Parents: 538092b
Author: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Authored: Thu Jan 23 17:24:43 2014 +0530
Committer: Koushik Das <koushik@apache.org>
Committed: Thu Jan 23 17:11:33 2014 +0530

----------------------------------------------------------------------
 .../src/com/cloud/agent/manager/MockAgentManagerImpl.java    | 7 +++++++
 setup/db/templates.simulator.sql                             | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f999a018/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java
b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java
index 85f7e85..0eeef82 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java
@@ -32,6 +32,8 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
+import com.cloud.user.AccountManager;
+import org.apache.cloudstack.context.CallContext;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
@@ -87,6 +89,7 @@ public class MockAgentManagerImpl extends ManagerBase implements MockAgentManage
     MockStorageManager _storageMgr = null;
     @Inject
     ResourceManager _resourceMgr;
+    @Inject private AccountManager _accountMgr;
 
     SimulatorSecondaryDiscoverer discoverer;
     @Inject
@@ -303,8 +306,10 @@ public class MockAgentManagerImpl extends ManagerBase implements MockAgentManage
         @Override
         @DB
         public void run() {
+            CallContext.register(_accountMgr.getSystemUser(), _accountMgr.getSystemAccount());
             if (this.mode.equalsIgnoreCase("Stop")) {
                 handleSystemVMStop();
+                CallContext.unregister();
                 return;
             }
 
@@ -359,10 +364,12 @@ public class MockAgentManagerImpl extends ManagerBase implements MockAgentManage
                         _resourceMgr.discoverHosts(cmd);
                     } catch (DiscoveryException e) {
                         s_logger.debug("Failed to discover host: " + e.toString());
+                        CallContext.unregister();
                         return;
                     }
                 } catch (ConfigurationException e) {
                     s_logger.debug("Failed to load secondary storage resource: " + e.toString());
+                    CallContext.unregister();
                     return;
                 }
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f999a018/setup/db/templates.simulator.sql
----------------------------------------------------------------------
diff --git a/setup/db/templates.simulator.sql b/setup/db/templates.simulator.sql
index 5f9b67d..25e91bd 100755
--- a/setup/db/templates.simulator.sql
+++ b/setup/db/templates.simulator.sql
@@ -16,7 +16,7 @@
 -- under the License.
 
 
-INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm,
bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured,
cross_zones, hypervisor_type)
-    VALUES (100, UUID(), 'simulator-domR', 'SystemVM Template (simulator)', 0, now(), 'SYSTEM',
0, 64, 1, 'http://nfs1.lab.vmops.com/templates/routing/debian/latest/systemvm.vhd.bz2', '',
0, 'SystemVM Template (simulator)', 'VHD', 15, 0, 1, 'Simulator');
-INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm,
bits, account_id, url, checksum, enable_password, display_text,  format, guest_os_id, featured,
cross_zones, hypervisor_type)
-    VALUES (111, UUID(), 'simulator-Centos', 'CentOS 5.3(64-bit) no GUI (Simulator)', 1,
now(), 'BUILTIN', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2',
'', 0, 'CentOS 5.3(64-bit) no GUI (Simulator)', 'VHD', 11, 1, 1, 'Simulator');
+INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm,
bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured,
cross_zones, hypervisor_type, state)
+    VALUES (100, UUID(), 'simulator-domR', 'SystemVM Template (simulator)', 0, now(), 'SYSTEM',
0, 64, 1, 'http://nfs1.lab.vmops.com/templates/routing/debian/latest/systemvm.vhd.bz2', '',
0, 'SystemVM Template (simulator)', 'VHD', 15, 0, 1, 'Simulator','Active');
+INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm,
bits, account_id, url, checksum, enable_password, display_text,  format, guest_os_id, featured,
cross_zones, hypervisor_type,state)
+    VALUES (111, UUID(), 'simulator-Centos', 'CentOS 5.3(64-bit) no GUI (Simulator)', 1,
now(), 'BUILTIN', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2',
'', 0, 'CentOS 5.3(64-bit) no GUI (Simulator)', 'VHD', 11, 1, 1, 'Simulator','Active');


Mime
View raw message