sureshanaparti commented on a change in pull request #5955:
URL: https://github.com/apache/cloudstack/pull/5955#discussion_r800481642
##########
File path:
plugins/storage/volume/solidfire/src/main/java/org/apache/cloudstack/storage/datastore/provider/SolidFireHostListener.java
##########
@@ -78,9 +78,10 @@ public boolean hostAdded(long hostId) {
return false;
}
- SolidFireUtil.hostAddedToCluster(hostId, host.getClusterId(),
SolidFireUtil.PROVIDER_NAME,
- clusterDao, hostDao, storagePoolDao, storagePoolDetailsDao);
-
+ if (host.getClusterId() != null) {
+ SolidFireUtil.hostAddedToCluster(hostId, host.getClusterId(),
SolidFireUtil.PROVIDER_NAME,
+ clusterDao, hostDao, storagePoolDao,
storagePoolDetailsDao);
+ }
Review comment:
@Pearl1594 _handleVMware()_ call may not be required when
`host.getClusterId()` is null.
https://github.com/apache/cloudstack/blob/2c111715178583656dcc9d576906a92d101ef897/plugins/storage/volume/solidfire/src/main/java/org/apache/cloudstack/storage/datastore/provider/SolidFireHostListener.java#L161
https://github.com/apache/cloudstack/blob/2c111715178583656dcc9d576906a92d101ef897/plugins/storage/volume/solidfire/src/main/java/org/apache/cloudstack/storage/datastore/provider/SolidFireSharedHostListener.java#L146
Possible to return when cluster id is null ?
```
if (host.getClusterId() == null) {
// add log or throw exception
return false;
}
```
--
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]