JoaoJandre commented on PR #9498:
URL: https://github.com/apache/cloudstack/pull/9498#issuecomment-2464801937

   > @JoaoJandre So yeah, this doesn't really work with primary storage NFS 
(maybe others handled with libvirt too). Currently `ModifyStoragePool` would 
call `createStoragePool`, but not deleteStoragePool. which means it would just 
increase the refCount but never actually remove it from libvirt. (but the HA 
code would already unmount it....) So the next `createStoragePool` would ask 
libvirt if it knows about the pool and it still does, but later the new 
"isNFSreallymounted" check would fail.
   > 
   > Adding a `deletStoragePool` to `ModifyStoragePool` has the negative effect 
that there would never be a mounted primary storage on the agent, which is 
currently assumed and creating instances/copy templates will fail.
   > 
   > I'm not really sure how to move forward with this then, maybe don't let 
the management server create 2 jobs with the same secondary storage pool to the 
same agent in parallel.
   
   We could keep the ref-count for the secondary storage only. The 
`com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager#createStoragePool(java.lang.String,
 java.lang.String, int, java.lang.String, java.lang.String, 
com.cloud.storage.Storage.StoragePoolType, 
java.util.Map<java.lang.String,java.lang.String>, boolean)` already takes a 
parameter to determine if the pool is primary or not, we could pass it to 
`com.cloud.hypervisor.kvm.storage.LibvirtStorageAdaptor#createStoragePool` to 
determine if we should keep the ref-count or not.


-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to