DK101010 commented on code in PR #6699:
URL: https://github.com/apache/cloudstack/pull/6699#discussion_r1267759818
##########
plugins/storage/volume/default/src/main/java/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java:
##########
@@ -550,7 +509,16 @@ private HypervisorType getHypervisorType(long hostId) {
@Override
public boolean attachHost(DataStore store, HostScope scope,
StoragePoolInfo existingInfo) {
- dataStoreHelper.attachHost(store, scope, existingInfo);
+ DataStore dataStore = dataStoreHelper.attachHost(store, scope,
existingInfo);
+ if(existingInfo.getCapacityBytes() == 0){
+ try {
+ storageMgr.connectHostToSharedPool(scope.getScopeId(),
dataStore.getId());
+ } catch (StorageUnavailableException ex) {
+
java.util.logging.Logger.getLogger(CloudStackPrimaryDataStoreLifeCycleImpl.class.getName()).log(Level.SEVERE,
null, ex);
+ } catch (StorageConflictException ex) {
+
java.util.logging.Logger.getLogger(CloudStackPrimaryDataStoreLifeCycleImpl.class.getName()).log(Level.SEVERE,
null, ex);
Review Comment:
Good question, I am guided by the previous code examples. What is the
advantage of s_logger?
--
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]