Skip to content

Commit 61ffcdf

Browse files
committed
Merge branch 'main' of https://github.com/apache/cloudstack into HEAD
2 parents d250210 + 850714c commit 61ffcdf

File tree

1,317 files changed

+44965
-16112
lines changed

Some content is hidden

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

1,317 files changed

+44965
-16112
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ env:
6464
smoke/test_dynamicroles
6565
smoke/test_global_settings
6666
smoke/test_guest_vlan_range
67-
smoke/test_host_annotations
67+
smoke/test_annotations
6868
smoke/test_host_maintenance
6969
smoke/test_hostha_simulator"
7070

@@ -88,6 +88,7 @@ env:
8888
smoke/test_portable_publicip
8989
smoke/test_portforwardingrules
9090
smoke/test_privategw_acl
91+
smoke/test_privategw_acl_ovs_gre
9192
smoke/test_projects
9293
smoke/test_public_ip_range"
9394

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Apache CloudStack [![Build Status](https://travis-ci.org/apache/cloudstack.svg?branch=main)](https://travis-ci.org/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=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)
22

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

@@ -143,5 +143,5 @@ The following provides more details on the included cryptographic software:
143143
* CloudStack makes use of JaSypt cryptographic libraries.
144144
* CloudStack has a system requirement of MySQL, and uses native database encryption functionality.
145145
* CloudStack makes use of the Bouncy Castle general-purpose encryption library.
146-
* CloudStack can optionally interacts with and controls OpenSwan-based VPNs.
146+
* CloudStack can optionally interact with and control OpenSwan-based VPNs.
147147
* CloudStack has a dependency on and makes use of JSch - a java SSH2 implementation.

agent/conf/agent.properties

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ domr.scripts.dir=scripts/network/domr/kvm
9797
# migration will finish quickly. Less than 1 means disabled.
9898
#vm.migrate.pauseafter=0
9999

100+
# Time (in seconds) to wait for VM migrate finish. Less than 1 means disabled.
101+
# If vm migration is not finished in the time, the vm job will be cancelled by libvirt.
102+
# It will be configured by cloudstack management server when cloudstack agent connects.
103+
# please change the global setting 'migratewait' if needed (default value: 3600)
104+
#vm.migrate.wait=0
105+
100106
# Agent hooks is the way to override default agent behavior to extend the functionality without excessive coding
101107
# for a custom deployment. The first hook promoted is libvirt-vm-xml-transformer which allows provider to modify
102108
# VM XML specification before send to libvirt. Hooks are implemented in Groovy and must be implemented in the way
@@ -270,3 +276,12 @@ iscsi.session.cleanup.enabled=false
270276
# This parameter specifies the heartbeat update timeout in ms; The default value is 60000ms (1 min).
271277
# Depending on the use case, this timeout might need increasing/decreasing.
272278
# heartbeat.update.timeout=60000
279+
280+
# This parameter specifies the timeout in seconds to retrieve the target's domain id when migrating a VM with KVM.
281+
# vm.migrate.domain.retrieve.timeout=10
282+
283+
# This parameter specifies if the host must be rebooted when something goes wrong with the heartbeat.
284+
# reboot.host.and.alert.management.on.heartbeat.timeout=true
285+
286+
# Enable manually setting CPU's topology on KVM's VM.
287+
# enable.manually.setting.cpu.topology.on.kvm.vm=true

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.16.0.0-SNAPSHOT</version>
27+
<version>4.17.0.0-SNAPSHOT</version>
2828
</parent>
2929
<dependencies>
3030
<dependency>

agent/src/main/java/com/cloud/agent/Agent.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import org.apache.cloudstack.utils.security.KeyStoreUtils;
5252
import org.apache.commons.collections.CollectionUtils;
5353
import org.apache.commons.io.FileUtils;
54+
import org.apache.commons.lang3.StringUtils;
5455
import org.apache.log4j.Logger;
5556
import org.apache.log4j.MDC;
5657

@@ -72,7 +73,6 @@
7273
import com.cloud.host.Host;
7374
import com.cloud.resource.ServerResource;
7475
import com.cloud.utils.PropertiesUtil;
75-
import com.cloud.utils.StringUtils;
7676
import com.cloud.utils.backoff.BackoffAlgorithm;
7777
import com.cloud.utils.concurrency.NamedThreadFactory;
7878
import com.cloud.utils.exception.CloudRuntimeException;
@@ -85,7 +85,6 @@
8585
import com.cloud.utils.nio.Task;
8686
import com.cloud.utils.script.OutputInterpreter;
8787
import com.cloud.utils.script.Script;
88-
import com.google.common.base.Strings;
8988

9089
/**
9190
* @config
@@ -715,7 +714,7 @@ public Answer setupAgentKeystore(final SetupKeyStoreCommand cmd) {
715714
final String csrFile = agentFile.getParent() + "/" + KeyStoreUtils.CSR_FILENAME;
716715

717716
String storedPassword = _shell.getPersistentProperty(null, KeyStoreUtils.KS_PASSPHRASE_PROPERTY);
718-
if (Strings.isNullOrEmpty(storedPassword)) {
717+
if (StringUtils.isEmpty(storedPassword)) {
719718
storedPassword = keyStorePassword;
720719
_shell.setPersistentProperty(null, KeyStoreUtils.KS_PASSPHRASE_PROPERTY, storedPassword);
721720
}
@@ -782,9 +781,9 @@ private Answer setupAgentCertificate(final SetupCertificateCommand cmd) {
782781
}
783782

784783
private void processManagementServerList(final List<String> msList, final String lbAlgorithm, final Long lbCheckInterval) {
785-
if (CollectionUtils.isNotEmpty(msList) && !Strings.isNullOrEmpty(lbAlgorithm)) {
784+
if (CollectionUtils.isNotEmpty(msList) && StringUtils.isNotEmpty(lbAlgorithm)) {
786785
try {
787-
final String newMSHosts = String.format("%s%s%s", StringUtils.toCSVList(msList), IAgentShell.hostLbAlgorithmSeparator, lbAlgorithm);
786+
final String newMSHosts = String.format("%s%s%s", com.cloud.utils.StringUtils.toCSVList(msList), IAgentShell.hostLbAlgorithmSeparator, lbAlgorithm);
788787
_shell.setPersistentProperty(null, "host", newMSHosts);
789788
_shell.setHosts(newMSHosts);
790789
_shell.resetHostCounter();

agent/src/main/java/com/cloud/agent/AgentShell.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.apache.commons.daemon.DaemonContext;
3737
import org.apache.commons.daemon.DaemonInitException;
3838
import org.apache.commons.lang.math.NumberUtils;
39+
import org.apache.commons.lang3.StringUtils;
3940
import org.apache.log4j.Logger;
4041
import org.apache.log4j.xml.DOMConfigurator;
4142

@@ -50,7 +51,6 @@
5051
import com.cloud.utils.backoff.BackoffAlgorithm;
5152
import com.cloud.utils.backoff.impl.ConstantTimeBackoff;
5253
import com.cloud.utils.exception.CloudRuntimeException;
53-
import com.google.common.base.Strings;
5454

5555
public class AgentShell implements IAgentShell, Daemon {
5656
private static final Logger s_logger = Logger.getLogger(AgentShell.class.getName());
@@ -155,7 +155,7 @@ public String[] getHosts() {
155155

156156
@Override
157157
public void setHosts(final String host) {
158-
if (!Strings.isNullOrEmpty(host)) {
158+
if (StringUtils.isNotEmpty(host)) {
159159
_host = host.split(hostLbAlgorithmSeparator)[0];
160160
resetHostCounter();
161161
}
@@ -333,7 +333,7 @@ protected boolean parseCommand(final String[] args) throws ConfigurationExceptio
333333
}
334334

335335
String val = getProperty(null, preferredHostIntervalKey);
336-
preferredHostCheckInterval = (Strings.isNullOrEmpty(val) ? null : Long.valueOf(val));
336+
preferredHostCheckInterval = StringUtils.isEmpty(val) ? null : Long.valueOf(val);
337337

338338
return true;
339339
}

agent/src/main/java/com/cloud/agent/direct/download/DirectTemplateDownloaderImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import com.cloud.utils.exception.CloudRuntimeException;
2222
import org.apache.cloudstack.utils.security.DigestHelper;
23-
import org.apache.commons.lang.StringUtils;
23+
import org.apache.commons.lang3.StringUtils;
2424
import org.apache.log4j.Logger;
2525

2626
import java.io.File;

agent/src/main/java/com/cloud/agent/direct/download/MetalinkDirectTemplateDownloader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import com.cloud.utils.UriUtils;
2323
import com.cloud.utils.exception.CloudRuntimeException;
2424
import org.apache.commons.collections.CollectionUtils;
25-
import org.apache.commons.lang.StringUtils;
25+
import org.apache.commons.lang3.StringUtils;
2626
import org.apache.log4j.Logger;
2727

2828
import java.io.File;

agent/src/main/java/com/cloud/agent/properties/AgentProperties.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,31 @@ public class AgentProperties{
2929
* Heartbeat update timeout. <br>
3030
* Data type: int. <br>
3131
* Default value: 60000 (ms).
32-
*/
32+
*/
3333
public static final Property<Integer> HEARTBEAT_UPDATE_TIMEOUT = new Property<Integer>("heartbeat.update.timeout", 60000);
3434

35+
/**
36+
* The timeout in seconds to retrieve the target's domain id when migrating a VM with KVM. <br>
37+
* Data type: int. <br>
38+
* Default value: 10 (sec).
39+
*/
40+
public static final Property<Integer> VM_MIGRATE_DOMAIN_RETRIEVE_TIMEOUT = new Property<Integer>("vm.migrate.domain.retrieve.timeout", 10);
41+
42+
/**
43+
* Reboot host and alert management on heartbeat timeout. <br>
44+
* Data type: boolean.<br>
45+
* Default value: true.
46+
*/
47+
public static final Property<Boolean> REBOOT_HOST_AND_ALERT_MANAGEMENT_ON_HEARTBEAT_TIMEOUT
48+
= new Property<Boolean>("reboot.host.and.alert.management.on.heartbeat.timeout", true);
49+
50+
/**
51+
* Enable manually setting CPU's topology on KVM's VM. <br>
52+
* Data type: boolean.<br>
53+
* Default value: true.
54+
*/
55+
public static final Property<Boolean> ENABLE_MANUALLY_SETTING_CPU_TOPOLOGY_ON_KVM_VM = new Property<Boolean>("enable.manually.setting.cpu.topology.on.kvm.vm", true);
56+
3557
public static class Property <T>{
3658
private final String name;
3759
private final T defaultValue;

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.16.0.0-SNAPSHOT</version>
27+
<version>4.17.0.0-SNAPSHOT</version>
2828
</parent>
2929
<dependencies>
3030
<dependency>

0 commit comments

Comments
 (0)