Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d03e678
[CSTACKEX-204] ASUP Changes
Jun 24, 2026
f7eaa06
[CSTACKEX-204] ASUP Changes
Jun 24, 2026
2fe944d
[CSTACKEX-204] ASUP Changes
Jun 24, 2026
dbd3aaa
[CSTACKEX-204] ASUP Changes
Jun 29, 2026
adbee7c
[CSTACKEX-204] ASUP Changes
Jun 29, 2026
4403adc
[CSTACKEX-204] ASUP Changes
Jun 30, 2026
d1887ba
[CSTACKEX-204] ASUP Changes
Jun 30, 2026
76c9694
[CSTACKEX-204] ASUP Changes
Jun 30, 2026
2756ba1
[CSTACKEX-204] ASUP Changes
Jun 30, 2026
f183d56
[CSTACKEX-204] ASUP Changes with restart
Jun 30, 2026
cb6184a
[CSTACKEX-204] ASUP Changes without restart
Jun 30, 2026
e3c0d29
[CSTACKEX-204] ASUP Changes without restart
Jun 30, 2026
6d9d70d
[CSTACKEX-204] Added Snapshot in ASUP
Aug 21, 2026
a232f04
[CSTACKEX-204] Added Validation check for ASUP
Aug 24, 2026
0bb8a87
[CSTACKEX-204] Testing Fixes ASUP
Aug 24, 2026
66f37bd
[CSTACKEX-204] Testing Fixes ASUP
Aug 24, 2026
e923734
[CSTACKEX-204] Testing Fixes ASUP
Aug 24, 2026
6717ada
[CSTACKEX-204] Duration Changes
Aug 24, 2026
6d1948e
[CSTACKEX-204] Added Pool Status and config description change
Sep 1, 2026
1b60e73
[CSTACKEX-204] Changes for demo
Sep 1, 2026
0fcfddc
[CSTACKEX-204] Changes for demo in polling job
Sep 1, 2026
87adeab
[CSTACKEX-204] Changes for demo in polling job
Sep 1, 2026
a6237fa
[CSTACKEX-204] Resolved Review Comments
Sep 3, 2026
17f28a9
[CSTACKEX-204] Testing Changes
Sep 3, 2026
73ad1be
[CSTACKEX-204] Fix issue for asup push delay
Sep 6, 2026
dcaf134
[CSTACKEX-204] Change the min frequency to 3 hours
Sep 6, 2026
5274c53
[CSTACKEX-204] Change sec to hours in UI
Sep 6, 2026
a945023
[CSTACKEX-204] Change sec to hours in UI
Sep 6, 2026
060126d
[CSTACKEX-204] Change the frequency min limit to 3 hours
Sep 6, 2026
504c4c7
[CSTACKEX-204] Address Review Comments
Sep 7, 2026
96287c6
[CSTACKEX-204] Address Review Comments
Sep 7, 2026
0723620
[CSTACKEX-204] Fix build issues
Sep 7, 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