This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push:
new 8db065a14eb limit iso filename to have 251 chars at max (#12430)
8db065a14eb is described below
commit 8db065a14eb41bab0fb3420e66ee96722f1ed6ad
Author: Manoj Kumar <[email protected]>
AuthorDate: Fri Jan 23 21:04:52 2026 +0530
limit iso filename to have 251 chars at max (#12430)
---
.../cloudstack/api/BaseUpdateTemplateOrIsoCmd.java | 2 +-
.../api/command/user/iso/RegisterIsoCmd.java | 2 +-
.../com/cloud/upgrade/DatabaseUpgradeChecker.java | 2 +
.../com/cloud/upgrade/dao/Upgrade42020to42030.java | 64 ++++++++++++++++++++++
.../resources/META-INF/db/schema-42020to42030.sql | 22 ++++++++
5 files changed, 90 insertions(+), 2 deletions(-)
diff --git
a/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java
b/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java
index 38cf765dd1a..696a500860e 100644
---
a/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java
+++
b/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java
@@ -42,7 +42,7 @@ public abstract class BaseUpdateTemplateOrIsoCmd extends
BaseCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType =
TemplateResponse.class, required = true, description = "The ID of the image
file")
private Long id;
- @Parameter(name = ApiConstants.NAME, type = CommandType.STRING,
description = "The name of the image file")
+ @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, length =
251, description = "The name of the image file")
private String templateName;
@Parameter(name = ApiConstants.OS_TYPE_ID,
diff --git
a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java
b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java
index f499c01ce58..2de0f96f271 100644
---
a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java
+++
b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java
@@ -70,7 +70,7 @@ public class RegisterIsoCmd extends BaseCmd implements
UserCmd {
@Parameter(name = ApiConstants.IS_EXTRACTABLE, type = CommandType.BOOLEAN,
description = "True if the ISO or its derivatives are extractable; default is
false")
private Boolean extractable;
- @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required =
true, description = "The name of the ISO")
+ @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required =
true, length = 251, description = "The name of the ISO")
private String isoName;
@Parameter(name = ApiConstants.OS_TYPE_ID,
diff --git
a/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java
b/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java
index afb7a8d69e6..a8a166fbf27 100644
--- a/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java
+++ b/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java
@@ -33,6 +33,7 @@ import java.util.List;
import javax.inject.Inject;
+import com.cloud.upgrade.dao.Upgrade42020to42030;
import com.cloud.utils.FileUtil;
import org.apache.cloudstack.utils.CloudStackVersion;
import org.apache.commons.lang3.StringUtils;
@@ -236,6 +237,7 @@ public class DatabaseUpgradeChecker implements
SystemIntegrityChecker {
.next("4.19.0.0", new Upgrade41900to41910())
.next("4.19.1.0", new Upgrade41910to42000())
.next("4.20.0.0", new Upgrade42000to42010())
+ .next("4.20.2.0", new Upgrade42020to42030())
.build();
}
diff --git
a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42020to42030.java
b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42020to42030.java
new file mode 100644
index 00000000000..68100e16401
--- /dev/null
+++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42020to42030.java
@@ -0,0 +1,64 @@
+// 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.
+package com.cloud.upgrade.dao;
+
+import java.io.InputStream;
+import java.sql.Connection;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+
+public class Upgrade42020to42030 extends DbUpgradeAbstractImpl implements
DbUpgrade, DbUpgradeSystemVmTemplate {
+
+ @Override
+ public String[] getUpgradableVersionRange() {
+ return new String[]{"4.20.2.0", "4.20.3.0"};
+ }
+
+ @Override
+ public String getUpgradedVersion() {
+ return "4.20.3.0";
+ }
+
+ @Override
+ public boolean supportsRollingUpgrade() {
+ return false;
+ }
+
+ @Override
+ public InputStream[] getPrepareScripts() {
+ final String scriptFile = "META-INF/db/schema-42020to42030.sql";
+ final InputStream script =
Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptFile);
+ if (script == null) {
+ throw new CloudRuntimeException("Unable to find " + scriptFile);
+ }
+
+ return new InputStream[] {script};
+ }
+
+ @Override
+ public void performDataMigration(Connection conn) {
+ }
+
+ @Override
+ public InputStream[] getCleanupScripts() {
+ return null;
+ }
+
+ @Override
+ public void updateSystemVmTemplates(Connection conn) {
+ }
+}
diff --git
a/engine/schema/src/main/resources/META-INF/db/schema-42020to42030.sql
b/engine/schema/src/main/resources/META-INF/db/schema-42020to42030.sql
new file mode 100644
index 00000000000..598fdb7adc4
--- /dev/null
+++ b/engine/schema/src/main/resources/META-INF/db/schema-42020to42030.sql
@@ -0,0 +1,22 @@
+-- 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.
+
+--;
+-- Schema upgrade from 4.20.2.0 to 4.20.3.0
+--;
+
+ALTER TABLE `cloud`.`template_store_ref` MODIFY COLUMN `download_url`
varchar(2048);