rg9975 commented on code in PR #7889:
URL: https://github.com/apache/cloudstack/pull/7889#discussion_r1374842612


##########
plugins/storage/volume/adaptive/src/main/java/org/apache/cloudstack/storage/datastore/provider/AdaptivePrimaryHostListener.java:
##########
@@ -0,0 +1,85 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.storage.datastore.provider;
+
+import javax.inject.Inject;
+
+import 
org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
+import org.apache.log4j.Logger;
+
+import com.cloud.exception.StorageConflictException;
+import com.cloud.storage.StoragePoolHostVO;
+import com.cloud.storage.dao.StoragePoolHostDao;
+
+public class AdaptivePrimaryHostListener implements HypervisorHostListener {
+    static final Logger s_logger = 
Logger.getLogger(AdaptivePrimaryHostListener.class);
+
+    @Inject
+    StoragePoolHostDao storagePoolHostDao;
+
+    public 
AdaptivePrimaryHostListener(AdaptivePrimaryDatastoreAdapterFactoryMap 
factoryMap) {
+
+    }
+
+    @Override
+    public boolean hostAboutToBeRemoved(long hostId) {
+        s_logger.debug("hostAboutToBeRemoved called");
+        return true;
+    }
+
+    @Override
+    public boolean hostAdded(long hostId) {
+        s_logger.debug("hostAdded called");
+        return true;
+    }
+
+    @Override
+    public boolean hostConnect(long hostId, long poolId) throws 
StorageConflictException {

Review Comment:
   For now, I removed the return false.  the net impact of finding the record 
or persisting a new one is the same - the host is connected from a cloudstack 
perspective.  We plan to visit a future update to make the host add checking 
smarter including potentially managing the hostset/hostgroup objects in the 
storage array based on the cloudstack cluster configuration and would revisit 
this piece then.  For now the system administrator has responsibility to make 
sure the fiberchannel zoning is correct to the hosts in a 
cluster/hostset/hostgroup combination.



-- 
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]

Reply via email to