mirror of https://github.com/apache/cloudstack.git
Merge release branch 4.18 to 4.19
* 4.18: linstor: deleteAsync fallback to volume UUID if path not set yet (#9325) linstor: do not use the same static ApiClient for all calls (#9326)
This commit is contained in:
commit
ba85b4d4ff
|
|
@ -271,7 +271,9 @@ public class LinstorPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
|
|||
case VOLUME:
|
||||
{
|
||||
final VolumeInfo volumeInfo = (VolumeInfo) dataObject;
|
||||
final String rscName = LinstorUtil.RSC_PREFIX + volumeInfo.getPath();
|
||||
// if volume creation wasn't completely done .setPath wasn't called, so we fallback to vol.getUuid()
|
||||
final String volUuid = volumeInfo.getPath() != null ? volumeInfo.getPath() : volumeInfo.getUuid();
|
||||
final String rscName = LinstorUtil.RSC_PREFIX + volUuid;
|
||||
deleteResourceDefinition(storagePool, rscName);
|
||||
|
||||
long usedBytes = storagePool.getUsedBytes();
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ package org.apache.cloudstack.storage.datastore.util;
|
|||
|
||||
import com.linbit.linstor.api.ApiClient;
|
||||
import com.linbit.linstor.api.ApiException;
|
||||
import com.linbit.linstor.api.Configuration;
|
||||
import com.linbit.linstor.api.DevelopersApi;
|
||||
import com.linbit.linstor.api.model.ApiCallRc;
|
||||
import com.linbit.linstor.api.model.ApiCallRcList;
|
||||
|
|
@ -52,7 +51,7 @@ public class LinstorUtil {
|
|||
public static final String CLUSTER_DEFAULT_MAX_IOPS = "clusterDefaultMaxIops";
|
||||
|
||||
public static DevelopersApi getLinstorAPI(String linstorUrl) {
|
||||
ApiClient client = Configuration.getDefaultApiClient();
|
||||
ApiClient client = new ApiClient();
|
||||
client.setBasePath(linstorUrl);
|
||||
return new DevelopersApi(client);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue