Skip to content

Commit 25bbeac

Browse files
committed
Set timeout in RunCustomActionCommand
1 parent 1489c0b commit 25bbeac

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ CREATE TABLE IF NOT EXISTS `cloud`.`extension_custom_action` (
268268
`success_message` varchar(4096),
269269
`error_message` varchar(4096),
270270
`enabled` boolean DEFAULT true,
271-
`timeout` int unsigned NOT NULL DEFAULT '3' COMMENT 'The timeout in seconds to wait for the action to complete before failing',
271+
`timeout` int unsigned NOT NULL DEFAULT '5' COMMENT 'The timeout in seconds to wait for the action to complete before failing',
272272
`created` datetime NOT NULL,
273273
`removed` datetime DEFAULT NULL,
274274
PRIMARY KEY (`id`),

framework/extensions/src/main/java/org/apache/cloudstack/framework/extensions/api/AddCustomActionCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public class AddCustomActionCmd extends BaseCmd {
8989

9090
@Parameter(name = ApiConstants.TIMEOUT,
9191
type = CommandType.INTEGER,
92-
description = "Specifies the timeout in seconds to wait for the action to complete before failing. Default value is 3 seconds")
92+
description = "Specifies the timeout in seconds to wait for the action to complete before failing. Default value is 5 seconds")
9393
private Integer timeout;
9494

9595
@Parameter(name = ApiConstants.ENABLED,

framework/extensions/src/main/java/org/apache/cloudstack/framework/extensions/manager/ExtensionsManagerImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,6 +1345,7 @@ public CustomActionResultResponse runCustomAction(RunCustomActionCmd cmd) {
13451345
getExternalAccessDetails(allDetails.first(), hostId, extensionResource);
13461346
runCustomActionCommand.setParameters(parameters);
13471347
runCustomActionCommand.setExternalDetails(externalDetails);
1348+
runCustomActionCommand.setWait(customActionVO.getTimeout());
13481349
try {
13491350
logger.info("Running custom action: {}", GsonHelper.getGson().toJson(runCustomActionCommand));
13501351
Answer answer = agentMgr.send(hostId, runCustomActionCommand);

ui/src/views/extension/AddCustomAction.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export default {
173173
this.formRef = ref()
174174
this.form = reactive({
175175
enabled: true,
176-
timeout: 3
176+
timeout: 5
177177
})
178178
this.rules = reactive({
179179
extensionid: [{ required: true, message: `${this.$t('message.error.select')}` }],

0 commit comments

Comments
 (0)