You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ko...@apache.org on 2014/01/23 12:35:02 UTC
git commit: updated refs/heads/4.3-forward to d31fa09
Updated Branches:
refs/heads/4.3-forward 8ef47e8ff -> d31fa09c7
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 <Sa...@citrix.com>
Signed-off-by: Koushik Das <ko...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d31fa09c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d31fa09c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d31fa09c
Branch: refs/heads/4.3-forward
Commit: d31fa09c7e5bb04fcc4594c0352d9b91171e9d1a
Parents: 8ef47e8
Author: Santhosh Edukulla <Sa...@citrix.com>
Authored: Thu Jan 23 17:24:43 2014 +0530
Committer: Koushik Das <ko...@apache.org>
Committed: Thu Jan 23 16:53:15 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/d31fa09c/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 4071aeb..447482b 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
@@ -306,8 +309,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;
}
@@ -363,10 +368,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/d31fa09c/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');