sureshanaparti commented on a change in pull request #5382:
URL: https://github.com/apache/cloudstack/pull/5382#discussion_r698414200
##########
File path: server/src/main/java/com/cloud/storage/StorageManagerImpl.java
##########
@@ -1834,6 +1836,42 @@ public void syncDatastoreClusterStoragePool(long
datastoreClusterPoolId, List<Mo
handleRemoveChildStoragePoolFromDatastoreCluster(childDatastoreUUIDs);
}
+ /**
+ * fixed mismatching between db uuids and and custom
+ * attribute uuids
+ *
+ * To different formats of uuids exists
+ * 1. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+ * 2. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ * @param uuid of existing pool
+ * @return existing pull or null otherwise
+ */
+ private StoragePoolVO getExistingPoolByUuid(String uuid){
+ StoragePoolVO storagePool = _storagePoolDao.findByUuid(uuid);
+ if(storagePool != null){
+ return storagePool;
+ }
+
+ //this case is unlikely (DB uuid without separators), but safety first
Review comment:
> @sureshanaparti ok, I already had the assumption that it should be
like that.
> We can set the correct uuid in the method here. However, this would mean
that all primary storages that were created with a datastore cluster (4.15.1)
are created again (with the correct uuid) when they are included again.
@DK101010 If the UUID for any storage pool in datastore cluster is not
inline with the actual UUID format used across, that UUID of these storage pool
have to be fixed, instead looking for storage pool with other format.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]