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 2014/07/31 22:45:31 UTC

git commit: updated refs/heads/master to 5fb03ae

Repository: cloudstack
Updated Branches:
  refs/heads/master 96a6e673a -> 5fb03aec9


check if admin user exists


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

Branch: refs/heads/master
Commit: 5fb03aec9b1650deb423033dda966305ae3ec7a0
Parents: 96a6e67
Author: Anthony Xu <an...@citrix.com>
Authored: Thu Jul 31 13:44:33 2014 -0700
Committer: Anthony Xu <an...@citrix.com>
Committed: Thu Jul 31 13:44:58 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/server/ManagementServerImpl.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5fb03aec/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index 2227c99..1413272 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -3835,6 +3835,11 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
         String encodedPassword = null;
 
         UserVO adminUser = _userDao.getUser(2);
+        if (adminUser  == null) {
+            String msg = "CANNOT find admin user";
+            s_logger.error(msg);
+            throw new CloudRuntimeException(msg);
+        }
         if (adminUser.getState() == Account.State.disabled) {
             // This means its a new account, set the password using the
             // authenticator