Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5613fc3
[CSTACKEX-204] ASUP Changes
Jun 24, 2026
6899081
[CSTACKEX-204] ASUP Changes
Jun 24, 2026
dc1ad17
[CSTACKEX-204] ASUP Changes
Jun 24, 2026
48b0ba4
[CSTACKEX-204] ASUP Changes
Jun 29, 2026
5dc5a26
[CSTACKEX-204] ASUP Changes
Jun 29, 2026
348125a
[CSTACKEX-204] ASUP Changes
Jun 30, 2026
eb68827
[CSTACKEX-204] ASUP Changes
Jun 30, 2026
9bbf366
[CSTACKEX-204] ASUP Changes
Jun 30, 2026
2c268ee
[CSTACKEX-204] ASUP Changes
Jun 30, 2026
5987864
[CSTACKEX-204] ASUP Changes with restart
Jun 30, 2026
8d9135c
[CSTACKEX-204] ASUP Changes without restart
Jun 30, 2026
76af1ca
[CSTACKEX-204] ASUP Changes without restart
Jun 30, 2026
6ab6512
[CSTACKEX-204] Added Snapshot in ASUP
Aug 21, 2026
fea7eec
[CSTACKEX-204] Added Validation check for ASUP
Aug 24, 2026
5b7091e
[CSTACKEX-204] Testing Fixes ASUP
Aug 24, 2026
06345ce
[CSTACKEX-204] Testing Fixes ASUP
Aug 24, 2026
0807e5d
[CSTACKEX-204] Testing Fixes ASUP
Aug 24, 2026
dd9b315
[CSTACKEX-204] Duration Changes
Aug 24, 2026
9c0b6e9
[CSTACKEX-204] Added Pool Status and config description change
Sep 1, 2026
62d79ce
[CSTACKEX-204] Changes for demo
Sep 1, 2026
6f0a9e2
[CSTACKEX-204] Changes for demo in polling job
Sep 1, 2026
a3b095a
[CSTACKEX-204] Changes for demo in polling job
Sep 1, 2026
bc794b3
[CSTACKEX-204] Resolved Review Comments
Sep 3, 2026
120751d
[CSTACKEX-204] Testing Changes
Sep 3, 2026
7cf95a0
[CSTACKEX-204] Fix issue for asup push delay
Sep 6, 2026
da71fd7
[CSTACKEX-204] Change the min frequency to 3 hours
Sep 6, 2026
73f8041
[CSTACKEX-204] Change sec to hours in UI
Sep 6, 2026
7a52467
[CSTACKEX-204] Change sec to hours in UI
Sep 6, 2026
9942414
[CSTACKEX-204] Change the frequency min limit to 3 hours
Sep 6, 2026
04a2c70
[CSTACKEX-204] Address Review Comments
Sep 7, 2026
4deb256
[CSTACKEX-204] Address Review Comments
Sep 7, 2026
8edc8f1
[CSTACKEX-204] Fix build issues
Sep 7, 2026
4973282
[CSTACKEX-204] Fix snapshot issue where VM is snap across pools
Sep 8, 2026
7917134
[CSTACKEX-204] Clarify ASUP interval range as hours and 1 week
Sep 10, 2026
5e1115c
[CSTACKEX-204] Add Cluster Model also in event 0
Sep 11, 2026
56243bf
[CSTACKEX-204] Add Cluster Model also in event 0
Sep 11, 2026
f65abc8
[CSTACKEX-204] Add Cluster Platform Type also
Sep 12, 2026
56cdd78
[CSTACKEX-204] Add Cluster Platform Type also
Sep 12, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ public interface VolumeDao extends GenericDao<VolumeVO, Long>, StateDao<Volume.S

boolean existsWithKmsKey(long kmsKeyId);

/**
* Returns true if any VM with a non-destroyed ROOT volume on {@code poolId} also has a
* non-destroyed DATADISK on a different primary storage pool. Existence check only
* ({@code LIMIT 1}); does not load volumes into memory.
*/
boolean hasMultiPrimaryStoragePoolVm(long poolId);

/**
* Retrieves volume by its externalId
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
protected static final String SELECT_HYPERTYPE_FROM_CLUSTER_VOLUME = "SELECT c.hypervisor_type from volumes v, storage_pool s, cluster c where v.pool_id = s.id and s.cluster_id = c.id and v.id = ?";
protected static final String SELECT_HYPERTYPE_FROM_ZONE_VOLUME = "SELECT s.hypervisor from volumes v, storage_pool s where v.pool_id = s.id and v.id = ?";
protected static final String SELECT_POOLSCOPE = "SELECT s.scope from storage_pool s, volumes v where s.id = v.pool_id and v.id = ?";
// Looks for a VM whose root disk is on this pool and whose data disk is on another pool.
// LIMIT 1 stops after the first match so we do not load all volumes.
private static final String HAS_MULTI_PRIMARY_STORAGE_POOL_VM =
Comment thread
suryag1201 marked this conversation as resolved.
"SELECT 1 FROM volumes root INNER JOIN volumes data ON data.instance_id = root.instance_id "
+ "WHERE root.pool_id = ? AND root.volume_type = 'ROOT' AND root.instance_id IS NOT NULL "
+ "AND root.removed IS NULL AND root.state NOT IN ('Destroy', 'Expunged') "
+ "AND data.volume_type = 'DATADISK' AND data.pool_id IS NOT NULL AND data.pool_id <> ? "
+ "AND data.removed IS NULL AND data.state NOT IN ('Destroy', 'Expunged') LIMIT 1";

private static final String ORDER_POOLS_NUMBER_OF_VOLUMES_FOR_ACCOUNT_PART1 = "SELECT pool.id, SUM(IF(vol.state='Ready' AND vol.account_id = ?, 1, 0)) FROM `cloud`.`storage_pool` pool LEFT JOIN `cloud`.`volumes` vol ON pool.id = vol.pool_id WHERE pool.data_center_id = ? ";
private static final String ORDER_POOLS_NUMBER_OF_VOLUMES_FOR_ACCOUNT_PART2 = " GROUP BY pool.id ORDER BY 2 ASC ";
Expand Down Expand Up @@ -998,6 +1006,21 @@ public boolean existsWithKmsKey(long kmsKeyId) {
return findOneBy(sc) != null;
}

@Override
@DB
public boolean hasMultiPrimaryStoragePoolVm(long poolId) {
TransactionLegacy txn = TransactionLegacy.currentTxn();
try (PreparedStatement pstmt = txn.prepareAutoCloseStatement(HAS_MULTI_PRIMARY_STORAGE_POOL_VM)) {
pstmt.setLong(1, poolId);
pstmt.setLong(2, poolId);
try (ResultSet rs = pstmt.executeQuery()) {
return rs.next();
}
} catch (SQLException e) {
throw new CloudRuntimeException("DB Exception on: " + HAS_MULTI_PRIMARY_STORAGE_POOL_VM, e);
}
}

public VolumeVO findByExternalUuid(String externalUuid) {
SearchCriteria<VolumeVO> sc = ExternalUuidSearch.create();
sc.setParameters("externalUuid", externalUuid);
Expand Down
5 changes: 5 additions & 0 deletions plugins/storage/volume/ontap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
<artifactId>cloud-engine-storage-volume</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-framework-cluster</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
Expand Down
Loading
Loading