aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2025-02-19 15:31:04 +0100
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2025-02-19 15:36:01 +0100
commitb30708d49f7e823a1b3bb04297975aea1be3e512 (patch)
tree34f53d2635ae4f0e972757187b4f423e70384246
parent9d29c261a394ee6d61b3ed1ea6d2e7288a20cee9 (diff)
Ensure that graphadmin schema-create-job exits with a non-zero exit code in case of failure1.15.6
- currently, when the GenTester program fails, it is not terminating with a non-zero exit code - the consequence of this is that the initContainer/job that executes this is stuck and waits forever - this changes the code in case of failure, which in turn should cause a retry for the container - also bump version to 1.15.6-SNAPSHOT Issue-ID: AAI-4136 Change-Id: Ic8a26df66f2ae1a55a1547b562cc6f042f5a513b Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
-rwxr-xr-xpom.xml2
-rw-r--r--src/main/java/org/onap/aai/schema/GenTester.java15
-rw-r--r--version.properties2
3 files changed, 14 insertions, 5 deletions
diff --git a/pom.xml b/pom.xml
index eed4e41..88680cf 100755
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
</parent>
<groupId>org.onap.aai.graphadmin</groupId>
<artifactId>aai-graphadmin</artifactId>
- <version>1.15.5-SNAPSHOT</version>
+ <version>1.15.6-SNAPSHOT</version>
<properties>
diff --git a/src/main/java/org/onap/aai/schema/GenTester.java b/src/main/java/org/onap/aai/schema/GenTester.java
index 55212d8..6443d43 100644
--- a/src/main/java/org/onap/aai/schema/GenTester.java
+++ b/src/main/java/org/onap/aai/schema/GenTester.java
@@ -54,6 +54,18 @@ public class GenTester {
*/
public static void main(String[] args) throws AAIException {
+ try {
+ createSchema(args);
+ } catch (Exception e) {
+ LOGGER.error("Failed to run schema creation", e);
+ System.exit(1);
+ }
+
+ LOGGER.debug("All done, if the program does not exit, please kill it manually.");
+ System.exit(0);
+ }
+
+ private static void createSchema(String[] args) throws AAIException {
JanusGraph graph = null;
System.setProperty("aai.service.name", GenTester.class.getSimpleName());
@@ -180,9 +192,6 @@ public class GenTester {
ErrorLogHelper.logError("AAI_4000", ex.getMessage());
System.exit(1);
}
-
- LOGGER.debug("-- all done, if program does not exit, please kill.");
- System.exit(0);
}
private static void setSchemaInitializedToFalse(JanusGraph graph, Optional<Vertex> schemaInitializedVertex) {
diff --git a/version.properties b/version.properties
index 73ddb41..4cc770c 100644
--- a/version.properties
+++ b/version.properties
@@ -5,7 +5,7 @@
major_version=1
minor_version=15
-patch_version=5
+patch_version=6
base_version=${major_version}.${minor_version}.${patch_version}