Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
MAJOR=4
MINOR=8
UPDATE=38
UPDATE=38-Elitery
Empty file.
8 changes: 8 additions & 0 deletions conf/globalConfig/ceph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
<type>java.lang.Long</type>
</config>

<config>
<name>imageCache.poolStrategy</name>
<description>strategy to select ceph image cache pool when preparing root volume image cache.</description>
<category>ceph</category>
<defaultValue>DefaultImageCachePool</defaultValue>
<type>java.lang.String</type>
</config>

<config>
<name>trash.cleanup.interval</name>
<description>interval to cleanup image trash on primary storage, in seconds.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class DownloadVolumeTemplateToPrimaryStorageMsg extends NeedReplyMessage
private String primaryStorageUuid;
private ImageSpec templateSpec;
private String hostUuid;
private String targetVolumeInstallUrl;

@Override
public String getPrimaryStorageUuid() {
Expand All @@ -32,4 +33,12 @@ public String getHostUuid() {
public void setHostUuid(String hostUuid) {
this.hostUuid = hostUuid;
}

public String getTargetVolumeInstallUrl() {
return targetVolumeInstallUrl;
}

public void setTargetVolumeInstallUrl(String targetVolumeInstallUrl) {
this.targetVolumeInstallUrl = targetVolumeInstallUrl;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public class CephGlobalConfig {

@GlobalConfigValidation(numberGreaterThan = 1)
public static GlobalConfig IMAGE_CACHE_CLEANUP_INTERVAL = new GlobalConfig(CATEGORY, "imageCache.cleanup.interval");
@GlobalConfigValidation(validValues = {"DefaultImageCachePool", "PreferVolumePool", "PreferExistingCache"})
public static GlobalConfig IMAGE_CACHE_POOL_STRATEGY = new GlobalConfig(CATEGORY, "imageCache.poolStrategy");
@GlobalConfigValidation
public static GlobalConfig PRIMARY_STORAGE_DELETE_POOL = new GlobalConfig(CATEGORY, "primaryStorage.deletePool");
@GlobalConfigValidation(numberGreaterThan = 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class APIAddCephPrimaryStoragePoolMsg extends APICreateMessage implements
private String aliasName;
@APIParam(maxLength = 2048, required = false)
private String description;
@APIParam(validValues = {"Root", "Data"})
@APIParam(validValues = {"Root", "Data", "ImageCache"})
private String type;

private boolean isCreate;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package org.zstack.storage.ceph.primary;

public enum CephImageCachePoolStrategy {
DefaultImageCachePool,
PreferVolumePool,
PreferExistingCache
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Result throwExceptionIfError() {
@Param(required = false, maxLength = 2048, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String description;

@Param(required = true, validValues = {"Root","Data"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
@Param(required = true, validValues = {"Root","Data","ImageCache"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String type;

@Param(required = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ class CephOperationCase extends SubCase {
ps = env.inventoryByName("ceph-pri") as CephPrimaryStorageInventory
bs = env.inventoryByName("ceph-bk") as CephBackupStorageInventory

assert ps.pools.securityPolicy == [DataSecurityPolicy.Copy.toString()] * 3
assert ps.pools.diskUtilization == [0.33f] * 3
assert ps.pools.replicatedSize == [3] * 3
assert ps.pools.size() == 3
assert ps.pools.securityPolicy.every { it == DataSecurityPolicy.Copy.toString() }
assert ps.pools.diskUtilization.every { it == 0.33f }
assert ps.pools.replicatedSize.every { it == 3 }

assert bs.poolSecurityPolicy == DataSecurityPolicy.ErasureCode.toString()
assert bs.poolDiskUtilization == 0.67f
Expand Down
Loading