Loading src/main/java/org/etsi/osl/controllers/sylva/SylvaMDResourceOperator.java +11 −6 Original line number Diff line number Diff line Loading @@ -531,7 +531,13 @@ public class SylvaMDResourceOperator { } String command = "./apply-workload-cluster.sh " + deploymentFolderPath; int exitCode = execCLICommand(command).getExitCode(); ExecResult result = execCLICommand(command); int exitCode = result.getExitCode(); //resource Kustomization/cr1ae2c130/sylva-units-status is ready! if (exitCode == 0) { Loading @@ -540,12 +546,11 @@ public class SylvaMDResourceOperator { resourceClone = updateResourceStatus(resource, SylvaMDResourceState.ACTIVE, "executing apply-workload-cluster.sh success ", client); } else { log.error("Shell script execution failed in {} for {}. Exit code: {}", WORKINGDIR_PATH, deploymentFolderPath, exitCode); log.error("Shell script execution failed in {} for {}. Exit code: {}, Last line: {}", WORKINGDIR_PATH, deploymentFolderPath, exitCode, result.getLastLine()); resourceClone = updateResourceStatus(resource, SylvaMDResourceState.FAILED, "executing apply-workload-cluster.sh failed", client); } return resource; Loading Loading @@ -624,6 +629,7 @@ public class SylvaMDResourceOperator { } } catch (IOException e) { e.printStackTrace(); log.info("==e> {}", e.getLocalizedMessage() ); } }); Loading @@ -647,7 +653,6 @@ public class SylvaMDResourceOperator { errorThread.join(); if (exitCode == 0) { log.info("execCLICommand executed successfully in {}: {}", WORKINGDIR_PATH, command); } else { Loading src/main/resources/application.yml 0 → 100644 +9 −0 Original line number Diff line number Diff line spring: application: name: sylva-osl-operator main: web-application-type: none server: port: 0 No newline at end of file Loading
src/main/java/org/etsi/osl/controllers/sylva/SylvaMDResourceOperator.java +11 −6 Original line number Diff line number Diff line Loading @@ -531,7 +531,13 @@ public class SylvaMDResourceOperator { } String command = "./apply-workload-cluster.sh " + deploymentFolderPath; int exitCode = execCLICommand(command).getExitCode(); ExecResult result = execCLICommand(command); int exitCode = result.getExitCode(); //resource Kustomization/cr1ae2c130/sylva-units-status is ready! if (exitCode == 0) { Loading @@ -540,12 +546,11 @@ public class SylvaMDResourceOperator { resourceClone = updateResourceStatus(resource, SylvaMDResourceState.ACTIVE, "executing apply-workload-cluster.sh success ", client); } else { log.error("Shell script execution failed in {} for {}. Exit code: {}", WORKINGDIR_PATH, deploymentFolderPath, exitCode); log.error("Shell script execution failed in {} for {}. Exit code: {}, Last line: {}", WORKINGDIR_PATH, deploymentFolderPath, exitCode, result.getLastLine()); resourceClone = updateResourceStatus(resource, SylvaMDResourceState.FAILED, "executing apply-workload-cluster.sh failed", client); } return resource; Loading Loading @@ -624,6 +629,7 @@ public class SylvaMDResourceOperator { } } catch (IOException e) { e.printStackTrace(); log.info("==e> {}", e.getLocalizedMessage() ); } }); Loading @@ -647,7 +653,6 @@ public class SylvaMDResourceOperator { errorThread.join(); if (exitCode == 0) { log.info("execCLICommand executed successfully in {}: {}", WORKINGDIR_PATH, command); } else { Loading
src/main/resources/application.yml 0 → 100644 +9 −0 Original line number Diff line number Diff line spring: application: name: sylva-osl-operator main: web-application-type: none server: port: 0 No newline at end of file