Skip to content
Open
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
Original file line numberDiff line numberDiff line change
Expand Up@@ -1350,6 +1350,8 @@ private KVMPhysicalDisk createDiskFromTemplateOnRBD(KVMPhysicalDisk template,
*/

KVMStoragePool srcPool = template.getPool();
Map<String, String> destDetails = destPool.getDetails();
String dataPool = (destDetails == null) ? null : destDetails.get(KVMPhysicalDisk.RBD_DEFAULT_DATA_POOL);
KVMPhysicalDisk disk = null;
String newUuid = name;

Expand DownExpand Up@@ -1398,6 +1400,10 @@ private KVMPhysicalDisk createDiskFromTemplateOnRBD(KVMPhysicalDisk template,
r.confSet("mon_host", srcPool.getSourceHost() + ":" + srcPool.getSourcePort());
r.confSet("key", srcPool.getAuthSecret());
r.confSet("client_mount_timeout", "30");
if (dataPool != null) {
logger.debug("Setting RBD data pool to " + dataPool + " for the new image " + disk.getName());
r.confSet(KVMPhysicalDisk.RBD_DEFAULT_DATA_POOL, dataPool);
}
r.connect();
logger.debug("Successfully connected to Ceph cluster at " + r.confGet("mon_host"));

Expand DownExpand Up@@ -1476,6 +1482,10 @@ private KVMPhysicalDisk createDiskFromTemplateOnRBD(KVMPhysicalDisk template,
rDest.confSet("mon_host", destPool.getSourceHost() + ":" + destPool.getSourcePort());
rDest.confSet("key", destPool.getAuthSecret());
rDest.confSet("client_mount_timeout", "30");
if (dataPool != null) {
logger.debug("Setting RBD data pool to " + dataPool + " on the destination cluster for the new image " + disk.getName());
rDest.confSet(KVMPhysicalDisk.RBD_DEFAULT_DATA_POOL, dataPool);
}
rDest.connect();
logger.debug("Successfully connected to source Ceph cluster at " + rDest.confGet("mon_host"));

Expand Down
Loading