Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions 3 agent/conf/agent.properties
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ iscsi.session.cleanup.enabled=false
# Depending on the use case, this timeout might need increasing/decreasing.
# heartbeat.update.timeout=60000

# This parameter specifies the timeout in seconds to retrieve the target's domain id when migrating a VM with KVM.
# vm.migrate.domain.retrieve.timeout=10

# This parameter specifies if the host must be rebooted when something goes wrong with the heartbeat.
# reboot.host.and.alert.management.on.heartbeat.timeout=true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,16 @@ public class AgentProperties{
* Heartbeat update timeout. <br>
* Data type: int. <br>
* Default value: 60000 (ms).
*/
*/
public static final Property<Integer> HEARTBEAT_UPDATE_TIMEOUT = new Property<Integer>("heartbeat.update.timeout", 60000);

/**
* The timeout in seconds to retrieve the target's domain id when migrating a VM with KVM. <br>
* Data type: int. <br>
* Default value: 10 (sec).
*/
public static final Property<Integer> VM_MIGRATE_DOMAIN_RETRIEVE_TIMEOUT = new Property<Integer>("vm.migrate.domain.retrieve.timeout", 10);

/**
* Reboot host and alert management on heartbeat timeout. <br>
* Data type: boolean.<br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
import com.cloud.agent.api.MigrateCommand;
import com.cloud.agent.api.MigrateCommand.MigrateDiskInfo;
import com.cloud.agent.api.to.VirtualMachineTO;
import com.cloud.agent.properties.AgentProperties;
import com.cloud.agent.properties.AgentPropertiesFileHandler;
import com.cloud.hypervisor.kvm.resource.LibvirtComputingResource;
import com.cloud.hypervisor.kvm.resource.LibvirtConnection;
import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef;
Expand Down Expand Up @@ -239,7 +241,7 @@ Use VIR_DOMAIN_XML_SECURE (value = 1) prior to v1.0.0.
}
s_logger.info("Migration thread for " + vmName + " is done");

destDomain = migrateThread.get(10, TimeUnit.SECONDS);
destDomain = migrateThread.get(AgentPropertiesFileHandler.getPropertyValue(AgentProperties.VM_MIGRATE_DOMAIN_RETRIEVE_TIMEOUT), TimeUnit.SECONDS);

if (destDomain != null) {
deleteOrDisconnectDisksOnSourcePool(libvirtComputingResource, migrateDiskInfoList, disks);
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.