Skip to content

Commit ffab07f

Browse files
author
GutoVeronezi
committed
Merge remote-tracking branch 'apache-github/main' into HEAD
2 parents b240f80 + 3dcb93d commit ffab07f

File tree

12 files changed

+117
-48
lines changed

12 files changed

+117
-48
lines changed

.github/workflows/coverage-check.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,4 @@ jobs:
9191
run: |
9292
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
9393
cd nonoss && bash -x install-non-oss.sh && cd ..
94-
mvn -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apachecloudstack -Dsonar.pullrequest.key=$PR_ID -Dsonar.pullrequest.base=main -Dsonar.pullrequest.branch=refs/pull/${{ github.event.number }}/merge -Dsonar.pullrequest.github.repository=apache/cloudstack -Dsonar.pullrequest.provider=GitHub
95-
96-
echo "COVERAGE<<EOF" >> $GITHUB_ENV
97-
for file in ${{ steps.java-changes.outputs.all_changed_files }}; do
98-
name=$(basename $file | sed 's/.java//g')
99-
coverage=$(grep ,$name, client/target/site/jacoco-aggregate/jacoco.csv | cut -f3-9 -d"," | sed 's/,/|/g')
100-
echo $coverage
101-
if [[ ! -z "${coverage// }" ]]; then
102-
echo "|$coverage|" >> $GITHUB_ENV
103-
fi
104-
done
105-
echo "EOF" >> $GITHUB_ENV
106-
107-
- name: Comment PR Coverage Report
108-
uses: peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32
109-
if: steps.java-changes.outputs.any_changed == 'true'
110-
with:
111-
token: ${{ secrets.ACS_ROBOT_TOKEN }}
112-
issue-number: ${{ github.event.pull_request.number }}
113-
body: "## PR Analysis\nhttps://sonarcloud.io/summary/new_code?id=apachecloudstack&pullRequest=${{ github.event.pull_request.number }}\n## PR Coverage Report\n|**CLASS**|**INSTRUCTION MISSED**|**INSTRUCTION COVERED**|**BRANCH MISSED**|**BRANCH COVERED**|**LINE MISSED**|**LINE COVERED**|\n|-----|-----|-----|-----|-----|-----|-----|\n${{ env.COVERAGE }}"
94+
mvn -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack -Dsonar.pullrequest.key=$PR_ID -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} -Dsonar.pullrequest.github.repository=apache/cloudstack -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.summary_comment=true
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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: Main Branch Quality Check
19+
20+
on:
21+
push:
22+
branches:
23+
- main
24+
25+
jobs:
26+
build:
27+
name: Main Build
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v3
31+
with:
32+
fetch-depth: 0
33+
34+
- name: Set up JDK11
35+
uses: actions/setup-java@v3
36+
with:
37+
distribution: 'temurin'
38+
java-version: '11'
39+
cache: 'maven'
40+
41+
- name: Cache SonarCloud packages
42+
uses: actions/cache@v3
43+
with:
44+
path: ~/.sonar/cache
45+
key: ${{ runner.os }}-sonar
46+
restore-keys: ${{ runner.os }}-sonar
47+
48+
- name: Cache local Maven repository
49+
uses: actions/cache@v3
50+
with:
51+
path: ~/.m2/repository
52+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
53+
restore-keys: |
54+
${{ runner.os }}-m2
55+
56+
- name: Run Tests with Coverage
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
60+
run: |
61+
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
62+
cd nonoss && bash -x install-non-oss.sh && cd ..
63+
mvn -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Apache CloudStack [![Build Status](https://app.travis-ci.com/apache/cloudstack.svg?branch=main)](https://app.travis-ci.com/apache/cloudstack) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=apachecloudstack&metric=alert_status)](https://sonarcloud.io/dashboard?id=apachecloudstack) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=apachecloudstack&metric=ncloc)](https://sonarcloud.io/dashboard?id=apachecloudstack) ![GitHub language count](https://img.shields.io/github/languages/count/apache/cloudstack.svg) ![GitHub top language](https://img.shields.io/github/languages/top/apache/cloudstack.svg)
1+
# Apache CloudStack [![Build Status](https://app.travis-ci.com/apache/cloudstack.svg?branch=main)](https://app.travis-ci.com/apache/cloudstack) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=apache_cloudstack&metric=alert_status)](https://sonarcloud.io/dashboard?id=apache_cloudstack) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=apache_cloudstack&metric=ncloc)](https://sonarcloud.io/dashboard?id=apache_cloudstack) ![GitHub language count](https://img.shields.io/github/languages/count/apache/cloudstack.svg) ![GitHub top language](https://img.shields.io/github/languages/top/apache/cloudstack.svg)
22

33
![Apache CloudStack](tools/logo/apache_cloudstack.png)
44

plugins/user-authenticators/ldap/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,37 +192,37 @@
192192
<groupId>org.apache.directory.server</groupId>
193193
<artifactId>apacheds-core-constants</artifactId>
194194
<version>${ads.version}</version>
195-
<scope>compile</scope>
195+
<scope>test</scope>
196196
</dependency>
197197
<dependency>
198198
<groupId>org.apache.directory.server</groupId>
199199
<artifactId>apacheds-core-annotations</artifactId>
200200
<version>${ads.version}</version>
201-
<scope>compile</scope>
201+
<scope>test</scope>
202202
</dependency>
203203
<dependency>
204204
<groupId>org.apache.directory.server</groupId>
205205
<artifactId>apacheds-core</artifactId>
206206
<version>${ads.version}</version>
207-
<scope>compile</scope>
207+
<scope>test</scope>
208208
</dependency>
209209
<dependency>
210210
<groupId>org.apache.directory.server</groupId>
211211
<artifactId>apacheds-protocol-ldap</artifactId>
212212
<version>${ads.version}</version>
213-
<scope>compile</scope>
213+
<scope>test</scope>
214214
</dependency>
215215
<dependency>
216216
<groupId>org.apache.directory.server</groupId>
217217
<artifactId>apacheds-jdbm-partition</artifactId>
218218
<version>${ads.version}</version>
219-
<scope>compile</scope>
219+
<scope>test</scope>
220220
</dependency>
221221
<dependency>
222222
<groupId>org.apache.directory.server</groupId>
223223
<artifactId>apacheds-ldif-partition</artifactId>
224224
<version>${ads.version}</version>
225-
<scope>compile</scope>
225+
<scope>test</scope>
226226
</dependency>
227227
<dependency>
228228
<groupId>commons-io</groupId>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5151
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5252
<project.systemvm.template.version>4.17.0.0</project.systemvm.template.version>
53-
<sonar.organization>apachecloudstack</sonar.organization>
53+
<sonar.organization>apache</sonar.organization>
5454
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
5555

5656
<!-- Build properties -->

systemvm/debian/opt/cloud/bin/cs/CsRedundant.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@ def _enable_radvd(self, dev):
481481
if dev == '':
482482
return
483483
CsHelper.service("radvd", "enable")
484-
CsHelper.execute("echo \"radvd\" >> /var/cache/cloud/enabled_svcs")
485484
CsHelper.start_if_stopped("radvd")
486485

487486
def _disable_radvd(self, dev):
@@ -492,8 +491,6 @@ def _disable_radvd(self, dev):
492491
return
493492
CsHelper.service("radvd", "stop")
494493
CsHelper.service("radvd", "disable")
495-
CsHelper.execute("sed -i \"s,radvd,,g\" /var/cache/cloud/enabled_svcs")
496-
CsHelper.execute("sed -i '/^$/d' /var/cache/cloud/enabled_svcs")
497494
logging.info(CsHelper.execute("systemctl status radvd"))
498495

499496

systemvm/debian/opt/cloud/bin/setup/common.sh

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ setup_interface() {
7575
local intf=eth${intfnum}
7676
local bootproto="static"
7777

78+
log_it "Setting up interface: ${intf}"
79+
7880
if [ "$BOOTPROTO" == "dhcp" ]
7981
then
8082
if [ "$intfnum" != "0" ]
@@ -280,8 +282,9 @@ setup_ipv6() {
280282
then
281283
enableradvd=true
282284
setup_interface_ipv6 "0" $ETH0_IP6 $ETH0_IP6_PRELEN
283-
fi
284-
if [ -n "$ETH0_IP6" ] || [ -n "$GUEST_GW6" -a -n "$GUEST_CIDR6_SIZE" ]
285+
rm -rf /etc/radvd.conf
286+
setup_radvd "0" $ETH0_IP6 $ETH0_IP6_PRELEN $enableradvd
287+
elif [ -n "$GUEST_GW6" -a -n "$GUEST_CIDR6_SIZE" ]
285288
then
286289
rm -rf /etc/radvd.conf
287290
setup_radvd "0" $GUEST_GW6 $GUEST_CIDR6_SIZE $enableradvd
@@ -293,6 +296,7 @@ setup_ipv6() {
293296
}
294297

295298
restore_ipv6() {
299+
log_it "Restoring IPv6 configurations with ETH0_IP6=$ETH0_IP6 GUEST_GW6=$GUEST_GW6 GUEST_CIDR6_SIZE=$GUEST_CIDR6_SIZE ETH2_IP6=$ETH2_IP6"
296300
if [ -n "$ETH0_IP6" ] || [ -n "$GUEST_GW6" -a -n "$GUEST_CIDR6_SIZE" ]
297301
then
298302
enable_interface_ipv6 "0" true
@@ -406,15 +410,8 @@ enable_radvd() {
406410
then
407411
log_it "Enabling radvd"
408412
systemctl enable radvd
409-
echo "radvd" >> /var/cache/cloud/enabled_svcs
410-
fi
411-
systemctl -q is-active radvd
412-
status=$?
413-
if [ $status -ne 0 ]
414-
then
415-
log_it "Starting radvd"
416-
systemctl start radvd
417413
fi
414+
grep -q "radvd" /var/cache/cloud/enabled_svcs || echo "radvd" >> /var/cache/cloud/enabled_svcs
418415
}
419416

420417
setup_radvd() {

systemvm/debian/opt/cloud/bin/setup/init.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ set -x
2020
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
2121
CMDLINE=/var/cache/cloud/cmdline
2222

23+
log_it() {
24+
echo "$(date) $@" >> /var/log/cloud.log
25+
log_action_msg "$@"
26+
}
27+
2328
hypervisor() {
2429
if [ -d /proc/xen ]; then
2530
mount -t xenfs none /proc/xen
@@ -214,4 +219,4 @@ log_it "Starting guest services for $HYPERVISOR"
214219

215220
config_guest
216221
source /opt/cloud/bin/setup/common.sh
217-
setup_interface_sshd
222+
setup_interface_sshd

test/integration/smoke/test_network_ipv6.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ def getRouterProcessStatus(self, router, cmd):
845845
cmd,
846846
hypervisor=self.routerDetailsMap[router.id]['hypervisor']
847847
)
848-
self.assertTrue(type(result) == list and len(result) > 0,
848+
self.assertTrue(type(result) == list,
849849
"%s on router %s returned invalid result" % (cmd, router.id))
850850
result = '\n'.join(result)
851851
return result

ui/public/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@
233233
"label.action.migrate.systemvm.processing": "Migrating system VM...",
234234
"label.action.migrate.systemvm.to.ps": "Migrate system VM to another primary storage",
235235
"label.action.patch.systemvm": "Patch system VM",
236+
"label.action.patch.systemvm.vpc": "Patch system VM - VPC Router",
236237
"label.action.patch.systemvm.processing": "Patching system VM....",
237238
"label.action.project.add.account": "Add account to project",
238239
"label.action.project.add.user": "Add user to project",

0 commit comments

Comments
 (0)