From b5c5d1966606f8ce37d4c5ced9dbe654e26ffbef Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Thu, 23 Mar 2023 16:33:32 +0100 Subject: [PATCH 1/5] removed vulnerable workflow --- .github/workflows/coverage-check.yml | 94 ---------------------------- 1 file changed, 94 deletions(-) delete mode 100644 .github/workflows/coverage-check.yml diff --git a/.github/workflows/coverage-check.yml b/.github/workflows/coverage-check.yml deleted file mode 100644 index 0a51702f11f..00000000000 --- a/.github/workflows/coverage-check.yml +++ /dev/null @@ -1,94 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -name: PR Quality Check - -on: [pull_request_target] - -jobs: - build: - name: JaCoCo Coverage - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: "refs/pull/${{ github.event.number }}/merge" - fetch-depth: 0 - - - name: Changed UI Files - id: ui-changes - uses: tj-actions/changed-files@a59f800cbb60ed483623848e31be67659a2940f8 - with: - sha: "${{ github.pull_request.sha }}" - base_sha: "${{ github.sha }}" - files: | - ui/* - - - name: Kick UI Build - uses: peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32 - if: steps.ui-changes.outputs.any_changed == 'true' - with: - token: ${{ secrets.ACS_ROBOT_TOKEN }} - issue-number: ${{ github.event.pull_request.number }} - body: | - Found UI changes, kicking a new UI QA build - @blueorangutan ui - - - name: Changed Java Files - id: java-changes - uses: tj-actions/changed-files@a59f800cbb60ed483623848e31be67659a2940f8 - with: - sha: "${{ github.pull_request.sha }}" - base_sha: "${{ github.sha }}" - files: | - **/*.java - **/*.xml - - - name: Set up JDK11 - uses: actions/setup-java@v3 - if: steps.java-changes.outputs.any_changed == 'true' - with: - distribution: 'temurin' - java-version: '11' - cache: 'maven' - - - name: Cache SonarCloud packages - uses: actions/cache@v3 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-m2 - - - name: Run Build and Tests with Coverage - id: coverage - if: steps.java-changes.outputs.any_changed == 'true' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - PR_ID: ${{ github.event.pull_request.number }} - run: | - git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss - cd nonoss && bash -x install-non-oss.sh && cd .. - 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 From cfee78e07c1c5631b11efcd5d0e6bdf0e14862fd Mon Sep 17 00:00:00 2001 From: Harikrishna Date: Fri, 24 Mar 2023 12:05:45 +0530 Subject: [PATCH 2/5] ui: Added UEFI support flag in host details view (#7361) --- ui/public/locales/en.json | 1 + ui/src/views/infra/HostInfo.vue | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index 17532b36a47..a55455823a7 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -1794,6 +1794,7 @@ "label.srx": "SRX", "label.srx.firewall": "Juniper SRX firewall", "label.ssh.key.pairs": "SSH key pairs", +"label.uefi.supported": "UEFI supported", "label.userdataid": "Userdata ID", "label.userdataname": "Userdata name", "label.userdatadetails": "Userdata details", diff --git a/ui/src/views/infra/HostInfo.vue b/ui/src/views/infra/HostInfo.vue index a74407be7df..1d0b47eba95 100644 --- a/ui/src/views/infra/HostInfo.vue +++ b/ui/src/views/infra/HostInfo.vue @@ -104,7 +104,14 @@ - + +
+ {{ $t('label.uefi.supported') }} +
+ {{ host.ueficapability }} +
+
+
From 9e1c7a2a90dd5481d7d45d1fd6b9bee573f2afa1 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Tue, 28 Mar 2023 09:23:01 +0200 Subject: [PATCH 3/5] UI: fix default network is not passed to deployvm API (#7367) This line was changed in #5080, but reverted in #5151 --- ui/src/views/compute/DeployVM.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index 02f257a13c5..f0373999bf0 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -1634,7 +1634,7 @@ export default { this.form.networkids = ids }, updateDefaultNetworks (id) { - this.defaultNetwork = id + this.defaultnetworkid = id this.form.defaultnetworkid = id }, updateNetworkConfig (networks) { From 17b86316155ff6598643bfae7eda4e8f36d856b6 Mon Sep 17 00:00:00 2001 From: kishankavala Date: Wed, 29 Mar 2023 18:16:39 +0530 Subject: [PATCH 4/5] Add service ip to listManagementServers API response (#7374) --- .../java/org/apache/cloudstack/api/ApiConstants.java | 1 + .../api/response/ManagementServerResponse.java | 12 ++++++++++++ .../java/com/cloud/api/query/QueryManagerImpl.java | 1 + 3 files changed, 14 insertions(+) diff --git a/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java b/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java index 2b77b9b0b0d..9f0418a8d9c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java @@ -384,6 +384,7 @@ public class ApiConstants { public static final String SENT = "sent"; public static final String SENT_BYTES = "sentbytes"; public static final String SERIAL = "serial"; + public static final String SERVICE_IP = "serviceip"; public static final String SERVICE_OFFERING_ID = "serviceofferingid"; public static final String SESSIONKEY = "sessionkey"; public static final String SHOW_CAPACITIES = "showcapacities"; diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ManagementServerResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ManagementServerResponse.java index 0289e8f9e3b..330f91e69f3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ManagementServerResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ManagementServerResponse.java @@ -72,6 +72,10 @@ public class ManagementServerResponse extends BaseResponse { @Param(description = "the running OS kernel version for this Management Server") private String kernelVersion; + @SerializedName(ApiConstants.SERVICE_IP) + @Param(description = "the IP Address for this Management Server") + private String serviceIp; + public String getId() { return this.id; } @@ -112,6 +116,10 @@ public class ManagementServerResponse extends BaseResponse { return lastBoot; } + public String getServiceIp() { + return serviceIp; + } + public void setId(String id) { this.id = id; } @@ -155,4 +163,8 @@ public class ManagementServerResponse extends BaseResponse { public void setKernelVersion(String kernelVersion) { this.kernelVersion = kernelVersion; } + + public void setServiceIp(String serviceIp) { + this.serviceIp = serviceIp; + } } diff --git a/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java b/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java index 047c6b5b69f..211e6db19c0 100644 --- a/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java @@ -4444,6 +4444,7 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q mgmtResponse.setLastServerStart(mgmt.getLastJvmStart()); mgmtResponse.setLastServerStop(mgmt.getLastJvmStop()); mgmtResponse.setLastBoot(mgmt.getLastSystemBoot()); + mgmtResponse.setServiceIp(mgmt.getServiceIP()); mgmtResponse.setObjectName("managementserver"); return mgmtResponse; } From 9fb20056d552a5495c85e0aedd5cb23c84bcf452 Mon Sep 17 00:00:00 2001 From: Harikrishna Date: Wed, 29 Mar 2023 20:44:18 +0530 Subject: [PATCH 5/5] Fixed avoid set variables which is causing deployment failures (#7372) --- .../deploy/DeploymentPlanningManagerImpl.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java index 1c3c59bcf30..d854b1a5a40 100644 --- a/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java +++ b/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java @@ -1576,11 +1576,11 @@ StateListener, Configurable { // for each volume find list of suitable storage pools by calling the // allocators - Set originalAvoidPoolSet = avoid.getPoolsToAvoid(); - if (originalAvoidPoolSet == null) { - originalAvoidPoolSet = new HashSet(); + Set originalAvoidPoolSet = new HashSet<>(); + if (avoid.getPoolsToAvoid() != null) { + originalAvoidPoolSet.addAll(avoid.getPoolsToAvoid()); } - Set poolsToAvoidOutput = new HashSet(originalAvoidPoolSet); + Set poolsToAvoidOutput = new HashSet<>(originalAvoidPoolSet); for (VolumeVO toBeCreated : volumesTobeCreated) { s_logger.debug("Checking suitable pools for volume (Id, Type): (" + toBeCreated.getId() + "," + toBeCreated.getVolumeType().name() + ")"); @@ -1657,12 +1657,6 @@ StateListener, Configurable { DiskOfferingVO diskOffering = _diskOfferingDao.findById(toBeCreated.getDiskOfferingId()); - //FR123 check how is it different for service offering getTagsArray and disk offering's - //if ((vmProfile.getTemplate().getFormat() == Storage.ImageFormat.ISO || toBeCreated.getVolumeType() == Volume.Type.ROOT) - // && vmProfile.getServiceOffering().getTagsArray().length != 0) { - // diskOffering.setTagsArray(Arrays.asList(vmProfile.getServiceOffering().getTagsArray())); - //} - DiskProfile diskProfile = new DiskProfile(toBeCreated, diskOffering, vmProfile.getHypervisorType()); boolean useLocalStorage = false; if (vmProfile.getType() != VirtualMachine.Type.User) {