Skip to content

Commit 0599cf6

Browse files
Merge branch 'main' into 4.22-ssl-offloading
2 parents d470e05 + 3d6ec29 commit 0599cf6

File tree

256 files changed

+709
-437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+709
-437
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@ jobs:
3232
steps:
3333
- uses: actions/checkout@v4
3434

35-
- name: Set up JDK 11
35+
- name: Set up JDK 17
3636
uses: actions/setup-java@v4
3737
with:
38-
java-version: '11'
39-
distribution: 'adopt'
40-
architecture: x64
41-
cache: maven
38+
distribution: 'temurin'
39+
java-version: '17'
40+
cache: 'maven'
4241

4342
- name: Set up Python
4443
uses: actions/setup-python@v5

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,12 @@ jobs:
220220
with:
221221
fetch-depth: 0
222222

223-
- name: Set up JDK
223+
- name: Set up JDK 17
224224
uses: actions/setup-java@v4
225225
with:
226-
java-version: '11'
227-
distribution: 'adopt'
228-
architecture: x64
229-
cache: maven
226+
distribution: 'temurin'
227+
java-version: '17'
228+
cache: 'maven'
230229

231230
- name: Set up Python
232231
uses: actions/setup-python@v5

agent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.cloudstack</groupId>
2626
<artifactId>cloudstack</artifactId>
27-
<version>4.21.0.0-SNAPSHOT</version>
27+
<version>4.22.0.0-SNAPSHOT</version>
2828
</parent>
2929
<dependencies>
3030
<dependency>

agent/src/main/java/com/cloud/agent/resource/DummyResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import java.util.HashMap;
2121
import java.util.List;
2222
import java.util.Map;
23-
import java.util.UUID;
2423

2524
import com.cloud.agent.IAgentControl;
2625
import com.cloud.agent.api.Answer;
@@ -40,6 +39,7 @@
4039
import com.cloud.storage.Storage;
4140
import com.cloud.storage.Storage.StoragePoolType;
4241
import com.cloud.utils.StringUtils;
42+
import com.cloud.utils.UuidUtils;
4343

4444
public class DummyResource implements ServerResource {
4545
String _name;
@@ -133,7 +133,7 @@ protected StoragePoolInfo initializeLocalStorage() {
133133
String hostIp = getConfiguredProperty("private.ip.address", "127.0.0.1");
134134
String localStoragePath = getConfiguredProperty("local.storage.path", "/mnt");
135135
String lh = hostIp + localStoragePath;
136-
String uuid = UUID.nameUUIDFromBytes(lh.getBytes(StringUtils.getPreferredCharset())).toString();
136+
String uuid = UuidUtils.nameUUIDFromBytes(lh.getBytes(StringUtils.getPreferredCharset())).toString();
137137

138138
String capacity = getConfiguredProperty("local.storage.capacity", "1000000000");
139139
String available = getConfiguredProperty("local.storage.avail", "10000000");

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.cloudstack</groupId>
2626
<artifactId>cloudstack</artifactId>
27-
<version>4.21.0.0-SNAPSHOT</version>
27+
<version>4.22.0.0-SNAPSHOT</version>
2828
</parent>
2929
<dependencies>
3030
<dependency>

api/src/main/java/org/apache/cloudstack/api/response/StatsResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
public class StatsResponse extends BaseResponse {
2828

2929
@SerializedName("timestamp")
30-
@Param(description = "the time when the VM stats were collected. The format is \"yyyy-MM-dd hh:mm:ss\"")
30+
@Param(description = "the time when the VM stats were collected. The format is 'yyyy-MM-dd hh:mm:ss'")
3131
private Date timestamp;
3232

3333
@SerializedName("cpuused")

client/conf/server.properties.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,7 @@ access.log=/var/log/cloudstack/management/access.log
5858

5959
# The deployment mode for the extensions
6060
extensions.deployment.mode=@EXTENSIONSDEPLOYMENTMODE@
61+
62+
# Thread pool configuration
63+
#threads.min=10
64+
#threads.max=500

client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<parent>
2626
<groupId>org.apache.cloudstack</groupId>
2727
<artifactId>cloudstack</artifactId>
28-
<version>4.21.0.0-SNAPSHOT</version>
28+
<version>4.22.0.0-SNAPSHOT</version>
2929
</parent>
3030
<dependencies>
3131
<dependency>

client/src/main/java/org/apache/cloudstack/ServerDaemon.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ public class ServerDaemon implements Daemon {
8686
private static final int DEFAULT_REQUEST_CONTENT_SIZE = 1048576;
8787
private static final String REQUEST_MAX_FORM_KEYS_KEY = "request.max.form.keys";
8888
private static final int DEFAULT_REQUEST_MAX_FORM_KEYS = 5000;
89+
private static final String THREADS_MIN = "threads.min";
90+
private static final String THREADS_MAX = "threads.max";
8991

9092
////////////////////////////////////////////////////////
9193
/////////////// Server Configuration ///////////////////
@@ -106,6 +108,8 @@ public class ServerDaemon implements Daemon {
106108
private String keystoreFile;
107109
private String keystorePassword;
108110
private String webAppLocation;
111+
private int minThreads;
112+
private int maxThreads;
109113

110114
//////////////////////////////////////////////////
111115
/////////////// Public methods ///////////////////
@@ -147,6 +151,8 @@ public void init(final DaemonContext context) {
147151
setSessionTimeout(Integer.valueOf(properties.getProperty(SESSION_TIMEOUT, "30")));
148152
setMaxFormContentSize(Integer.valueOf(properties.getProperty(REQUEST_CONTENT_SIZE_KEY, String.valueOf(DEFAULT_REQUEST_CONTENT_SIZE))));
149153
setMaxFormKeys(Integer.valueOf(properties.getProperty(REQUEST_MAX_FORM_KEYS_KEY, String.valueOf(DEFAULT_REQUEST_MAX_FORM_KEYS))));
154+
setMinThreads(Integer.valueOf(properties.getProperty(THREADS_MIN, "10")));
155+
setMaxThreads(Integer.valueOf(properties.getProperty(THREADS_MAX, "500")));
150156
} catch (final IOException e) {
151157
logger.warn("Failed to read configuration from server.properties file", e);
152158
} finally {
@@ -164,8 +170,8 @@ public void init(final DaemonContext context) {
164170
public void start() throws Exception {
165171
// Thread pool
166172
final QueuedThreadPool threadPool = new QueuedThreadPool();
167-
threadPool.setMinThreads(10);
168-
threadPool.setMaxThreads(500);
173+
threadPool.setMinThreads(minThreads);
174+
threadPool.setMaxThreads(maxThreads);
169175

170176
// Jetty Server
171177
server = new Server(threadPool);
@@ -394,4 +400,12 @@ public void setMaxFormContentSize(int maxFormContentSize) {
394400
public void setMaxFormKeys(int maxFormKeys) {
395401
this.maxFormKeys = maxFormKeys;
396402
}
403+
404+
public void setMinThreads(int minThreads) {
405+
this.minThreads = minThreads;
406+
}
407+
408+
public void setMaxThreads(int maxThreads) {
409+
this.maxThreads = maxThreads;
410+
}
397411
}

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.cloudstack</groupId>
2626
<artifactId>cloudstack</artifactId>
27-
<version>4.21.0.0-SNAPSHOT</version>
27+
<version>4.22.0.0-SNAPSHOT</version>
2828
</parent>
2929
<dependencies>
3030
<dependency>

0 commit comments

Comments
 (0)