Skip to content

Commit 3baa45b

Browse files
committed
forward Merge branch '4.19' into main
2 parents 7342fbd + f4987bf commit 3baa45b

File tree

11 files changed

+205
-94
lines changed

11 files changed

+205
-94
lines changed

engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ enum QualityOfServiceState { MIGRATION, NO_MIGRATION }
4444

4545
void revokeAccess(DataObject dataObject, Host host, DataStore dataStore);
4646

47+
default boolean requiresAccessForMigration(DataObject dataObject) {
48+
return false;
49+
}
50+
4751
/**
4852
* intended for managed storage (cloud.storage_pool.managed = true)
4953
* if not managed, return volume.getSize()

engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ public VolumeInfo getVolume() {
5757

5858
void revokeAccess(DataObject dataObject, Host host, DataStore dataStore);
5959

60+
boolean requiresAccessForMigration(DataObject dataObject, DataStore dataStore);
61+
6062
/**
6163
* Creates the volume based on the given criteria
6264
*

engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1230,8 +1230,8 @@ public void release(long vmId, long hostId) {
12301230
DataStore dataStore = dataStoreMgr.getDataStore(volumeForVm.getPoolId(), DataStoreRole.Primary);
12311231
PrimaryDataStore primaryDataStore = (PrimaryDataStore)dataStore;
12321232

1233-
// This might impact other managed storages, grant access for PowerFlex storage pool only
1234-
if (primaryDataStore.isManaged() && primaryDataStore.getPoolType() == Storage.StoragePoolType.PowerFlex) {
1233+
// This might impact other managed storages, enable requires access for migration in relevant datastore driver (currently enabled for PowerFlex storage pool only)
1234+
if (primaryDataStore.isManaged() && volService.requiresAccessForMigration(volumeInfo, dataStore)) {
12351235
volService.revokeAccess(volumeInfo, host, dataStore);
12361236
}
12371237
}
@@ -1509,8 +1509,8 @@ public void prepareForMigration(VirtualMachineProfile vm, DeployDestination dest
15091509
disk.setDetails(getDetails(volumeInfo, dataStore));
15101510

15111511
PrimaryDataStore primaryDataStore = (PrimaryDataStore)dataStore;
1512-
// This might impact other managed storages, grant access for PowerFlex storage pool only
1513-
if (primaryDataStore.isManaged() && primaryDataStore.getPoolType() == Storage.StoragePoolType.PowerFlex) {
1512+
// This might impact other managed storages, enable requires access for migration in relevant datastore driver (currently enabled for PowerFlex storage pool only)
1513+
if (primaryDataStore.isManaged() && volService.requiresAccessForMigration(volumeInfo, dataStore)) {
15141514
volService.grantAccess(volFactory.getVolume(vol.getId()), dest.getHost(), dataStore);
15151515
}
15161516

engine/schema/src/main/resources/META-INF/db/views/cloud.domain_view.sql

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
-- VIEW `cloud`.`domain_view`;
1919

2020
DROP VIEW IF EXISTS `cloud`.`domain_view`;
21+
2122
CREATE VIEW `cloud`.`domain_view` AS
2223
select
2324
`domain`.`id` AS `id`,

engine/storage/volume/src/main/java/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java

+13
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,19 @@ public void revokeAccess(DataObject dataObject, Host host, DataStore dataStore)
268268
}
269269
}
270270

271+
@Override
272+
public boolean requiresAccessForMigration(DataObject dataObject, DataStore dataStore) {
273+
DataStoreDriver dataStoreDriver = dataStore != null ? dataStore.getDriver() : null;
274+
if (dataStoreDriver == null) {
275+
return false;
276+
}
277+
278+
if (dataStoreDriver instanceof PrimaryDataStoreDriver) {
279+
return ((PrimaryDataStoreDriver)dataStoreDriver).requiresAccessForMigration(dataObject);
280+
}
281+
return false;
282+
}
283+
271284
@Override
272285
public AsyncCallFuture<VolumeApiResult> createVolumeAsync(VolumeInfo volume, DataStore dataStore) {
273286
AsyncCallFuture<VolumeApiResult> future = new AsyncCallFuture<VolumeApiResult>();

plugins/integrations/kubernetes-service/src/main/resources/script/deploy-cloudstack-secret

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ function usage() {
2121
Usage: ./deploy-cloudstack-secret [OPTIONS]...
2222
To deploy the keys needed for the cloudstack kubernetes provider.
2323
Arguments:
24-
-u, --url string ID of the cluster
24+
-u, --url string URL of the CloudStack API
2525
-k, --key string API Key
2626
-s, --secret string Secret Key
2727
-p, --project string Project ID
2828
Other arguments:
2929
-h, --help Display this help message and exit
3030
Examples:
31-
./deploy-cloudstack-secret -u http://localhost:8080 -k abcd -s efgh
31+
./deploy-cloudstack-secret -u http://10.10.10.10:8080/client/api -k abcd -s efgh
3232
USAGE
3333
exit 0
3434
}

plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/driver/ScaleIOPrimaryDataStoreDriver.java

+5
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,11 @@ public String getConnectedSdc(long poolId, long hostId) {
304304
return null;
305305
}
306306

307+
@Override
308+
public boolean requiresAccessForMigration(DataObject dataObject) {
309+
return true;
310+
}
311+
307312
@Override
308313
public long getUsedBytes(StoragePool storagePool) {
309314
long usedSpaceBytes = 0;

ui/public/config.json

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"logo": "assets/logo.svg",
1515
"minilogo": "assets/mini-logo.svg",
1616
"banner": "assets/banner.svg",
17+
"loginPageTitle": "CloudStack",
18+
"loginPageFavicon": "assets/logo.svg",
1719
"error": {
1820
"403": "assets/403.png",
1921
"404": "assets/404.png",

ui/public/index.html

+10-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
<meta charset="utf-8">
2323
<meta http-equiv="X-UA-Compatible" content="IE=edge">
2424
<meta name="viewport" content="width=device-width,initial-scale=1.0">
25-
<link rel="icon" href="<%= BASE_URL %>cloud.ico">
26-
<title>Apache CloudStack</title>
25+
<link id="favicon" rel="icon" href="<%= BASE_URL %>cloud.ico">
26+
<title id="title" >Apache CloudStack</title>
2727
<style>
2828
.loader {
2929
border: 16px solid #F3F3F3;
@@ -54,4 +54,12 @@
5454
<div class="loader"></div>
5555
</div>
5656
</body>
57+
<script type="text/javascript">
58+
fetch('./config.json')
59+
.then(response => response.json())
60+
.then(data => {
61+
document.getElementById("favicon").setAttribute("href", data.loginPageFavicon);
62+
document.getElementById("title").innerHTML = data.loginPageTitle;
63+
}).catch((err) => {});
64+
</script>
5765
</html>

ui/public/locales/en.json

+1
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@
580580
"label.creating.iprange": "Creating IP ranges",
581581
"label.credit": "Credit",
582582
"label.cron": "Cron expression",
583+
"label.cron.mode": "Cron mode",
583584
"label.crosszones": "Cross zones",
584585
"label.currency": "Currency",
585586
"label.current": "Current",

0 commit comments

Comments
 (0)