Skip to content

Commit 400e1ee

Browse files
committed
Merge remote-tracking branch 'origin/4.19' into add_systemvmtemplate_arm64_support
2 parents e590dcc + 54c8b71 commit 400e1ee

File tree

4,031 files changed

+227980
-57825
lines changed

Some content is hidden

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

4,031 files changed

+227980
-57825
lines changed

.asf.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,21 @@ github:
2727
- infrastructure
2828
- java
2929
- python
30-
- hosting
3130
- kvm
31+
- libvirt
3232
- vsphere
33+
- vmware
3334
- xenserver
3435
- xcp-ng
36+
- orchestration
37+
- virtualization
38+
- virtual-machine
39+
- kubernetes
3540

3641
features:
3742
wiki: true
3843
issues: true
44+
discussions: true
3945
projects: true
4046

4147
enabled_merge_buttons:
@@ -45,5 +51,19 @@ github:
4551

4652
collaborators:
4753
- acs-robot
54+
- kiranchavala
55+
- rajujith
56+
- alexandremattioli
57+
- vishesh92
58+
- GaOrtiga
59+
- SadiJr
60+
- winterhazel
61+
- rp-
4862

4963
protected_branches: ~
64+
65+
notifications:
66+
commits: commits@cloudstack.apache.org
67+
issues: commits@cloudstack.apache.org
68+
pullrequests: commits@cloudstack.apache.org
69+
discussions: users@cloudstack.apache.org

.github/linters/.flake8

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
# E112 Expected an indented block
19+
# E113 Unexpected indentation
20+
# E133 Closing bracket is missing indentation
1821
# E223 Tab before operator
1922
# E224 Tab after operator
23+
# E227 Missing whitespace around bitwise or shift operator
2024
# E242 Tab after ','
2125
# E273 Tab after keyword
2226
# E274 Tab before keyword
27+
# E742 Do not define classes named 'I', 'O', or 'l'
28+
# E743 Do not define functions named 'I', 'O', or 'l'
2329
# E901 SyntaxError or IndentationError
2430
# E902 IOError
2531
# W291 Trailing whitespace
@@ -28,4 +34,7 @@
2834
# W391 Blank line at end of file
2935

3036
[flake8]
31-
select = E223,E224,E242,E273,E274,E901,E902,W291,W292,W293,W391
37+
exclude =
38+
.git,
39+
venv
40+
select = E112,E113,E133,E223,E224,E227,E242,E273,E274,E742,E743,E901,E902,W291,W292,W293,W391

.github/workflows/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@ concurrency:
2323
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2424
cancel-in-progress: true
2525

26+
permissions:
27+
contents: read
28+
2629
jobs:
2730
build:
28-
runs-on: ubuntu-20.04
31+
runs-on: ubuntu-22.04
2932
steps:
30-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
3134

3235
- name: Set up JDK 11
33-
uses: actions/setup-java@v3
36+
uses: actions/setup-java@v4
3437
with:
3538
java-version: '11'
3639
distribution: 'adopt'
@@ -63,4 +66,4 @@ jobs:
6366
run: |
6467
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss && cd nonoss && bash -x install-non-oss.sh && cd ..
6568
rm -fr nonoss
66-
mvn -B -P developer,systemvm -Dsimulator -Dnoredist clean install
69+
mvn -B -P developer,systemvm -Dsimulator -Dnoredist clean install -T$(nproc)

.github/workflows/ci.yml

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ concurrency:
2323
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2424
cancel-in-progress: true
2525

26+
permissions:
27+
contents: read
28+
2629
jobs:
2730
build:
28-
runs-on: ubuntu-20.04
31+
if: github.repository == 'apache/cloudstack'
32+
runs-on: ubuntu-22.04
2933

3034
strategy:
3135
fail-fast: false
@@ -50,6 +54,7 @@ jobs:
5054
smoke/test_deploy_vm_with_userdata
5155
smoke/test_deploy_vms_in_parallel
5256
smoke/test_deploy_vms_with_varied_deploymentplanners
57+
smoke/test_restore_vm
5358
smoke/test_diagnostics
5459
smoke/test_direct_download
5560
smoke/test_disk_offerings
@@ -58,7 +63,8 @@ jobs:
5863
smoke/test_domain_network_offerings
5964
smoke/test_domain_service_offerings
6065
smoke/test_domain_vpc_offerings",
61-
"smoke/test_dynamicroles
66+
"smoke/test_cluster_drs
67+
smoke/test_dynamicroles
6268
smoke/test_enable_account_settings_for_domain
6369
smoke/test_enable_role_based_users_in_projects
6470
smoke/test_events_resource
@@ -75,17 +81,20 @@ jobs:
7581
smoke/test_list_ids_parameter
7682
smoke/test_loadbalance
7783
smoke/test_login
84+
smoke/test_2fa
7885
smoke/test_metrics_api
7986
smoke/test_migration
8087
smoke/test_multipleips_per_nic
81-
smoke/test_nested_virtualization",
88+
smoke/test_nested_virtualization
89+
smoke/test_set_sourcenat",
8290
"smoke/test_network
8391
smoke/test_network_acl
8492
smoke/test_network_ipv6
8593
smoke/test_network_permissions
8694
smoke/test_nic
8795
smoke/test_nic_adapter_type
8896
smoke/test_non_contigiousvlan
97+
smoke/test_object_stores
8998
smoke/test_outofbandmanagement
9099
smoke/test_outofbandmanagement_nestedplugin
91100
smoke/test_over_provisioning
@@ -104,7 +113,8 @@ jobs:
104113
smoke/test_reset_configuration_settings
105114
smoke/test_reset_vm_on_reboot
106115
smoke/test_resource_accounting
107-
smoke/test_resource_detail",
116+
smoke/test_resource_detail
117+
smoke/test_global_acls",
108118
"smoke/test_router_dhcphosts
109119
smoke/test_router_dns
110120
smoke/test_router_dnsservice
@@ -122,6 +132,7 @@ jobs:
122132
smoke/test_usage
123133
smoke/test_usage_events
124134
smoke/test_vm_deployment_planner
135+
smoke/test_vm_schedule
125136
smoke/test_vm_life_cycle
126137
smoke/test_vm_lifecycle_unmanage_import
127138
smoke/test_vm_snapshot_kvm
@@ -184,14 +195,23 @@ jobs:
184195
component/test_vpc_network
185196
component/test_vpc_offerings
186197
component/test_vpc_routers
187-
component/test_vpn_users",
188-
"component/test_vpc_network_lbrules" ]
198+
component/test_vpn_users
199+
component/test_vpc_network_lbrules",
200+
"smoke/test_list_accounts
201+
smoke/test_list_disk_offerings
202+
smoke/test_list_domains
203+
smoke/test_list_hosts
204+
smoke/test_list_service_offerings
205+
smoke/test_list_storage_pools
206+
smoke/test_list_volumes"]
189207

190208
steps:
191-
- uses: actions/checkout@v3
209+
- uses: actions/checkout@v4
210+
with:
211+
fetch-depth: 0
192212

193213
- name: Set up JDK
194-
uses: actions/setup-java@v3
214+
uses: actions/setup-java@v4
195215
with:
196216
java-version: '11'
197217
distribution: 'adopt'
@@ -213,6 +233,11 @@ jobs:
213233
run: |
214234
python3 -m pip install --user --upgrade urllib3 lxml paramiko nose texttable ipmisim pyopenssl pycrypto mock flask netaddr pylint pycodestyle six astroid
215235
236+
- name: Install jacoco dependencies
237+
run: |
238+
wget https://github.com/jacoco/jacoco/releases/download/v0.8.10/jacoco-0.8.10.zip
239+
unzip jacoco-0.8.10.zip -d jacoco
240+
216241
- name: Env details
217242
run: |
218243
uname -a
@@ -236,7 +261,7 @@ jobs:
236261
237262
- name: Build with Maven
238263
run: |
239-
mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true
264+
mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true -T$(nproc)
240265
241266
- name: Setup Simulator Prerequisites
242267
run: |
@@ -245,16 +270,23 @@ jobs:
245270
mvn -q -Pdeveloper -pl developer -Ddeploydb
246271
mvn -q -Pdeveloper -pl developer -Ddeploydb-simulator
247272
273+
- name: Generate jacoco-coverage.sh
274+
run: |
275+
echo "java -jar jacoco/lib/jacococli.jar report jacoco-it.exec \\" > jacoco-report.sh
276+
find . | grep "target/classes" | sed 's/\/classes\//\/classes /g' | awk '{print "--classfiles", $1, "\\"}' | sort |uniq >> jacoco-report.sh
277+
find . | grep "src/main/java" | sed 's/\/java\//\/java /g' | awk '{print "--sourcefiles", $1, "\\"}' | sort | uniq >> jacoco-report.sh
278+
echo "--xml jacoco-coverage.xml" >> jacoco-report.sh
279+
248280
- name: Start CloudStack Management Server with Simulator
249281
run: |
250-
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/urandom"
282+
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/urandom -javaagent:jacoco/lib/jacocoagent.jar=address=*,port=36320,output=tcpserver"
251283
echo -e "\nStarting simulator"
252284
set +e
253285
mvn -Dsimulator -Dorg.eclipse.jetty.annotations.maxWait=120 -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log || true &
254286
while ! nc -vzw 5 localhost 8096 2>&1 > /dev/null; do grep Exception /tmp/jetty-log; sleep 10; done
255287
set -e
256288
echo -e "\nStarting Advanced Zone DataCenter deployment"
257-
python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advanced.cfg 2>&1 || true
289+
python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advdualzone.cfg 2>&1 || true
258290
259291
- name: Run Integration Tests with Simulator
260292
run: |
@@ -267,14 +299,25 @@ jobs:
267299
TESTS=($(echo $TESTS | tr -d '\n' | tr -s ' '))
268300
for suite in "${TESTS[@]}" ; do
269301
echo -e "Currently running test: $suite\n"
270-
time nosetests-3.4 --with-xunit --xunit-file=integration-test-results/$suite.xml --with-marvin --marvin-config=setup/dev/advanced.cfg test/integration/$suite.py -s -a tags=advanced,required_hardware=false --zone=Sandbox-simulator --hypervisor=simulator || true ;
302+
time nosetests-3.4 --with-xunit --xunit-file=integration-test-results/$suite.xml --with-marvin --marvin-config=setup/dev/advdualzone.cfg test/integration/$suite.py -s -a tags=advanced,required_hardware=false --zone=zim1 --hypervisor=simulator || true ;
271303
done
272304
273305
echo -e "Stopping Simulator, integration tests run completed\n"
306+
java -jar jacoco/lib/jacococli.jar dump --address localhost --port 36320 --destfile jacoco-it.exec
307+
bash jacoco-report.sh
274308
mvn -Dsimulator -pl client jetty:stop 2>&1
275309
find /tmp//MarvinLogs -type f -exec echo -e "Printing marvin logs {} :\n" \; -exec cat {} \;
276310
277311
- name: Integration Tests Result
278312
run: |
279313
echo -e "Simulator CI Test Results: (only failures listed)\n"
280314
python3 ./tools/marvin/xunit-reader.py integration-test-results/
315+
316+
- uses: codecov/codecov-action@v4
317+
with:
318+
files: jacoco-coverage.xml
319+
fail_ci_if_error: true
320+
flags: simulator-marvin-tests
321+
verbose: true
322+
name: codecov
323+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/codecov.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ concurrency:
2828

2929
jobs:
3030
build:
31+
if: github.repository == 'apache/cloudstack'
3132
name: codecov
32-
runs-on: ubuntu-latest
33+
runs-on: ubuntu-22.04
3334
steps:
34-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
3538

3639
- name: Set up JDK11
37-
uses: actions/setup-java@v3
40+
uses: actions/setup-java@v4
3841
with:
3942
distribution: 'temurin'
4043
java-version: '11'
@@ -44,11 +47,13 @@ jobs:
4447
run: |
4548
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
4649
cd nonoss && bash -x install-non-oss.sh && cd ..
47-
mvn -P quality -Dsimulator -Dnoredist clean install
50+
mvn -P quality -Dsimulator -Dnoredist clean install -T$(nproc)
4851
49-
- uses: codecov/codecov-action@v3
52+
- uses: codecov/codecov-action@v4
5053
with:
5154
files: ./client/target/site/jacoco-aggregate/jacoco.xml
5255
fail_ci_if_error: true
56+
flags: unittests
5357
verbose: true
5458
name: codecov
59+
token: ${{ secrets.CODECOV_TOKEN }}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Docker Image Build
19+
20+
on:
21+
push:
22+
branches:
23+
- main
24+
tags:
25+
- 4.*
26+
- 5.*
27+
28+
permissions:
29+
contents: read
30+
31+
concurrency:
32+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
33+
cancel-in-progress: true
34+
35+
jobs:
36+
build:
37+
if: github.repository == 'apache/cloudstack'
38+
runs-on: ubuntu-22.04
39+
steps:
40+
- name: Login to Docker Registry
41+
uses: docker/login-action@v2
42+
with:
43+
registry: ${{ secrets.DOCKER_REGISTRY }}
44+
username: ${{ secrets.DOCKERHUB_USER }}
45+
password: ${{ secrets.DOCKERHUB_TOKEN }}
46+
47+
- name: Set Docker repository name
48+
run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV
49+
50+
- uses: actions/checkout@v4
51+
52+
- name: Set ACS version
53+
run: echo "ACS_VERSION=$(grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)" >> $GITHUB_ENV
54+
55+
- name: Set Docker image TAG
56+
run: echo "TAG=$(if [ "${{ github.ref_type }}" = "tag" ];then echo ${{ github.ref_name }}; elif [[ "${ACS_VERSION}" =~ .*-SNAPSHOT ]];then echo ${ACS_VERSION}-$(date +'%Y%m%d-%H%M%S');else echo ${ACS_VERSION};fi)" >> $GITHUB_ENV
57+
58+
- name: Set Docker image FULL TAG
59+
run: echo "FULL_TAG=$(if [ "${{ secrets.DOCKER_REGISTRY }}" = "" ];then echo ${DOCKER_REPOSITORY}/cloudstack-simulator:${TAG};else echo ${{ secrets.DOCKER_REGISTRY }}/${DOCKER_REPOSITORY}/cloudstack-simulator:${TAG};fi)" >> $GITHUB_ENV
60+
61+
- name: Build the Docker image for cloudstack-simulator
62+
run: cd tools/docker && docker build ../.. --file Dockerfile --tag ${FULL_TAG}
63+
64+
- name: Push Docker image to Docker Registry
65+
run: docker push ${FULL_TAG}

0 commit comments

Comments
 (0)