-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Allow full clone volumes with thin provisioning #11177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -32,6 +32,8 @@ | |||||
| import java.util.concurrent.ConcurrentHashMap; | ||||||
| import java.util.stream.Collectors; | ||||||
|
|
||||||
| import com.cloud.agent.properties.AgentProperties; | ||||||
| import com.cloud.agent.properties.AgentPropertiesFileHandler; | ||||||
| import org.apache.cloudstack.api.ApiConstants; | ||||||
| import org.apache.cloudstack.utils.cryptsetup.KeyFile; | ||||||
| import org.apache.cloudstack.utils.qemu.QemuImageOptions; | ||||||
|
|
@@ -1315,14 +1317,22 @@ | |||||
| passphraseObjects.add(QemuObject.prepareSecretForQemuImg(format, QemuObject.EncryptFormat.LUKS, keyFile.toString(), "sec0", options)); | ||||||
| disk.setQemuEncryptFormat(QemuObject.EncryptFormat.LUKS); | ||||||
| } | ||||||
|
|
||||||
| QemuImgFile srcFile = new QemuImgFile(template.getPath(), template.getFormat()); | ||||||
| Boolean createFullClone = AgentPropertiesFileHandler.getPropertyValue(AgentProperties.CREATE_FULL_CLONE); | ||||||
|
Check warning on line 1322 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
|
||||||
|
||||||
| Boolean createFullClone = AgentPropertiesFileHandler.getPropertyValue(AgentProperties.CREATE_FULL_CLONE); | |
| boolean createFullClone = Boolean.TRUE.equals(AgentPropertiesFileHandler.getPropertyValue(AgentProperties.CREATE_FULL_CLONE)); |
Check warning on line 1326 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
Codecov / codecov/patch
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java#L1326
Added line #L1326 was not covered by tests
Check warning on line 1328 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
Codecov / codecov/patch
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java#L1328
Added line #L1328 was not covered by tests
Check warning on line 1330 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
Codecov / codecov/patch
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java#L1330
Added line #L1330 was not covered by tests
Check warning on line 1335 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
Codecov / codecov/patch
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java#L1335
Added line #L1335 was not covered by tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading the agent properties on each disk creation may incur unnecessary overhead; consider caching the CREATE_FULL_CLONE value or loading it once at adaptor initialization.