You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by nv...@apache.org on 2021/09/20 16:00:23 UTC
[cloudstack] branch main updated: change logging during upgrade
(#5474)
This is an automated email from the ASF dual-hosted git repository.
nvazquez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 22a0c0a change logging during upgrade (#5474)
22a0c0a is described below
commit 22a0c0a46cd09e70e3aefd99272765e57e9d2168
Author: dahn <da...@shapeblue.com>
AuthorDate: Mon Sep 20 18:00:06 2021 +0200
change logging during upgrade (#5474)
* reduce ERROR logging on ignored exception
* string concat formatting
Co-authored-by: sureshanaparti <12...@users.noreply.github.com>
Co-authored-by: Daan Hoogland <da...@onecht.net>
Co-authored-by: sureshanaparti <12...@users.noreply.github.com>
---
.../java/com/cloud/upgrade/dao/Upgrade410to420.java | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade410to420.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade410to420.java
index 9551a50..430ebdb 100644
--- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade410to420.java
+++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade410to420.java
@@ -2388,19 +2388,32 @@ public class Upgrade410to420 implements DbUpgrade {
conn.prepareStatement("ALTER TABLE `cloud`.`volumes` CHANGE COLUMN `iso_id1` `iso_id` bigint(20) unsigned COMMENT 'The id of the iso from which the volume was created'");) {
alter_iso_pstmt.executeUpdate();
}catch (SQLException e) {
- s_logger.error("migrateDatafromIsoIdInVolumesTable:Exception:"+e.getMessage(),e);
+ s_logger.info("migrateDatafromIsoIdInVolumesTable: ignoring Exception: " + e.getMessage());
+ if (s_logger.isTraceEnabled()) {
+ s_logger.trace("migrateDatafromIsoIdInVolumesTable: ignored Exception",e);
+ }
//implies iso_id1 is not present, so do nothing.
}
}catch (SQLException e) {
- s_logger.error("migrateDatafromIsoIdInVolumesTable:Exception:"+e.getMessage(),e);
+ s_logger.info("migrateDatafromIsoIdInVolumesTable: ignoring Exception: " + e.getMessage());
+ if (s_logger.isTraceEnabled()) {
+ s_logger.trace("migrateDatafromIsoIdInVolumesTable: ignored Exception",e);
+ }
//implies iso_id1 is not present, so do nothing.
}
}
}catch (SQLException e) {
- s_logger.error("migrateDatafromIsoIdInVolumesTable:Exception:"+e.getMessage(),e);
+ s_logger.info("migrateDatafromIsoIdInVolumesTable: ignoring Exception: " + e.getMessage());
+ if (s_logger.isTraceEnabled()) {
+ s_logger.trace("migrateDatafromIsoIdInVolumesTable: ignored Exception",e);
+ }
//implies iso_id1 is not present, so do nothing.
}
} catch (SQLException e) {
+ s_logger.info("migrateDatafromIsoIdInVolumesTable: ignoring Exception: " + e.getMessage());
+ if (s_logger.isTraceEnabled()) {
+ s_logger.trace("migrateDatafromIsoIdInVolumesTable: ignored Exception",e);
+ }
//implies iso_id1 is not present, so do nothing.
}
}