Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2f85f20
.github: use JRE17 for sonar check
weizhouapache Feb 5, 2024
2a73cc1
pom.xml: fix error 'module java.base does not "opens java.lang" to un…
weizhouapache May 2, 2024
6642079
engine/schema/pom.xml: replace gmaven with gmavenplus
weizhouapache May 3, 2024
3ed62ca
jdk17: replace MaxPermSize by MaxMetaspaceSize
weizhouapache May 3, 2024
ef61eb1
pom.xml: add-exports
weizhouapache May 3, 2024
2f9a718
engine/service/pom.xml: fix maven-war-plugin version
weizhouapache May 3, 2024
1ec27fc
jdk17: fix unit tests in engine/storage/datamotion
weizhouapache May 3, 2024
dfed799
jdk17: fix brocade-vcs
weizhouapache May 3, 2024
08e7019
jdk17: replace gmaven-plugin in all pom.xml files
weizhouapache May 3, 2024
4d93b13
jdk17: fix two unit test failures plugins/user-authenticators/ldap
weizhouapache May 3, 2024
2cc4a53
pom.xml: update cs.jdk.version to 17
weizhouapache May 21, 2024
0b4eafb
.github: update JDK to 17 in actions
weizhouapache May 21, 2024
7aea25b
jdk17: update build dependencies
weizhouapache May 21, 2024
b786b8c
Revert "pom.xml: update cs.jdk.version to 17"
weizhouapache May 21, 2024
4af2300
fix simulator CI and Update exec-maven-plugin to 3.2.0
weizhouapache May 21, 2024
fd39665
fix simulator CI
weizhouapache May 21, 2024
fd78488
Merge remote-tracking branch 'apache/main' into 4.20-sonar-jre17
weizhouapache May 22, 2024
0f48947
JRE17: update MAVEN_OPTS in ci.yml
weizhouapache May 23, 2024
a0cd7f5
Update debian/control
weizhouapache Jul 8, 2024
61deb67
Merge remote-tracking branch 'origin/main' into 4.20-sonar-jre17
rohityadavcloud Jul 26, 2024
3d68219
packaging: remove centos7 directory
rohityadavcloud Jul 26, 2024
e3bc2b8
rename more centos8 -> el8 while keeping symlink
rohityadavcloud Jul 26, 2024
0d3d2a3
bump GH actions build/python/node versions
rohityadavcloud Jul 26, 2024
c899035
pom.xml: add '--add-opens=java.base/javax.net.ssl=ALL-UNNAMED' to arg…
weizhouapache Jul 26, 2024
b80a56d
Update .github/workflows/ci.yml
weizhouapache Jul 29, 2024
97be6a6
Merge remote-tracking branch 'apache/main' into 4.20-sonar-jre17
weizhouapache Jul 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'
architecture: 'x64'

- name: Install Build Dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
architecture: x64
cache: maven

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'
architecture: 'x64'

- name: Install Build Dependencies
Expand Down Expand Up @@ -283,7 +283,7 @@ jobs:

- name: Start CloudStack Management Server with Simulator
run: |
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/urandom -javaagent:jacoco/lib/jacocoagent.jar=address=*,port=36320,output=tcpserver"
export MAVEN_OPTS="-Xmx4096m -XX:MaxMetaspaceSize=800m -Djava.security.egd=file:/dev/urandom -javaagent:jacoco/lib/jacocoagent.jar=address=*,port=36320,output=tcpserver --add-opens=java.base/java.lang=ALL-UNNAMED --add-exports=java.base/sun.security.x509=ALL-UNNAMED --add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED"
echo -e "\nStarting simulator"
set +e
mvn -Dsimulator -Dorg.eclipse.jetty.annotations.maxWait=120 -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log || true &
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
cache: 'maven'

- name: Build CloudStack with Quality Checks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main-sonar-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK11
- name: Set up JDK17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
cache: 'maven'

- name: Cache SonarCloud packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
architecture: x64
cache: maven
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonar-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:
ref: "refs/pull/${{ github.event.number }}/merge"
fetch-depth: 0

- name: Set up JDK11
- name: Set up JDK17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
cache: 'maven'

- name: Cache SonarCloud packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16

- name: Env details
run: |
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Clear old database (if any) and deploy the database schema:

Export the following variable if you need to run and debug the management server:

$ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
$ export MAVEN_OPTS="-Xmx1024m -XX:MaxMetaspaceSize=500m -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

Start the management server:

Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: cloudstack
Section: libs
Priority: extra
Maintainer: Wido den Hollander <[email protected]>
Build-Depends: debhelper (>= 9), openjdk-11-jdk | java11-sdk | java11-jdk | zulu-11, genisoimage,
Build-Depends: debhelper (>= 9), openjdk-17-jdk | java17-sdk | java17-jdk | zulu-17 | openjdk-11-jdk | java11-sdk | java11-jdk | zulu-11, genisoimage,
python-mysql.connector | python3-mysql.connector, maven (>= 3) | maven3,
python (>= 2.7) | python2 (>= 2.7), python3 (>= 3), python-setuptools, python3-setuptools,
nodejs (>= 12), lsb-release, dh-systemd | debhelper (>= 13)
Expand Down
61 changes: 30 additions & 31 deletions developer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
<version>4.20.0.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>${cs.mysql.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
Expand Down Expand Up @@ -108,28 +114,25 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<dependencies>
<!-- specify the dependent jdbc driver here -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>${cs.mysql.version}</version>
</dependency>
</dependencies>
<version>${cs.exec-maven-plugin.version}</version>
<executions>
<execution>
<phase>process-resources</phase>
<id>create-schema</id>
<goals>
<goal>java</goal>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.cloud.upgrade.DatabaseCreator</mainClass>
<executable>java</executable>
<workingDirectory>${basedir}/..</workingDirectory>
<includePluginDependencies>true</includePluginDependencies>
<arguments>
<argument>--add-opens=java.base/java.lang=ALL-UNNAMED</argument>
<argument>-classpath</argument>
<classpath />
<argument>com.cloud.upgrade.DatabaseCreator</argument>
<!-- db properties file -->
<argument>${basedir}/../utils/conf/db.properties</argument>
<argument>${basedir}/../utils/conf/db.properties.override</argument>
Expand Down Expand Up @@ -177,27 +180,25 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<dependencies>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>${cs.mysql.version}</version>
</dependency>
</dependencies>
<version>${cs.exec-maven-plugin.version}</version>
<executions>
<execution>
<phase>process-resources</phase>
<id>create-schema-simulator</id>
<goals>
<goal>java</goal>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.cloud.upgrade.DatabaseCreator</mainClass>
<executable>java</executable>
<workingDirectory>${basedir}/..</workingDirectory>
<includePluginDependencies>true</includePluginDependencies>
<arguments>
<argument>--add-opens=java.base/java.lang=ALL-UNNAMED</argument>
<argument>-classpath</argument>
<classpath />
<argument>com.cloud.upgrade.DatabaseCreator</argument>
<!-- db properties file -->
<argument>${basedir}/../utils/conf/db.properties</argument>
<argument>${basedir}/../utils/conf/db.properties.override</argument>
Expand Down Expand Up @@ -235,27 +236,25 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<dependencies>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>${cs.mysql.version}</version>
</dependency>
</dependencies>
<version>${cs.exec-maven-plugin.version}</version>
<executions>
<execution>
<phase>process-resources</phase>
<id>create-schema-simulator</id>
<goals>
<goal>java</goal>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.cloud.upgrade.DatabaseCreator</mainClass>
<executable>java</executable>
<workingDirectory>${basedir}/..</workingDirectory>
<includePluginDependencies>true</includePluginDependencies>
<arguments>
<argument>--add-opens=java.base/java.lang=ALL-UNNAMED</argument>
<argument>-classpath</argument>
<classpath />
<argument>com.cloud.upgrade.DatabaseCreator</argument>
<!-- db properties file -->
<argument>${basedir}/../utils/conf/db.properties</argument>
<argument>${basedir}/../utils/conf/db.properties.override</argument>
Expand Down
69 changes: 40 additions & 29 deletions engine/schema/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,16 @@
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>${cs.gmavenplus.version}</version>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${cs.groovy.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>setproperty</id>
Expand All @@ -72,12 +79,14 @@
<goal>execute</goal>
</goals>
<configuration>
<source>
def projectVersion = project.properties['project.systemvm.template.version']
String[] versionParts = projectVersion.tokenize('.')
pom.properties['cs.version'] = versionParts[0] + "." + versionParts[1]
pom.properties['patch.version'] = versionParts[2]
</source>
<scripts>
<script><![CDATA[
def projectVersion = project.properties.getProperty('project.systemvm.template.version')
String[] versionParts = projectVersion.tokenize('.')
project.properties.setProperty('cs.version', versionParts[0] + "." + versionParts[1])
project.properties.setProperty('patch.version', versionParts[2])
]]></script>
</scripts>
</configuration>
</execution>
<execution>
Expand All @@ -87,27 +96,29 @@
<goal>execute</goal>
</goals>
<configuration>
<source>
def csVersion = pom.properties['cs.version']
def patch = pom.properties['patch.version']
def templateList = []
templateList.add("systemvmtemplate-${csVersion}.${patch}-kvm")
templateList.add("systemvmtemplate-${csVersion}.${patch}-vmware")
templateList.add("systemvmtemplate-${csVersion}.${patch}-xen")
templateList.add("systemvmtemplate-${csVersion}.${patch}-ovm")
templateList.add("systemvmtemplate-${csVersion}.${patch}-hyperv")
File file = new File("./engine/schema/dist/systemvm-templates/md5sum.txt")
def lines = file.readLines()
for (template in templateList) {
def data = lines.findAll { it.contains(template) }
if (data != null) {
if (data.size() > 0) {
def hypervisor = template.tokenize('-')[-1]
pom.properties["$hypervisor" + ".checksum"] = data[0].tokenize(' ')[0]
<scripts>
<script><![CDATA[
def csVersion = project.properties.getProperty('cs.version')
def patch = project.properties.getProperty('patch.version')
def templateList = []
templateList.add("systemvmtemplate-${csVersion}.${patch}-kvm")
templateList.add("systemvmtemplate-${csVersion}.${patch}-vmware")
templateList.add("systemvmtemplate-${csVersion}.${patch}-xen")
templateList.add("systemvmtemplate-${csVersion}.${patch}-ovm")
templateList.add("systemvmtemplate-${csVersion}.${patch}-hyperv")
File file = new File("./engine/schema/dist/systemvm-templates/md5sum.txt")
def lines = file.readLines()
for (template in templateList) {
def data = lines.findAll { it.contains(template) }
if (data != null) {
if (data.size() > 0) {
def hypervisor = template.tokenize('-')[-1]
project.properties["$hypervisor" + ".checksum"] = data[0].tokenize(' ')[0]
}
}
}
}
</source>
]]></script>
</scripts>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -135,7 +146,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<version>${cs.exec-maven-plugin.version}</version>
<executions>
<execution>
<id>systemvm-template-metadata</id>
Expand Down
5 changes: 5 additions & 0 deletions engine/service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
<build>
<finalName>engine</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static org.mockito.Mockito.when;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;

import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.never;
Expand Down Expand Up @@ -55,8 +54,6 @@ public class AncientDataMotionStrategyTest {
@Mock
PrimaryDataStoreTO dataStoreTO;
@Mock
ConfigKey<Boolean> vmwareKey;
@Mock
StorageManager storageManager;
@Mock
StoragePool storagePool;
Expand All @@ -66,24 +63,18 @@ public class AncientDataMotionStrategyTest {

@Before
public void setup() throws Exception {
replaceVmwareCreateCloneFullField();

when(vmwareKey.valueIn(POOL_ID)).thenReturn(FULL_CLONE_FLAG);
overrideDefaultConfigValue(StorageManager.VmwareCreateCloneFull, String.valueOf(FULL_CLONE_FLAG));

when(dataTO.getHypervisorType()).thenReturn(HypervisorType.VMware);
when(dataTO.getDataStore()).thenReturn(dataStoreTO);
when(dataStoreTO.getId()).thenReturn(POOL_ID);
when(storageManager.getStoragePool(POOL_ID)).thenReturn(storagePool);
}

private void replaceVmwareCreateCloneFullField() throws Exception {
Field field = StorageManager.class.getDeclaredField("VmwareCreateCloneFull");
field.setAccessible(true);
// remove final modifier from field
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
field.set(null, vmwareKey);
private void overrideDefaultConfigValue(final ConfigKey configKey, final String value) throws IllegalAccessException, NoSuchFieldException {
final Field f = ConfigKey.class.getDeclaredField("_defaultValue");
f.setAccessible(true);
f.set(configKey, value);
}

@Test
Expand Down
Loading