Compare commits
9 Commits
Author | SHA1 | Date |
---|---|---|
|
74dae88836 | |
|
93457fe823 | |
|
81002fccd1 | |
|
940d0cba9d | |
|
85a92bac67 | |
|
cecc27920c | |
|
40166c4116 | |
|
5bad218e6e | |
|
840bd00275 |
|
@ -2,6 +2,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
|
|
||||||
# Changelog for Smart Executor Service
|
# Changelog for Smart Executor Service
|
||||||
|
|
||||||
|
## [v3.2.1-SNAPSHOT]
|
||||||
|
|
||||||
|
- Fixed bug on concurrent attempt to enter in a session while trying to schedule a second task #27319
|
||||||
|
- Fixed bug on concurrent attempt to enter in a session while trying to execute another task #24116
|
||||||
|
|
||||||
|
|
||||||
## [v3.2.0]
|
## [v3.2.0]
|
||||||
|
|
||||||
- Fixed RequestFilter to avoid to remove info to Smartgears
|
- Fixed RequestFilter to avoid to remove info to Smartgears
|
||||||
|
@ -13,6 +19,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
|
|
||||||
- Ported service to authorization-utils [#22871]
|
- Ported service to authorization-utils [#22871]
|
||||||
|
|
||||||
|
|
||||||
## [v3.0.0]
|
## [v3.0.0]
|
||||||
|
|
||||||
- Switched smart-executor JSON management to gcube-jackson [#19647]
|
- Switched smart-executor JSON management to gcube-jackson [#19647]
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.vremanagement</groupId>
|
<groupId>org.gcube.vremanagement</groupId>
|
||||||
<artifactId>smart-executor</artifactId>
|
<artifactId>smart-executor</artifactId>
|
||||||
<version>3.2.0</version>
|
<version>3.2.1-SNAPSHOT</version>
|
||||||
<name>SmartExecutor</name>
|
<name>SmartExecutor</name>
|
||||||
<description>Smart Executor Service allows to launch recurrent tasks such as task for infrastructure management, healthy monitoring etc.</description>
|
<description>Smart Executor Service allows to launch recurrent tasks such as task for infrastructure management, healthy monitoring etc.</description>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>gcube-smartgears-bom</artifactId>
|
<artifactId>gcube-smartgears-bom</artifactId>
|
||||||
<version>2.5.0</version>
|
<version>2.5.1-SNAPSHOT</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -148,7 +148,9 @@ public class SmartExecutorInitializator implements ApplicationManager {
|
||||||
Secret secret = SecretUtility.getSecretByTokenString(scheduledTasktoken);
|
Secret secret = SecretUtility.getSecretByTokenString(scheduledTasktoken);
|
||||||
|
|
||||||
SecretManager secretManager = SecretManagerProvider.instance.get();
|
SecretManager secretManager = SecretManagerProvider.instance.get();
|
||||||
|
synchronized (secretManager) {
|
||||||
try {
|
try {
|
||||||
|
logger.trace("Starting a Secret Manager session (synchronized block)...");
|
||||||
secretManager.startSession(secret);
|
secretManager.startSession(secret);
|
||||||
SmartExecutorScheduler smartExecutorScheduler = SmartExecutorSchedulerFactory.getSmartExecutorScheduler();
|
SmartExecutorScheduler smartExecutorScheduler = SmartExecutorSchedulerFactory.getSmartExecutorScheduler();
|
||||||
// A new Scheduled Task will be persisted due to launch. Removing it
|
// A new Scheduled Task will be persisted due to launch. Removing it
|
||||||
|
@ -163,8 +165,9 @@ public class SmartExecutorInitializator implements ApplicationManager {
|
||||||
}
|
}
|
||||||
}finally {
|
}finally {
|
||||||
secretManager.endSession();
|
secretManager.endSession();
|
||||||
|
logger.trace("Secret Manager session terminated (synchronized block).");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class RunnablePlugin<T extends Plugin> implements Runnable {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(){
|
public synchronized void run(){
|
||||||
String pluginName = plugin.getName();
|
String pluginName = plugin.getName();
|
||||||
|
|
||||||
logger.info("{} : {} is going to be launched (UUID={}, iterationNumber={}) with the following inputs {}",
|
logger.info("{} : {} is going to be launched (UUID={}, iterationNumber={}) with the following inputs {}",
|
||||||
|
@ -85,10 +85,10 @@ public class RunnablePlugin<T extends Plugin> implements Runnable {
|
||||||
JobUsageRecord jobUsageRecord = new JobUsageRecord();
|
JobUsageRecord jobUsageRecord = new JobUsageRecord();
|
||||||
|
|
||||||
long startTime = actualStateEvolution.getTimestamp();
|
long startTime = actualStateEvolution.getTimestamp();
|
||||||
|
Secret secret = SecretUtility.getSecretByTokenString(token);
|
||||||
SecretManager secretManager = SecretManagerProvider.instance.get();
|
SecretManager secretManager = SecretManagerProvider.instance.get();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Secret secret = SecretUtility.getSecretByTokenString(token);
|
|
||||||
secretManager.startSession(secret);
|
secretManager.startSession(secret);
|
||||||
|
|
||||||
setState(PluginState.RUNNING);
|
setState(PluginState.RUNNING);
|
||||||
|
|
Loading…
Reference in New Issue