cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [2/7] git commit: updated refs/heads/master to 7949d29
Date Mon, 13 Apr 2015 10:19:55 GMT
server: fix system account create logs

Don't output scary message, avoid logging network_group table not found and
log sane messages if system/admin account/user already exist.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 5599dee90d0ae84d80089b44696a891ae48ecec0)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/master
Commit: 74e0a5f9eca9b896c654a3f9fbdadcf5ae80e9c2
Parents: 37820e1
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Mon Apr 13 15:30:43 2015 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Apr 13 15:47:36 2015 +0530

----------------------------------------------------------------------
 server/src/com/cloud/server/ConfigurationServerImpl.java | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/74e0a5f9/server/src/com/cloud/server/ConfigurationServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java
index e839fc7..157ea03 100644
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -473,7 +473,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
                     PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
                     stmt.executeUpdate();
                 } catch (SQLException ex) {
-                    s_logger.debug("Caught exception when inserting system account: " + ex.getMessage());
+                    s_logger.debug("Looks like system account already exists");
                 }
                 // insert system user
                 insertSql = "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id,
firstname, lastname, created, user.default)"
@@ -483,7 +483,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
                     PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
                     stmt.executeUpdate();
                 } catch (SQLException ex) {
-                    s_logger.debug("Caught SQLException when inserting system user: " + ex.getMessage());
+                    s_logger.debug("Looks like system user already exists");
                 }
 
                 // insert admin user, but leave the account disabled until we set a
@@ -500,7 +500,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
                     PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
                     stmt.executeUpdate();
                 } catch (SQLException ex) {
-                    s_logger.debug("Caught SQLException when creating admin account: " +
ex.getMessage());
+                    s_logger.debug("Looks like admin account already exists");
                 }
 
                 // now insert the user
@@ -511,7 +511,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
                     PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
                     stmt.executeUpdate();
                 } catch (SQLException ex) {
-                    s_logger.debug("Caught SQLException when inserting admin user: " + ex.getMessage());
+                    s_logger.debug("Looks like admin user already exists");
                 }
 
                 try {
@@ -522,8 +522,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
                         stmt.executeQuery();
                         tableName = "network_group";
                     } catch (Exception ex) {
-                        // if network_groups table exists, create the default security group
there
-                        s_logger.debug("Caught (SQL?)Exception: no network_group  " + ex.getLocalizedMessage());
+                        // Ignore in case of exception, table must not exist
                     }
 
                     insertSql = "SELECT * FROM " + tableName + " where account_id=2 and name='default'";


Mime
View raw message